Skip to contentSkip to conversation

: rtc: Add TI BQ4802 RTC driver.

PATCH In review David Miller 1 participant 2 messages Aug 29, 2008 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 7/12 : rtc: Add TI BQ4802 RTC driver.

rtc: Add TI BQ4802 RTC driver.

---
 drivers/rtc/Kconfig      |    9 ++
 drivers/rtc/Makefile     |    1 +
 drivers/rtc/rtc-bq4802.c |  229 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 239 insertions(+), 0 deletions(-)
 create mode 100644 drivers/rtc/rtc-bq4802.c
drivers/rtc/Kconfig +9 -0
index 8cb158d..5d600ff 100644
@@ -414,6 +414,15 @@ config RTC_DRV_M48T59
 	  This driver can also be built as a module, if so, the module
 	  will be called "rtc-m48t59".
 
+config RTC_DRV_BQ4802
+	tristate "TI BQ4802"
+	help
+	  If you say Y here you will get support for the TI
+	  BQ4802 RTC chip.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-bq4802.
+
 config RTC_DRV_V3020
 	tristate "EM Microelectronic V3020"
 	help
drivers/rtc/Makefile +1 -0
index 18622ef..fed42c2 100644
@@ -38,6 +38,7 @@ obj-$(CONFIG_RTC_DRV_M41T80)	+= rtc-m41t80.o
 obj-$(CONFIG_RTC_DRV_M41T94)	+= rtc-m41t94.o
 obj-$(CONFIG_RTC_DRV_M48T59)	+= rtc-m48t59.o
 obj-$(CONFIG_RTC_DRV_M48T86)	+= rtc-m48t86.o
+obj-$(CONFIG_RTC_DRV_BQ4802)	+= rtc-bq4802.o
 obj-$(CONFIG_RTC_DRV_MAX6900)	+= rtc-max6900.o
 obj-$(CONFIG_RTC_DRV_MAX6902)	+= rtc-max6902.o
 obj-$(CONFIG_RTC_DRV_OMAP)	+= rtc-omap.o
drivers/rtc/rtc-bq4802.c new file +229 -0

229 lines not on this page · raw message

Signature · 1 line
1.5.6.5.GIT
#1 lore raw

From: David Miller <[email protected]>
Date: Thu, 28 Aug 2008 23:09:35 -0700 (PDT)

Quoted 3 lines

rtc: Add TI BQ4802 RTC driver.

Testing on ultra45 found a silly typo bug in this driver.

I'll integrate this fix into the original commit when I integrate this stuff for real.

drivers/rtc/rtc-bq4802.c +1 -1
index 8938b21..541580c 100644
@@ -159,7 +159,7 @@ static int __devinit bq4802_probe(struct platform_device *pdev)
 		p->regs = (void __iomem *) p->r->start;
 		p->read = bq4802_read_io;
 		p->write = bq4802_write_io;
-	} else if (p->r->flags & IORESOURCE_IO) {
+	} else if (p->r->flags & IORESOURCE_MEM) {
 		p->regs = ioremap(p->r->start, resource_size(p->r));
 		p->read = bq4802_read_mem;
 		p->write = bq4802_write_mem;