diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2014-11-03 19:12:04 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-07 11:30:25 +0000 |
commit | 1de3821ace8200432993821bfda043827029de2a (patch) | |
tree | 0cbde00f92a160441e1d9928cbbc26e856d0b371 /drivers/regulator/max8952.c | |
parent | 76f439df50aba1838e06dd01e5f20dada7473f57 (diff) |
regulator: Set ena_gpio_initialized in regulator drivers
This patch sets ena_gpio_initialized for all drivers which set a
ena_gpio from parsed DT properties. Drivers using pdata may get zero
initialized pdata and therefore copy a 0 into the regulator_config
ena_gpio field.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/max8952.c')
-rw-r--r-- | drivers/regulator/max8952.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index f7f9efcfedb7..dec57fb9cd1c 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -225,6 +225,8 @@ static int max8952_pmic_probe(struct i2c_client *client, config.of_node = client->dev.of_node; config.ena_gpio = pdata->gpio_en; + if (client->dev.of_node) + config.ena_gpio_initialized = true; if (pdata->reg_data->constraints.boot_on) config.ena_gpio_flags |= GPIOF_OUT_INIT_HIGH; |