Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Geert Uytterhoeven | 90a38d9 | 2012-10-15 22:44:45 +0200 | [diff] [blame] | 2 | /* Copyright (C) 2012 Dialog Semiconductor Ltd. |
Ashish Jangam | 2896434 | 2012-09-14 18:54:50 +0530 | [diff] [blame] | 3 | */ |
| 4 | #ifndef __DA9055_PDATA_H |
| 5 | #define __DA9055_PDATA_H |
| 6 | |
| 7 | #define DA9055_MAX_REGULATORS 8 |
| 8 | |
| 9 | struct da9055; |
Linus Walleij | 8d05560 | 2018-02-12 14:17:00 +0100 | [diff] [blame] | 10 | struct gpio_desc; |
Ashish Jangam | 2896434 | 2012-09-14 18:54:50 +0530 | [diff] [blame] | 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]; |
Ashish Jangam | f6130be | 2012-11-01 13:57:56 +0530 | [diff] [blame] | 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 | * that 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; |
Linus Walleij | 8d05560 | 2018-02-12 14:17:00 +0100 | [diff] [blame] | 46 | /* GPIO descriptors to enable regulator, NULL if not available */ |
| 47 | struct gpio_desc **ena_gpiods; |
Ashish Jangam | 2896434 | 2012-09-14 18:54:50 +0530 | [diff] [blame] | 48 | }; |
| 49 | #endif /* __DA9055_PDATA_H */ |