aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
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 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 */
47struct max1586_platform_data { 57struct 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