Skip to contentSkip to conversation

rtc: add support for maxim dallas rtc ds1343 and ds1344

PATCH In review Raghavendra Ganiga 2 participants 2 messages Apr 30, 2014 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: add support for maxim dallas rtc ds1343 and ds1344

This is a patch to add support for
maxim dallas rtc ds1343 and ds1344

---
 drivers/rtc/Kconfig      |   10 +
 drivers/rtc/Makefile     |    1 +
 drivers/rtc/rtc-ds1343.c |  594 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 605 insertions(+)
 create mode 100644 drivers/rtc/rtc-ds1343.c
drivers/rtc/Kconfig +10 -0
index 2e565f8..eb5cdcb 100644
@@ -573,6 +573,16 @@ config RTC_DRV_DS1305
 	  This driver can also be built as a module. If so, the module
 	  will be called rtc-ds1305.
 
+config RTC_DRV_DS1343
+	tristate "Dallas/Maxim DS1343/DS1344"
+	help
+	  If you say yes here you get support for the
+	  Dallas/Maxim DS1343 and DS1344 real time clock chips.
+	  Support for trickle charger, alarm is provided.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ds1343.
+
 config RTC_DRV_DS1347
 	tristate "Dallas/Maxim DS1347"
 	help
drivers/rtc/Makefile +1 -0
index 40a0991..a8daf6c 100644
@@ -40,6 +40,7 @@ obj-$(CONFIG_RTC_DRV_DS1286)	+= rtc-ds1286.o
 obj-$(CONFIG_RTC_DRV_DS1302)	+= rtc-ds1302.o
 obj-$(CONFIG_RTC_DRV_DS1305)	+= rtc-ds1305.o
 obj-$(CONFIG_RTC_DRV_DS1307)	+= rtc-ds1307.o
+obj-$(CONFIG_RTC_DRV_DS1343)	+= rtc-ds1343.o
 obj-$(CONFIG_RTC_DRV_DS1347)	+= rtc-ds1347.o
 obj-$(CONFIG_RTC_DRV_DS1374)	+= rtc-ds1374.o
 obj-$(CONFIG_RTC_DRV_DS1390)	+= rtc-ds1390.o
drivers/rtc/rtc-ds1343.c new file +594 -0

594 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#1 lore raw

drivers/rtc/rtc-ds1343.c line 118

Quoted 9 lines · On Wed, 30 Apr 2014 21:55:07 +0530 Raghavendra Ganiga <[email protected]>…
drivers/rtc/rtc-ds1343.c new file +9 -0
+
+static int ds1343_proc(struct device *dev, struct seq_file *seq)
+{
+	struct ds1343_priv *priv = dev_get_drvdata(dev);
+	unsigned int data;
+	unsigned char alarm_mode = 0;
+	const char *alarm_str, *diodes = "disabled", *resistors = " ";
+
+	regmap_read(priv->map, DS1343_CONTROL_REG, &data);

is this thing really useful? what about having sysfs entries instead?

Signature · 6 lines
 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it