blob: eac48e4831900ee8986f593bc7a3b01ad324707e [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Geert Uytterhoeven90a38d92012-10-15 22:44:45 +02002/* Copyright (C) 2012 Dialog Semiconductor Ltd.
Ashish Jangam28964342012-09-14 18:54:50 +05303 */
4#ifndef __DA9055_PDATA_H
5#define __DA9055_PDATA_H
6
7#define DA9055_MAX_REGULATORS 8
8
9struct da9055;
Linus Walleij8d055602018-02-12 14:17:00 +010010struct gpio_desc;
Ashish Jangam28964342012-09-14 18:54:50 +053011
12enum gpio_select {
13 NO_GPIO = 0,
14 GPIO_1,
15 GPIO_2
16};
17
18struct 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 Jangamf6130be2012-11-01 13:57:56 +053024 /* 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 Walleij8d055602018-02-12 14:17:00 +010046 /* GPIO descriptors to enable regulator, NULL if not available */
47 struct gpio_desc **ena_gpiods;
Ashish Jangam28964342012-09-14 18:54:50 +053048};
49#endif /* __DA9055_PDATA_H */