diff options
author | Koen Kooi <koen@openembedded.org> | 2010-05-09 10:54:01 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-05-10 17:24:41 +0200 |
commit | 1a733aa29a95816cc344bb38441338963f1e0180 (patch) | |
tree | bad752108628af4b7c6431a833b789815c751fde /recipes/linux/linux-omap-psp-2.6.32/0035-RTC-add-support-for-backup-battery-recharge.patch | |
parent | acd000615cb77c4805f43df177fbe08cd2244195 (diff) |
linux-omap-psp 2.6.32: rediff touchbook and beagleboard patches, tweak beagleboard defconfig
Diffstat (limited to 'recipes/linux/linux-omap-psp-2.6.32/0035-RTC-add-support-for-backup-battery-recharge.patch')
-rw-r--r-- | recipes/linux/linux-omap-psp-2.6.32/0035-RTC-add-support-for-backup-battery-recharge.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/0035-RTC-add-support-for-backup-battery-recharge.patch b/recipes/linux/linux-omap-psp-2.6.32/0035-RTC-add-support-for-backup-battery-recharge.patch new file mode 100644 index 0000000000..ba689c459c --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0035-RTC-add-support-for-backup-battery-recharge.patch @@ -0,0 +1,55 @@ +From 02203232a3230c06a1bc939c92aac7e910c5d578 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Thu, 4 Feb 2010 12:26:22 -0800 +Subject: [PATCH 35/43] RTC: add support for backup battery recharge + +--- + drivers/rtc/rtc-twl.c | 25 +++++++++++++++++++++++++ + 1 files changed, 25 insertions(+), 0 deletions(-) + +diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c +index c6a83a2..2329b5b 100644 +--- a/drivers/rtc/rtc-twl.c ++++ b/drivers/rtc/rtc-twl.c +@@ -30,6 +30,23 @@ + + #include <linux/i2c/twl.h> + ++/* ++ * PM_RECEIVER block register offsets (use TWL4030_MODULE_PM_RECEIVER) ++ */ ++#define REG_BB_CFG 0x12 ++ ++/* PM_RECEIVER BB_CFG bitfields */ ++#define BIT_PM_RECEIVER_BB_CFG_BBCHEN 0x10 ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL 0x0C ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL_2V5 0x00 ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3V0 0x04 ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3V1 0x08 ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3v2 0x0c ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL 0x03 ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL_25UA 0x00 ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL_150UA 0x01 ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL_500UA 0x02 ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL_1MA 0x03 + + /* + * RTC block register offsets (use TWL_MODULE_RTC) +@@ -508,6 +525,14 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) + if (ret < 0) + goto out2; + ++ /* enable backup battery charging */ ++ /* use a conservative 25uA @ 3.1V */ ++ ret = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, ++ BIT_PM_RECEIVER_BB_CFG_BBCHEN | ++ BIT_PM_RECEIVER_BB_CFG_BBSEL_3V1 | ++ BIT_PM_RECEIVER_BB_CFG_BBISEL_25UA, ++ REG_BB_CFG); ++ + return ret; + + out2: +-- +1.6.6.1 + |