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