summaryrefslogtreecommitdiff
path: root/include/linux/power/bq27x00_battery.h
blob: a8999e26dcc0d75d77303a8a913a50c09d252be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#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);
};

/**
 * struct bq27x00_plaform_data - Platform data for bq27000 devices
 * @charger_ops: Access functions for the charger
 *      Some information can't be deduced and needs to be retrieved
 *      directly from the charger. For example, if the device is 
 *      running at full speed it may use more power than the charger
 *      can provide and a net outflow from the battery will be the
 *      result. With access to the charger the battery can still tell 
 *      that it's on the charger (important information in certain 
 *      circumstances).
 */
struct bq27x00_platform_data {
	const char * charger_name;
	struct device * charger_device;
	struct i2c_client * charger_i2c;
};


#endif