Skip to contentSkip to conversation

Power: DA9052 Battery module V5

PATCH In review Ashish Jangam 1 participant 1 message Dec 9, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 Power: DA9052 Battery module V5

Driver for DA9052 battery charger. This driver depends on DA9052 MFD core dirver for definitions and methods.

This patch is functionally tested on Samsung SMDKV6410.

---
Changes since v4
- Remove unnecessary type cast
- Improve code readability
Changes since v3
- Included power_supply.h file
- Corrected the definition of DA9052_BAT_THRESHOLD macro
- Changed definition of charger_type_enum
- Added API da9052_battery_read_end_current
- Added API da9052_battery_check_status
- Changed the way of handling the interrupts in da9052_bat_irq Changes since v2
- Correct code styling for inline functions
- Remove averaging algorithm
- Set use_for_apm thru board specific parameter

---
 drivers/power/Kconfig          |    7 +
 drivers/power/Makefile         |    1 +
 drivers/power/da9052-battery.c |  615 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 623 insertions(+), 0 deletions(-)
 create mode 100644 drivers/power/da9052-battery.c
drivers/power/Kconfig +7 -0
index 9f88641..9696502 100644
@@ -150,6 +150,13 @@ config BATTERY_DA9030
 	  Say Y here to enable support for batteries charger integrated into
 	  DA9030 PMIC.
 
+config BATTERY_DA9052
+	tristate "Dialog DA9052 Battery"
+	depends on PMIC_DA9052
+	help
+	  Say Y here to enable support for batteries charger integrated into
+	  DA9052 PMIC.
+
 config BATTERY_MAX17040
 	tristate "Maxim MAX17040 Fuel Gauge"
 	depends on I2C
drivers/power/Makefile +1 -0
index b4af13d..c570e20 100644
@@ -25,6 +25,7 @@ obj-$(CONFIG_BATTERY_WM97XX)	+= wm97xx_battery.o
 obj-$(CONFIG_BATTERY_BQ20Z75)	+= bq20z75.o
 obj-$(CONFIG_BATTERY_BQ27x00)	+= bq27x00_battery.o
 obj-$(CONFIG_BATTERY_DA9030)	+= da9030_battery.o
+obj-$(CONFIG_BATTERY_DA9052)	+= da9052-battery.o
 obj-$(CONFIG_BATTERY_MAX17040)	+= max17040_battery.o
 obj-$(CONFIG_BATTERY_MAX17042)	+= max17042_battery.o
 obj-$(CONFIG_BATTERY_Z2)	+= z2_battery.o
drivers/power/da9052-battery.c new file +615 -0

615 lines not on this page · raw message

Signature · 1 line
1.7.1