diff options
| author | Wolfram Sang <w.sang@pengutronix.de> | 2012-05-29 18:07:38 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:33 -0400 |
| commit | eb86c3064b3c53837fdfea17df1483d825919894 (patch) | |
| tree | 0d408fe43f43248477bb521fdd5b6856878199b0 /include/linux/rtc | |
| parent | f8ae97019ff79559416dc2ae9c14af92c2054cba (diff) | |
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')
| -rw-r--r-- | include/linux/rtc/ds1307.h | 22 |
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 @@ | |||
| 1 | /* | ||
| 2 | * ds1307.h - platform_data for the ds1307 (and variants) rtc driver | ||
| 3 | * (C) Copyright 2012 by Wolfram Sang, Pengutronix e.K. | ||
| 4 | * same license as the driver | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef _LINUX_DS1307_H | ||
| 8 | #define _LINUX_DS1307_H | ||
| 9 | |||
| 10 | #include <linux/types.h> | ||
| 11 | |||
| 12 | #define DS1307_TRICKLE_CHARGER_250_OHM 0x01 | ||
| 13 | #define DS1307_TRICKLE_CHARGER_2K_OHM 0x02 | ||
| 14 | #define DS1307_TRICKLE_CHARGER_4K_OHM 0x03 | ||
| 15 | #define DS1307_TRICKLE_CHARGER_NO_DIODE 0x04 | ||
| 16 | #define DS1307_TRICKLE_CHARGER_DIODE 0x08 | ||
| 17 | |||
| 18 | struct ds1307_platform_data { | ||
| 19 | u8 trickle_charger_setup; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif /* _LINUX_DS1307_H */ | ||
