mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
bq24190_charger: Add support for TI BQ24190 Battery Charger
Add driver support for the Texas Instruments BQ24190 battery charger. Some of the information provided by the device is about the charger and other information is about the battery so create two power_supply objects (one for each) and provide the appropriate information for each one. The device has many fields that go beyond what is reasonable to report or modify using the existing 'POWER_SUPPLY_PROP_*' properties so the driver exports the register fields via sysfs. They are prefixed by 'f_' (for 'field') to make it easier to distinguish between a register field and a "normal" sysfs file exported by the power_supply infrastructure. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
This commit is contained in:
parent
ed5243f8ab
commit
d7bf353fd0
4 changed files with 1569 additions and 0 deletions
|
@ -334,6 +334,12 @@ config CHARGER_BQ2415X
|
|||
You'll need this driver to charge batteries on e.g. Nokia
|
||||
RX-51/N900.
|
||||
|
||||
config CHARGER_BQ24190
|
||||
tristate "TI BQ24190 battery charger driver"
|
||||
depends on I2C && GPIOLIB
|
||||
help
|
||||
Say Y to enable support for the TI BQ24190 battery charger.
|
||||
|
||||
config CHARGER_SMB347
|
||||
tristate "Summit Microelectronics SMB347 Battery Charger"
|
||||
depends on I2C
|
||||
|
|
|
@ -50,6 +50,7 @@ obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o
|
|||
obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o
|
||||
obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o
|
||||
obj-$(CONFIG_CHARGER_BQ2415X) += bq2415x_charger.o
|
||||
obj-$(CONFIG_CHARGER_BQ24190) += bq24190_charger.o
|
||||
obj-$(CONFIG_POWER_AVS) += avs/
|
||||
obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o
|
||||
obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o
|
||||
|
|
1546
drivers/power/bq24190_charger.c
Normal file
1546
drivers/power/bq24190_charger.c
Normal file
File diff suppressed because it is too large
Load diff
16
include/linux/power/bq24190_charger.h
Normal file
16
include/linux/power/bq24190_charger.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Platform data for the TI bq24190 battery charger driver.
|
||||
*
|
||||
* 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 _BQ24190_CHARGER_H_
|
||||
#define _BQ24190_CHARGER_H_
|
||||
|
||||
struct bq24190_platform_data {
|
||||
unsigned int gpio_int; /* GPIO pin that's connected to INT# */
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue