-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Wolfram Sang
authored and
Linus Torvalds
committed
May 29, 2012
1 parent
f8ae970
commit eb86c30
Showing
2 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 */ |