Skip to contentSkip to conversation

rtc: tps65910: Add RTC driver for TPS65910 PMIC RTC

PATCH In review Venu Byravarasu 2 participants 2 messages Aug 8, 2012 – Sep 16, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 rtc: tps65910: Add RTC driver for TPS65910 PMIC RTC

TPS65910 PMIC is a MFD with RTC as one of the device. Adding RTC driver for supporting RTC device present inside TPS65910 PMIC.

Only support for RTC alarm is implemented as part of this patch.

---
delta between patch set V3 from V2:

Fixed compilation errors and warnings reported
by enabling CONFIG_PM_SLEEP.

 drivers/rtc/Kconfig          |   10 ++
 drivers/rtc/Makefile         |    1 +
 drivers/rtc/rtc-tps65910.c   |  352 ++++++++++++++++++++++++++++++++++++++++++
 include/linux/mfd/tps65910.h |   10 ++
 4 files changed, 373 insertions(+), 0 deletions(-)
 create mode 100644 drivers/rtc/rtc-tps65910.c
drivers/rtc/Kconfig +10 -0
index fabc99a..b4f1234 100644
@@ -333,6 +333,16 @@ config RTC_DRV_TWL4030
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-twl.
 
+config RTC_DRV_TPS65910
+	tristate "TI TPS65910 RTC driver"
+	depends on RTC_CLASS && MFD_TPS65910
+	help
+	  If you say yes here you get support for the RTC on the
+	  TPS65910 chips.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-tps65910.
+
 config RTC_DRV_S35390A
 	tristate "Seiko Instruments S-35390A"
 	select BITREVERSE
drivers/rtc/Makefile +1 -0
index 0d5b2b6..3b596af 100644
@@ -105,6 +105,7 @@ obj-$(CONFIG_RTC_DRV_TEGRA)	+= rtc-tegra.o
 obj-$(CONFIG_RTC_DRV_TEST)	+= rtc-test.o
 obj-$(CONFIG_RTC_DRV_TILE)	+= rtc-tile.o
 obj-$(CONFIG_RTC_DRV_TWL4030)	+= rtc-twl.o
+obj-$(CONFIG_RTC_DRV_TPS65910)	+= rtc-tps65910.o
 obj-$(CONFIG_RTC_DRV_TX4939)	+= rtc-tx4939.o
 obj-$(CONFIG_RTC_DRV_V3020)	+= rtc-v3020.o
 obj-$(CONFIG_RTC_DRV_VR41XX)	+= rtc-vr41xx.o
drivers/rtc/rtc-tps65910.c new file +352 -0

352 lines not on this page · raw message

include/linux/mfd/tps65910.h +10 -0
index 9bf8767..ba2eb25 100644
@@ -132,6 +132,16 @@
  *
  */
 
+/* RTC_CTRL_REG bitfields */
+#define TPS65910_RTC_CTRL_STOP_RTC			0x01 /*0=stop, 1=run */
+#define TPS65910_RTC_CTRL_GET_TIME			0x40
+
+/* RTC_STATUS_REG bitfields */
+#define TPS65910_RTC_STATUS_ALARM               0x40
+
+/* RTC_INTERRUPTS_REG bitfields */
+#define TPS65910_RTC_INTERRUPTS_EVERY           0x03
+#define TPS65910_RTC_INTERRUPTS_IT_ALARM        0x08
 
 /*Register BCK1  (0x80) register.RegisterDescription */
 #define BCK1_BCKUP_MASK					0xFF
Signature · 1 line
1.7.1.1
Acked-by on v3 1/1
#1 lore raw

Hi Venu,

Quoted 7 lines · Venu Byravarasu

TPS65910 PMIC is a MFD with RTC as one of the device. Adding RTC driver for supporting RTC device present inside TPS65910 PMIC.

Only support for RTC alarm is implemented as part of this patch.

For the MFD changes:

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/