Skip to contentSkip to conversation

power: Add driver for SMB328A Battery Charger

PATCH New Bálint Czobor 1 participant 1 message Mar 16, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: Add driver for SMB328A Battery Charger

From: Jongmyeong Ko <[email protected]>

---
 arch/arm/mach-msm/Kconfig             |    5 +
 drivers/power/Kconfig                 |    6 +
 drivers/power/Makefile                |    1 +
 drivers/power/smb328a-charger.c       |  968 +++++++++++++++++++++++++++++++++
 include/linux/power/smb328a-charger.h |   19 +
 5 files changed, 999 insertions(+)
 create mode 100644 drivers/power/smb328a-charger.c
 create mode 100644 include/linux/power/smb328a-charger.h
arch/arm/mach-msm/Kconfig +5 -0
index 9625cf3..4837994 100644
@@ -83,6 +83,11 @@ config ARCH_QSD8X50
 
 endchoice
 
+config HW_REV_USING_SMB328
+	hex "Select H/W Revision using smb328"
+	depends on CHARGER_SMB328A
+	default "0x00"
+
 config MSM_HAS_DEBUG_UART_HS
 	bool
 
drivers/power/Kconfig +6 -0
index ba69751..084eb69 100644
@@ -360,6 +360,12 @@ config CHARGER_BQ24735
 	help
 	  Say Y to enable support for the TI BQ24735 battery charger.
 
+config CHARGER_SMB328A
+	bool "SMB328A charger driver"
+	default n
+	help
+	  Say Y here to enable support for charger with SMB328A chip.
+
 config CHARGER_SMB347
 	tristate "Summit Microelectronics SMB347 Battery Charger"
 	depends on I2C
drivers/power/Makefile +1 -0
index ee54a3e..a07d9ea 100644
@@ -55,6 +55,7 @@ obj-$(CONFIG_CHARGER_BQ2415X)	+= bq2415x_charger.o
 obj-$(CONFIG_CHARGER_BQ24190)	+= bq24190_charger.o
 obj-$(CONFIG_CHARGER_BQ24735)	+= bq24735-charger.o
 obj-$(CONFIG_POWER_AVS)		+= avs/
+obj-$(CONFIG_CHARGER_SMB328A)	+= smb328a-charger.o
 obj-$(CONFIG_CHARGER_SMB347)	+= smb347-charger.o
 obj-$(CONFIG_CHARGER_TPS65090)	+= tps65090-charger.o
 obj-$(CONFIG_POWER_RESET)	+= reset/
drivers/power/smb328a-charger.c new file +968 -0

968 lines not on this page · raw message

include/linux/power/smb328a-charger.h new file +19 -0
new file mode 100644
index 0000000..4dce7e0
@@ -0,0 +1,19 @@
+/*
+ *  Copyright (C) 2011 Samsung Electronics
+ *  jongmyeong ko <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __SMB328A_CHARGER_H_
+#define __SMB328A_CHARGER_H_
+
+struct smb328a_platform_data {
+	int		(*set_charger)(int);
+	int		(*topoff_cb) (void);
+	void	(*hw_init)(void);
+};
+
+#endif
Signature · 1 line
1.7.9.5