diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2009-05-28 01:15:16 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2009-06-15 06:18:26 -0400 |
commit | b110a8fb242bc34e4b7686252899ce0fca956e2c (patch) | |
tree | 45a07fe5d288d269ddcdad7786bae1efe063cb6d /include | |
parent | 6113c3a5a63b8f0d5613b2a71cd1f5335a37b89a (diff) |
regulator/max1586: support increased V3 voltage range
The V3 regulator can be configured with an external resistor
connected to the feedback pin (R24 in the data sheet) to
increase the voltage range.
For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regulator/max1586.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/regulator/max1586.h b/include/linux/regulator/max1586.h index 2056973396b6..44563192bf16 100644 --- a/include/linux/regulator/max1586.h +++ b/include/linux/regulator/max1586.h | |||
@@ -26,6 +26,12 @@ | |||
26 | #define MAX1586_V3 0 | 26 | #define MAX1586_V3 0 |
27 | #define MAX1586_V6 1 | 27 | #define MAX1586_V6 1 |
28 | 28 | ||
29 | /* precalculated values for v3_gain */ | ||
30 | #define MAX1586_GAIN_NO_R24 1000000 /* 700000 .. 1475000 mV */ | ||
31 | #define MAX1586_GAIN_R24_3k32 1051098 /* 735768 .. 1550369 mV */ | ||
32 | #define MAX1586_GAIN_R24_5k11 1078648 /* 755053 .. 1591005 mV */ | ||
33 | #define MAX1586_GAIN_R24_7k5 1115432 /* 780802 .. 1645262 mV */ | ||
34 | |||
29 | /** | 35 | /** |
30 | * max1586_subdev_data - regulator data | 36 | * max1586_subdev_data - regulator data |
31 | * @id: regulator Id (either MAX1586_V3 or MAX1586_V6) | 37 | * @id: regulator Id (either MAX1586_V3 or MAX1586_V6) |
@@ -43,10 +49,15 @@ struct max1586_subdev_data { | |||
43 | * @num_subdevs: number of regultors used (may be 1 or 2) | 49 | * @num_subdevs: number of regultors used (may be 1 or 2) |
44 | * @subdevs: regulator used | 50 | * @subdevs: regulator used |
45 | * At most, there will be a regulator for V3 and one for V6 voltages. | 51 | * At most, there will be a regulator for V3 and one for V6 voltages. |
52 | * @v3_gain: gain on the V3 voltage output multiplied by 1e6. | ||
53 | * This can be calculated as ((1 + R24/R25 + R24/185.5kOhm) * 1e6) | ||
54 | * for an external resistor configuration as described in the | ||
55 | * data sheet (R25=100kOhm). | ||
46 | */ | 56 | */ |
47 | struct max1586_platform_data { | 57 | struct max1586_platform_data { |
48 | int num_subdevs; | 58 | int num_subdevs; |
49 | struct max1586_subdev_data *subdevs; | 59 | struct max1586_subdev_data *subdevs; |
60 | int v3_gain; | ||
50 | }; | 61 | }; |
51 | 62 | ||
52 | #endif | 63 | #endif |