aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-05-14 04:06:28 -0400
committerMark Brown <broonie@kernel.org>2018-05-24 11:50:31 -0400
commit2468f0d51548b23507ceb3bba5f4e3acaea117ba (patch)
tree08f177171e5c7ecbaab1bd816fa28acb6d4161a8 /include/linux/mfd
parentb2d751b7f69b352de0280d2279765a9506ed54f0 (diff)
regulator: lp8788-ldo: Pass descriptor instead of GPIO number
Instead of passing a global GPIO number, pass a descriptor looked up with the standard devm_gpiod_get_index_optional() call. This driver has supported passing a LDO enable GPIO for years, yet this facility has never been put to use in the upstream kernel. If someone desires to put in place GPIO control for the LDOs, this can be done by adding a GPIO descriptor table in the MFD nexus in drivers/mfd/lp8788.c for the LDO device when spawning the MFD children, or using a board file. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/lp8788.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/include/linux/mfd/lp8788.h b/include/linux/mfd/lp8788.h
index 786bf6679a28..2010e0de3e34 100644
--- a/include/linux/mfd/lp8788.h
+++ b/include/linux/mfd/lp8788.h
@@ -182,20 +182,6 @@ struct lp8788_buck2_dvs {
182}; 182};
183 183
184/* 184/*
185 * struct lp8788_ldo_enable_pin
186 *
187 * Basically, all LDOs are enabled through the I2C commands.
188 * But ALDO 1 ~ 5, 7, DLDO 7, 9, 11 can be enabled by external gpio pins.
189 *
190 * @gpio : gpio number which is used for enabling ldos
191 * @init_state : initial gpio state (ex. GPIOF_OUT_INIT_LOW)
192 */
193struct lp8788_ldo_enable_pin {
194 int gpio;
195 int init_state;
196};
197
198/*
199 * struct lp8788_chg_param 185 * struct lp8788_chg_param
200 * @addr : charging control register address (range : 0x11 ~ 0x1C) 186 * @addr : charging control register address (range : 0x11 ~ 0x1C)
201 * @val : charging parameter value 187 * @val : charging parameter value
@@ -288,7 +274,6 @@ struct lp8788_vib_platform_data {
288 * @aldo_data : regulator initial data for analog ldo 274 * @aldo_data : regulator initial data for analog ldo
289 * @buck1_dvs : gpio configurations for buck1 dvs 275 * @buck1_dvs : gpio configurations for buck1 dvs
290 * @buck2_dvs : gpio configurations for buck2 dvs 276 * @buck2_dvs : gpio configurations for buck2 dvs
291 * @ldo_pin : gpio configurations for enabling LDOs
292 * @chg_pdata : platform data for charger driver 277 * @chg_pdata : platform data for charger driver
293 * @alarm_sel : rtc alarm selection (1 or 2) 278 * @alarm_sel : rtc alarm selection (1 or 2)
294 * @bl_pdata : configurable data for backlight driver 279 * @bl_pdata : configurable data for backlight driver
@@ -306,7 +291,6 @@ struct lp8788_platform_data {
306 struct regulator_init_data *aldo_data[LP8788_NUM_ALDOS]; 291 struct regulator_init_data *aldo_data[LP8788_NUM_ALDOS];
307 struct lp8788_buck1_dvs *buck1_dvs; 292 struct lp8788_buck1_dvs *buck1_dvs;
308 struct lp8788_buck2_dvs *buck2_dvs; 293 struct lp8788_buck2_dvs *buck2_dvs;
309 struct lp8788_ldo_enable_pin *ldo_pin[EN_LDOS_MAX];
310 294
311 /* charger */ 295 /* charger */
312 struct lp8788_charger_platform_data *chg_pdata; 296 struct lp8788_charger_platform_data *chg_pdata;