Mark Brown | 48d335b | 2008-04-30 15:50:21 +0100 | [diff] [blame] | 1 | /* |
| 2 | * fixed.h |
| 3 | * |
| 4 | * Copyright 2008 Wolfson Microelectronics PLC. |
| 5 | * |
| 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> |
| 7 | * |
Roger Quadros | 86d9884 | 2009-08-06 19:37:29 +0300 | [diff] [blame] | 8 | * Copyright (c) 2009 Nokia Corporation |
| 9 | * Roger Quadros <ext-roger.quadros@nokia.com> |
| 10 | * |
Mark Brown | 48d335b | 2008-04-30 15:50:21 +0100 | [diff] [blame] | 11 | * This program is free software; you can redistribute it and/or |
| 12 | * modify it under the terms of the GNU General Public License as |
| 13 | * published by the Free Software Foundation; either version 2 of the |
| 14 | * License, or (at your option) any later version. |
| 15 | */ |
| 16 | |
| 17 | #ifndef __REGULATOR_FIXED_H |
| 18 | #define __REGULATOR_FIXED_H |
| 19 | |
Mark Brown | bcf3402 | 2009-01-19 13:37:04 +0000 | [diff] [blame] | 20 | struct regulator_init_data; |
| 21 | |
Roger Quadros | 86d9884 | 2009-08-06 19:37:29 +0300 | [diff] [blame] | 22 | /** |
| 23 | * struct fixed_voltage_config - fixed_voltage_config structure |
| 24 | * @supply_name: Name of the regulator supply |
| 25 | * @microvolts: Output voltage of regulator |
| 26 | * @gpio: GPIO to use for enable control |
| 27 | * set to -EINVAL if not used |
| 28 | * @enable_high: Polarity of enable GPIO |
| 29 | * 1 = Active high, 0 = Active low |
| 30 | * @enabled_at_boot: Whether regulator has been enabled at |
| 31 | * boot or not. 1 = Yes, 0 = No |
| 32 | * This is used to keep the regulator at |
| 33 | * the default state |
| 34 | * @init_data: regulator_init_data |
| 35 | * |
| 36 | * This structure contains fixed voltage regulator configuration |
| 37 | * information that must be passed by platform code to the fixed |
| 38 | * voltage regulator driver. |
| 39 | */ |
Mark Brown | 48d335b | 2008-04-30 15:50:21 +0100 | [diff] [blame] | 40 | struct fixed_voltage_config { |
| 41 | const char *supply_name; |
| 42 | int microvolts; |
Roger Quadros | 86d9884 | 2009-08-06 19:37:29 +0300 | [diff] [blame] | 43 | int gpio; |
| 44 | unsigned enable_high:1; |
| 45 | unsigned enabled_at_boot:1; |
Mark Brown | bcf3402 | 2009-01-19 13:37:04 +0000 | [diff] [blame] | 46 | struct regulator_init_data *init_data; |
Mark Brown | 48d335b | 2008-04-30 15:50:21 +0100 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | #endif |