xref: /openbmc/linux/include/linux/mfd/da9055/pdata.h (revision 23ef2b64)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Copyright (C) 2012 Dialog Semiconductor Ltd.
3  */
4 #ifndef __DA9055_PDATA_H
5 #define __DA9055_PDATA_H
6 
7 #define DA9055_MAX_REGULATORS	8
8 
9 struct da9055;
10 struct gpio_desc;
11 
12 enum gpio_select {
13 	NO_GPIO = 0,
14 	GPIO_1,
15 	GPIO_2
16 };
17 
18 struct da9055_pdata {
19 	int (*init) (struct da9055 *da9055);
20 	int irq_base;
21 	int gpio_base;
22 
23 	struct regulator_init_data *regulators[DA9055_MAX_REGULATORS];
24 	/* Enable RTC in RESET Mode */
25 	bool reset_enable;
26 	/*
27 	 * GPI muxed pin to control
28 	 * regulator state A/B, 0 if not available.
29 	 */
30 	int *gpio_ren;
31 	/*
32 	 * GPI muxed pin to control
33 	 * regulator set, 0 if not available.
34 	 */
35 	int *gpio_rsel;
36 	/*
37 	 * Regulator mode control bits value (GPI offset) that
38 	 * controls the regulator state, 0 if not available.
39 	 */
40 	enum gpio_select *reg_ren;
41 	/*
42 	 * Regulator mode control bits value (GPI offset) that
43 	 * controls the regulator set A/B, 0 if  not available.
44 	 */
45 	enum gpio_select *reg_rsel;
46 	/* GPIO descriptors to enable regulator, NULL if not available */
47 	struct gpio_desc **ena_gpiods;
48 };
49 #endif /* __DA9055_PDATA_H */
50