1 /*
2  * PM2301 charger driver.
3  *
4  * Copyright (C) 2012 ST Ericsson Corporation
5  *
6  * Contact: Olivier LAUNAY (olivier.launay@stericsson.com
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * version 2 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA
21  */
22 
23 #ifndef __LINUX_PM2301_H
24 #define __LINUX_PM2301_H
25 
26 /**
27  * struct pm2xxx_bm_charger_parameters - Charger specific parameters
28  * @ac_volt_max:	maximum allowed AC charger voltage in mV
29  * @ac_curr_max:	maximum allowed AC charger current in mA
30  */
31 struct pm2xxx_bm_charger_parameters {
32 	int ac_volt_max;
33 	int ac_curr_max;
34 };
35 
36 /**
37  * struct pm2xxx_bm_data - pm2xxx battery management data
38  * @enable_overshoot    flag to enable VBAT overshoot control
39  * @chg_params	  charger parameters
40  */
41 struct pm2xxx_bm_data {
42 	bool enable_overshoot;
43 	const struct pm2xxx_bm_charger_parameters *chg_params;
44 };
45 
46 struct pm2xxx_charger_platform_data {
47 	char **supplied_to;
48 	size_t num_supplicants;
49 	int i2c_bus;
50 	const char *label;
51 	int gpio_irq_number;
52 	unsigned int lpn_gpio;
53 	int irq_type;
54 };
55 
56 struct pm2xxx_platform_data {
57 	struct pm2xxx_charger_platform_data *wall_charger;
58 	struct pm2xxx_bm_data *battery;
59 };
60 
61 #endif /* __LINUX_PM2301_H */
62