diff options
author | Roger Quadros <ext-roger.quadros@nokia.com> | 2009-08-06 12:37:29 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2009-09-22 08:32:41 -0400 |
commit | 86d9884b6a3646bc24e57430f1f694c5171c1bf6 (patch) | |
tree | 958c38b9538a53ac0a638bce9ebf5faf595e95c3 /include/linux/regulator | |
parent | a6576cff1801e2f1a9f328f02bd4cbcab7b03f91 (diff) |
regulator: Add GPIO enable control to fixed voltage regulator driver
Now fixed regulators that have their enable pin connected to a GPIO line
can use the fixed regulator driver for regulator enable/disable control.
The GPIO number and polarity information is passed through platform data.
GPIO enable control is achieved using gpiolib.
Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Felipe Balbi <felipe.balbi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/fixed.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h index 91b4da31f1b5..e94a4a1c7c8a 100644 --- a/include/linux/regulator/fixed.h +++ b/include/linux/regulator/fixed.h | |||
@@ -5,6 +5,9 @@ | |||
5 | * | 5 | * |
6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> |
7 | * | 7 | * |
8 | * Copyright (c) 2009 Nokia Corporation | ||
9 | * Roger Quadros <ext-roger.quadros@nokia.com> | ||
10 | * | ||
8 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License as | 12 | * modify it under the terms of the GNU General Public License as |
10 | * published by the Free Software Foundation; either version 2 of the | 13 | * published by the Free Software Foundation; either version 2 of the |
@@ -16,9 +19,30 @@ | |||
16 | 19 | ||
17 | struct regulator_init_data; | 20 | struct regulator_init_data; |
18 | 21 | ||
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 | */ | ||
19 | struct fixed_voltage_config { | 40 | struct fixed_voltage_config { |
20 | const char *supply_name; | 41 | const char *supply_name; |
21 | int microvolts; | 42 | int microvolts; |
43 | int gpio; | ||
44 | unsigned enable_high:1; | ||
45 | unsigned enabled_at_boot:1; | ||
22 | struct regulator_init_data *init_data; | 46 | struct regulator_init_data *init_data; |
23 | }; | 47 | }; |
24 | 48 | ||