summaryrefslogtreecommitdiff
path: root/include/linux/rtc/ds1307.h
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2012-05-30 02:07:38 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-30 03:22:33 +0400
commiteb86c3064b3c53837fdfea17df1483d825919894 (patch)
tree0d408fe43f43248477bb521fdd5b6856878199b0 /include/linux/rtc/ds1307.h
parentf8ae97019ff79559416dc2ae9c14af92c2054cba (diff)
downloadlinux-eb86c3064b3c53837fdfea17df1483d825919894.tar.xz
rtc: ds1307: add trickle charger support
Some DS13XX devices have "trickle chargers". Its configuration register is at different locations, the setup is the same, though. Since the configuration is board specific, introduce a platform_data to this driver. Tested with a DS1339 on a custom board. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rtc/ds1307.h')
-rw-r--r--include/linux/rtc/ds1307.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/rtc/ds1307.h b/include/linux/rtc/ds1307.h
new file mode 100644
index 000000000000..291b1c490367
--- /dev/null
+++ b/include/linux/rtc/ds1307.h
@@ -0,0 +1,22 @@
+/*
+ * ds1307.h - platform_data for the ds1307 (and variants) rtc driver
+ * (C) Copyright 2012 by Wolfram Sang, Pengutronix e.K.
+ * same license as the driver
+ */
+
+#ifndef _LINUX_DS1307_H
+#define _LINUX_DS1307_H
+
+#include <linux/types.h>
+
+#define DS1307_TRICKLE_CHARGER_250_OHM 0x01
+#define DS1307_TRICKLE_CHARGER_2K_OHM 0x02
+#define DS1307_TRICKLE_CHARGER_4K_OHM 0x03
+#define DS1307_TRICKLE_CHARGER_NO_DIODE 0x04
+#define DS1307_TRICKLE_CHARGER_DIODE 0x08
+
+struct ds1307_platform_data {
+ u8 trickle_charger_setup;
+};
+
+#endif /* _LINUX_DS1307_H */