2010-05-25 01:55:27 +08:00
|
|
|
#ifndef __LINUX_BQ27X00_BATTERY_H__
|
|
|
|
#define __LINUX_BQ27X00_BATTERY_H__
|
|
|
|
|
|
|
|
/**
|
2015-09-23 03:35:06 +08:00
|
|
|
* struct bq27xxx_plaform_data - Platform data for bq27xxx devices
|
2015-09-23 03:35:07 +08:00
|
|
|
* @name: Name of the battery.
|
|
|
|
* @chip: Chip class number of this device.
|
2010-05-25 01:55:27 +08:00
|
|
|
* @read: HDQ read callback.
|
|
|
|
* This function should provide access to the HDQ bus the battery is
|
|
|
|
* connected to.
|
|
|
|
* The first parameter is a pointer to the battery device, the second the
|
|
|
|
* register to be read. The return value should either be the content of
|
|
|
|
* the passed register or an error value.
|
|
|
|
*/
|
power: bq27xxx_battery: Add support for additional bq27xxx family devices
Add support for additional devices and register equivalent family devices
including the bq27010, bq27210, bq27500, bq27510, bq27520, bq27530,
bq27531, bq27541, bq27542, bq27546, bq27545, bq27441, bq27421, and the
bq27641.
To facilitate this process the register mapings have been moved to tables
and other small cleanups have been made.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-23 03:35:09 +08:00
|
|
|
enum bq27xxx_chip {
|
|
|
|
BQ27000 = 1, /* bq27000, bq27200 */
|
|
|
|
BQ27010, /* bq27010, bq27210 */
|
|
|
|
BQ27500, /* bq27500, bq27510, bq27520 */
|
|
|
|
BQ27530, /* bq27530, bq27531 */
|
|
|
|
BQ27541, /* bq27541, bq27542, bq27546, bq27742 */
|
|
|
|
BQ27545, /* bq27545 */
|
|
|
|
BQ27421, /* bq27421, bq27425, bq27441, bq27621 */
|
|
|
|
};
|
2015-09-23 03:35:07 +08:00
|
|
|
|
2015-09-23 03:35:06 +08:00
|
|
|
struct bq27xxx_platform_data {
|
2010-05-25 01:55:27 +08:00
|
|
|
const char *name;
|
2015-09-23 03:35:07 +08:00
|
|
|
enum bq27xxx_chip chip;
|
2010-05-25 01:55:27 +08:00
|
|
|
int (*read)(struct device *dev, unsigned int);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|