Skip to contentSkip to conversation

power supply: add driver for TI BQ20Z75 gas gauge IC

PATCH Applied [email protected] 2 participants 2 messages Sep 5, 2010 – Sep 6, 2010 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 power supply: add driver for TI BQ20Z75 gas gauge IC

From: Rhyland Klein <[email protected]>

this driver depends on I2C and uses SMBUS for communication with the host.

Addressed comments from reviews by Mark Brown and Jean Delvare.
* Cleaned up whitespace and alignment issues
* changed return codes to more appropriate values
* change Kconfig option name to be consistent with existing devices
* removed global struct and moved to device specific data
* changed printk to dev_dbg
* added reviewed-by tags for Mark and Jean.

---
 drivers/power/Kconfig   |    7 +
 drivers/power/Makefile  |    1 +
 drivers/power/bq20z75.c |  385 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 393 insertions(+), 0 deletions(-)
 create mode 100644 drivers/power/bq20z75.c
drivers/power/Kconfig +7 -0
index 8e9ba17..a1fd3c0 100644
@@ -109,6 +109,13 @@ config BATTERY_WM97XX
 	help
 	  Say Y to enable support for battery measured by WM97xx aux port.
 
+config BATTERY_BQ20Z75
+        tristate "TI BQ20z75 gas gauge"
+        depends on I2C
+        help
+         Say Y to include support for TI BQ20z75 SBS-compliant
+         gas gauge and protection IC.
+
 config BATTERY_BQ27x00
 	tristate "BQ27x00 battery driver"
 	depends on I2C
drivers/power/Makefile +1 -0
index 0005080..a5006a7 100644
@@ -29,6 +29,7 @@ obj-$(CONFIG_BATTERY_OLPC)	+= olpc_battery.o
 obj-$(CONFIG_BATTERY_TOSA)	+= tosa_battery.o
 obj-$(CONFIG_BATTERY_COLLIE)	+= collie_battery.o
 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_MAX17040)	+= max17040_battery.o
drivers/power/bq20z75.c new file +385 -0

385 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 12 lines · On Sun, Sep 05, 2010 at 03:31:23PM -0700…

From: Rhyland Klein <[email protected]>

this driver depends on I2C and uses SMBUS for communication with the host.

Addressed comments from reviews by Mark Brown and Jean Delvare.
* Cleaned up whitespace and alignment issues
* changed return codes to more appropriate values
* change Kconfig option name to be consistent with existing devices
* removed global struct and moved to device specific data
* changed printk to dev_dbg
* added reviewed-by tags for Mark and Jean.

Quoted 3 lines

Applied, thanks everyone!