aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2009-05-28 07:15:16 +0200
committerLiam Girdwood <lrg@slimlogic.co.uk>2009-06-15 11:18:26 +0100
commitb110a8fb242bc34e4b7686252899ce0fca956e2c (patch)
tree45a07fe5d288d269ddcdad7786bae1efe063cb6d /include/linux/regulator
parent6113c3a5a63b8f0d5613b2a71cd1f5335a37b89a (diff)
downloadkernel_samsung_smdk4412-b110a8fb242bc34e4b7686252899ce0fca956e2c.zip
kernel_samsung_smdk4412-b110a8fb242bc34e4b7686252899ce0fca956e2c.tar.gz
kernel_samsung_smdk4412-b110a8fb242bc34e4b7686252899ce0fca956e2c.tar.bz2
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/linux/regulator')
-rw-r--r--include/linux/regulator/max1586.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/regulator/max1586.h b/include/linux/regulator/max1586.h
index 2056973..4456319 100644
--- a/include/linux/regulator/max1586.h
+++ b/include/linux/regulator/max1586.h
@@ -26,6 +26,12 @@
#define MAX1586_V3 0
#define MAX1586_V6 1
+/* precalculated values for v3_gain */
+#define MAX1586_GAIN_NO_R24 1000000 /* 700000 .. 1475000 mV */
+#define MAX1586_GAIN_R24_3k32 1051098 /* 735768 .. 1550369 mV */
+#define MAX1586_GAIN_R24_5k11 1078648 /* 755053 .. 1591005 mV */
+#define MAX1586_GAIN_R24_7k5 1115432 /* 780802 .. 1645262 mV */
+
/**
* max1586_subdev_data - regulator data
* @id: regulator Id (either MAX1586_V3 or MAX1586_V6)
@@ -43,10 +49,15 @@ struct max1586_subdev_data {
* @num_subdevs: number of regultors used (may be 1 or 2)
* @subdevs: regulator used
* At most, there will be a regulator for V3 and one for V6 voltages.
+ * @v3_gain: gain on the V3 voltage output multiplied by 1e6.
+ * This can be calculated as ((1 + R24/R25 + R24/185.5kOhm) * 1e6)
+ * for an external resistor configuration as described in the
+ * data sheet (R25=100kOhm).
*/
struct max1586_platform_data {
int num_subdevs;
struct max1586_subdev_data *subdevs;
+ int v3_gain;
};
#endif