Skip to contentSkip to conversation

ARMV7: OMAP4: twl6030 add battery charging support

PATCH New Steve Sakoman 1 participant 1 message Nov 29, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARMV7: OMAP4: twl6030 add battery charging support

From: Balaji T K <[email protected]>

Add battery charging support twl6030 driver.
Add support for battery voltage and current measurements.
Add command to get battery status and start/stop battery charging from USB.

---
 board/ti/sdp4430/Makefile       |    2 +-
 board/ti/sdp4430/cmd_bat.c      |   58 ++++++++++++++++++
 board/ti/sdp4430/sdp.c          |    4 +
 drivers/power/twl6030.c         |  124 ++++++++++++++++++++++++++++++++++++++-
 include/configs/omap4_sdp4430.h |    1 +
 include/twl6030.h               |   45 +++++++++++++-
 6 files changed, 229 insertions(+), 5 deletions(-)
 create mode 100644 board/ti/sdp4430/cmd_bat.c
board/ti/sdp4430/Makefile +1 -1
index bce8534..f1ee544 100644
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS	:= sdp.o
+COBJS	:= sdp.o cmd_bat.o
 
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/ti/sdp4430/cmd_bat.c new file +58 -0

58 lines not on this page · raw message

board/ti/sdp4430/sdp.c +4 -0
index 01d5ce4..b13c4c5 100644
@@ -23,6 +23,7 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#include <twl6030.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
 
@@ -63,6 +64,9 @@ int board_eth_init(bd_t *bis)
  */
 int misc_init_r(void)
 {
+#ifdef CONFIG_TWL6030_POWER
+	twl6030_init_battery_charging();
+#endif
 	return 0;
 }
 
drivers/power/twl6030.c +122 -2

145 lines not on this page · raw message

include/configs/omap4_sdp4430.h +1 -0
index ed0bd41..bdd330a 100644
@@ -102,6 +102,7 @@
 
 /* TWL6030 */
 #define CONFIG_TWL6030_POWER		1
+#define CONFIG_CMD_BAT			1
 
 /* MMC */
 #define CONFIG_GENERIC_MMC		1
include/twl6030.h +43 -2

65 lines not on this page · raw message

Signature · 1 line
1.7.0.4