Skip to contentSkip to conversation

Power: DA9052 battery driver

PATCH In review ashishj3 2 participants 3 messages Jul 22, 2011 – Aug 19, 2011

lore
Share & tools
lore

ashishj3

author
#0 lore raw

PATCH v2 4/11 Power: DA9052 battery driver

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

---
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 |  577 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 585 insertions(+), 0 deletions(-)
 create mode 100755 drivers/power/da9052-battery.c
drivers/power/Kconfig +7 -0
index cc019c9..0cee85a 100644
@@ -142,6 +142,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 8fcd93f..933d121 100644
@@ -24,6 +24,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 +577 -0

577 lines not on this page · raw message

author
#1 lore raw
Quoted 11 lines · On Fri, 2011-07-22 at 18:22 +0530, ashishj3 wrote:

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

---
Changes since v2
- Correct code styling for inline functions
- Remove averaging algorithm
- Set use_for_apm thru board specific parameter
---

Any comments on this patch?

#2 lore raw
Quoted 12 lines · On Thu, Aug 04, 2011 at 06:17:52PM +0530, ashishj3 wrote:
Quoted 11 lines · On Fri, 2011-07-22 at 18:22 +0530, ashishj3 wrote:

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

---
Changes since v2
- Correct code styling for inline functions
- Remove averaging algorithm
- Set use_for_apm thru board specific parameter
---

Quoted 1 line

Any comments on this patch?

Despite some cosmetic issues, the patch looks OK to me.

So, I'm fine if it goes via MFD tree.

Although, if you ever need to respin this patch, try to make the code fully conform to the Linux coding style.

Thanks,

Signature · 2 lines
Anton Vorontsov
Email: [email protected]