![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-or-later */ 0002 /* 0003 * max1586.h -- Voltage regulation for the Maxim 1586 0004 * 0005 * Copyright (C) 2008 Robert Jarzmik 0006 */ 0007 0008 #ifndef REGULATOR_MAX1586 0009 #define REGULATOR_MAX1586 0010 0011 #include <linux/regulator/machine.h> 0012 0013 #define MAX1586_V3 0 0014 #define MAX1586_V6 1 0015 0016 /* precalculated values for v3_gain */ 0017 #define MAX1586_GAIN_NO_R24 1000000 /* 700000 .. 1475000 mV */ 0018 #define MAX1586_GAIN_R24_3k32 1051098 /* 735768 .. 1550369 mV */ 0019 #define MAX1586_GAIN_R24_5k11 1078648 /* 755053 .. 1591005 mV */ 0020 #define MAX1586_GAIN_R24_7k5 1115432 /* 780802 .. 1645262 mV */ 0021 0022 /** 0023 * max1586_subdev_data - regulator data 0024 * @id: regulator Id (either MAX1586_V3 or MAX1586_V6) 0025 * @name: regulator cute name (example for V3: "vcc_core") 0026 * @platform_data: regulator init data (constraints, supplies, ...) 0027 */ 0028 struct max1586_subdev_data { 0029 int id; 0030 const char *name; 0031 struct regulator_init_data *platform_data; 0032 }; 0033 0034 /** 0035 * max1586_platform_data - platform data for max1586 0036 * @num_subdevs: number of regulators used (may be 1 or 2) 0037 * @subdevs: regulator used 0038 * At most, there will be a regulator for V3 and one for V6 voltages. 0039 * @v3_gain: gain on the V3 voltage output multiplied by 1e6. 0040 * This can be calculated as ((1 + R24/R25 + R24/185.5kOhm) * 1e6) 0041 * for an external resistor configuration as described in the 0042 * data sheet (R25=100kOhm). 0043 */ 0044 struct max1586_platform_data { 0045 int num_subdevs; 0046 struct max1586_subdev_data *subdevs; 0047 int v3_gain; 0048 }; 0049 0050 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |