diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2010-05-24 19:55:27 +0200 |
---|---|---|
committer | Lars-Peter Clausen <lars@metafoo.de> | 2011-02-22 11:02:42 +0100 |
commit | 7fb7ba588c0f276609609565b21fcc853284a9a0 (patch) | |
tree | 68a47743764b763ba73572cfaf752d1ddecaccfb /include/linux/power | |
parent | a40402ef0bf3b6e53a7dfd396e9487eb2f613e19 (diff) |
bq27x00: Add bq27000 support
This patch adds support for the bq27000 battery to the bq27x00 driver.
The bq27000 is similar to the bq27200 except that it uses the HDQ bus
instead of I2C to communicate with the host system.
The driver is implemented as a platform driver. The driver expects to be
provided with a read callback function through its platform data. The read
function is assumed to do the lowlevel HDQ handling and read out the value
of a certain register.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Diffstat (limited to 'include/linux/power')
-rw-r--r-- | include/linux/power/bq27x00_battery.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/power/bq27x00_battery.h b/include/linux/power/bq27x00_battery.h new file mode 100644 index 000000000000..a857f719bf40 --- /dev/null +++ b/include/linux/power/bq27x00_battery.h @@ -0,0 +1,19 @@ +#ifndef __LINUX_BQ27X00_BATTERY_H__ +#define __LINUX_BQ27X00_BATTERY_H__ + +/** + * struct bq27000_plaform_data - Platform data for bq27000 devices + * @name: Name of the battery. If NULL the driver will fallback to "bq27000". + * @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. + */ +struct bq27000_platform_data { + const char *name; + int (*read)(struct device *dev, unsigned int); +}; + +#endif |