drivers/rtc/rtc-twl4030.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 drivers/rtc/rtc-twl4030.c
This is a driver for the RTC in the TWL4030 family chips.
POSTED AS A TWL4030 MFD EXAMPLE -- NOT YET FOR MERGING.
As an example ... since it seems closest of the various sub-chip drivers to being ready for mainline. Why not yet for merging?
- This includes a cleanup patch that's not yet been merged into its primary copy (in the OMAP tree), removing needless headers that prevent building on non-OMAP systems.
- The <linux/i2c/...> header file should probably be removed ... nothing in it should be needed outside of the RTC driver.
- IRQ handling issues:
* This depends on the TWL4030 MFD core, which isn't merged
yet (and which may well need discussion first, now that it's been posted).
* It also depends on TWL4030 "power" interrupt handling,
which hasn't yet been submitted.
* I'm suspecting the IRQ handling is incorrect. Rather than
reading REG_PWR_ISR1 again (acking IRQs from other devices!) maybe it can just trigger on one (!) edge.
Other than those issues, I think this driver should pretty much be ready for mainline merge. It passes "rtctest" and seems fairly clean.
But as always, review is appreciated. We all have blind spots; many-eyes-helps, and all that. :)
--- drivers/rtc/Kconfig | 10 drivers/rtc/Makefile | 1 drivers/rtc/rtc-twl4030.c | 529 ++++++++++++++++++++++++++++++++++++++ include/linux/i2c/twl4030-rtc.h | 172 ++++++++++++ 4 files changed, 712 insertions(+)
drivers/rtc/Kconfig +10 -0
@@ -246,6 +246,16 @@ config RTC_DRV_TWL92330 platforms. The support is integrated with the rest of the Menelaus driver; it's not separate module. +config RTC_DRV_TWL4030 + tristate "TWL4030/TPS659x0 Real Time Clock" + depends on RTC_CLASS && TWL4030_CORE + help + If you say yes here you get support for internal Real-Time + Clock of TWL4030/TPS650x0 family chips. + + This driver can also be built as a module. If so, the module + will be called rtc-twl4030. + config RTC_DRV_S35390A tristate "Seiko Instruments S-35390A" select BITREVERSE
drivers/rtc/Makefile +1 -0
@@ -56,6 +56,7 @@ obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa11 obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o obj-$(CONFIG_RTC_DRV_STK17TA8) += rtc-stk17ta8.o obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o +obj-$(CONFIG_RTC_DRV_TWL4030) += rtc-twl4030.o obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o obj-$(CONFIG_RTC_DRV_VR41XX) += rtc-vr41xx.o obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o
drivers/rtc/rtc-twl4030.c new file +529 -0
529 lines not on this page · raw message
include/linux/i2c/twl4030-rtc.h new file +172 -0
172 lines not on this page · raw message