Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef __MSM_GPIO_REGULATOR_H__ |
| 14 | #define __MSM_GPIO_REGULATOR_H__ |
| 15 | |
| 16 | #include <linux/regulator/machine.h> |
| 17 | |
| 18 | #define GPIO_REGULATOR_DEV_NAME "msm-gpio-regulator" |
| 19 | |
| 20 | /** |
| 21 | * struct gpio_regulator_platform_data - GPIO regulator platform data |
| 22 | * @init_data: regulator constraints |
| 23 | * @gpio_label: label to use when requesting the GPIO |
| 24 | * @regulator_name: name for regulator used during registration |
| 25 | * @gpio: gpio number |
| 26 | * @active_low: 0 = regulator is enabled when GPIO outputs high |
| 27 | * 1 = regulator is enabled when GPIO outputs low |
| 28 | */ |
| 29 | struct gpio_regulator_platform_data { |
| 30 | struct regulator_init_data init_data; |
| 31 | char *gpio_label; |
| 32 | char *regulator_name; |
| 33 | unsigned gpio; |
| 34 | int active_low; |
| 35 | }; |
| 36 | |
| 37 | #endif |