James Ban | 1028a37 | 2014-07-14 13:48:45 +0900 | [diff] [blame] | 1 | /* |
James Ban | 7524c1c | 2016-06-29 16:49:32 +0900 | [diff] [blame] | 2 | * da9211.h - Regulator device driver for DA9211/DA9212 |
James Ban | 707ce9e | 2017-10-30 11:32:38 +0900 | [diff] [blame] | 3 | * /DA9213/DA9223/DA9214/DA9224/DA9215/DA9225 |
James Ban | 7bd3935 | 2015-06-30 13:39:39 +0900 | [diff] [blame] | 4 | * Copyright (C) 2015 Dialog Semiconductor Ltd. |
James Ban | 1028a37 | 2014-07-14 13:48:45 +0900 | [diff] [blame] | 5 | * |
James Ban | 7bd3935 | 2015-06-30 13:39:39 +0900 | [diff] [blame] | 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version 2 |
| 9 | * of the License, or (at your option) any later version. |
James Ban | 1028a37 | 2014-07-14 13:48:45 +0900 | [diff] [blame] | 10 | * |
James Ban | 7bd3935 | 2015-06-30 13:39:39 +0900 | [diff] [blame] | 11 | * This program is distributed in the hope that it will be useful, |
James Ban | 1028a37 | 2014-07-14 13:48:45 +0900 | [diff] [blame] | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
James Ban | 7bd3935 | 2015-06-30 13:39:39 +0900 | [diff] [blame] | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
James Ban | 1028a37 | 2014-07-14 13:48:45 +0900 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #ifndef __LINUX_REGULATOR_DA9211_H |
| 18 | #define __LINUX_REGULATOR_DA9211_H |
| 19 | |
| 20 | #include <linux/regulator/machine.h> |
| 21 | |
| 22 | #define DA9211_MAX_REGULATORS 2 |
| 23 | |
Linus Walleij | 11da04af | 2018-02-12 14:17:02 +0100 | [diff] [blame] | 24 | struct gpio_desc; |
| 25 | |
James Ban | 005547e | 2014-08-08 14:27:04 +0900 | [diff] [blame] | 26 | enum da9211_chip_id { |
| 27 | DA9211, |
James Ban | 7524c1c | 2016-06-29 16:49:32 +0900 | [diff] [blame] | 28 | DA9212, |
James Ban | 005547e | 2014-08-08 14:27:04 +0900 | [diff] [blame] | 29 | DA9213, |
James Ban | 707ce9e | 2017-10-30 11:32:38 +0900 | [diff] [blame] | 30 | DA9223, |
James Ban | 7524c1c | 2016-06-29 16:49:32 +0900 | [diff] [blame] | 31 | DA9214, |
James Ban | 707ce9e | 2017-10-30 11:32:38 +0900 | [diff] [blame] | 32 | DA9224, |
James Ban | 7bd3935 | 2015-06-30 13:39:39 +0900 | [diff] [blame] | 33 | DA9215, |
James Ban | 707ce9e | 2017-10-30 11:32:38 +0900 | [diff] [blame] | 34 | DA9225, |
James Ban | 005547e | 2014-08-08 14:27:04 +0900 | [diff] [blame] | 35 | }; |
| 36 | |
James Ban | 1028a37 | 2014-07-14 13:48:45 +0900 | [diff] [blame] | 37 | struct da9211_pdata { |
| 38 | /* |
| 39 | * Number of buck |
| 40 | * 1 : 4 phase 1 buck |
| 41 | * 2 : 2 phase 2 buck |
| 42 | */ |
| 43 | int num_buck; |
Linus Walleij | 11da04af | 2018-02-12 14:17:02 +0100 | [diff] [blame] | 44 | struct gpio_desc *gpiod_ren[DA9211_MAX_REGULATORS]; |
James Ban | 076c3b8 | 2015-01-16 12:13:27 +0900 | [diff] [blame] | 45 | struct device_node *reg_node[DA9211_MAX_REGULATORS]; |
James Ban | bf3baca | 2014-08-27 11:47:07 +0900 | [diff] [blame] | 46 | struct regulator_init_data *init_data[DA9211_MAX_REGULATORS]; |
James Ban | 1028a37 | 2014-07-14 13:48:45 +0900 | [diff] [blame] | 47 | }; |
| 48 | #endif |