diff options
author | Mark Brown <broonie@kernel.org> | 2019-03-04 18:32:43 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-04 18:32:43 +0300 |
commit | 88f268a5bcc3b0683e6fbaf9973702e5329fc1e3 (patch) | |
tree | a64bf49e575ece017359ba5ac89fbc52efd81f2a /drivers/regulator/fixed.c | |
parent | c364098fe8745b08a491fb43de785806ca91ba5e (diff) | |
parent | e5680c4de3eb3ea5538d11733a91ccef19badd69 (diff) | |
download | linux-88f268a5bcc3b0683e6fbaf9973702e5329fc1e3.tar.xz |
Merge branch 'regulator-5.1' into regulator-next
Diffstat (limited to 'drivers/regulator/fixed.c')
-rw-r--r-- | drivers/regulator/fixed.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 9abdb9130766..b5afc9db2c61 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -79,15 +79,6 @@ of_get_fixed_voltage_config(struct device *dev, of_property_read_u32(np, "startup-delay-us", &config->startup_delay); - /* - * FIXME: we pulled active low/high and open drain handling into - * gpiolib so it will be handled there. Delete this in the second - * step when we also remove the custom inversion handling for all - * legacy boardfiles. - */ - config->enable_high = 1; - config->gpio_is_open_drain = 0; - if (of_find_property(np, "vin-supply", NULL)) config->input_supply = "vin"; @@ -151,24 +142,14 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) drvdata->desc.fixed_uV = config->microvolts; - cfg.ena_gpio_invert = !config->enable_high; - if (config->enabled_at_boot) { - if (config->enable_high) - gflags = GPIOD_OUT_HIGH; - else - gflags = GPIOD_OUT_LOW; - } else { - if (config->enable_high) - gflags = GPIOD_OUT_LOW; - else - gflags = GPIOD_OUT_HIGH; - } - if (config->gpio_is_open_drain) { - if (gflags == GPIOD_OUT_HIGH) - gflags = GPIOD_OUT_HIGH_OPEN_DRAIN; - else - gflags = GPIOD_OUT_LOW_OPEN_DRAIN; - } + /* + * The signal will be inverted by the GPIO core if flagged so in the + * decriptor. + */ + if (config->enabled_at_boot) + gflags = GPIOD_OUT_HIGH; + else + gflags = GPIOD_OUT_LOW; /* * Some fixed regulators share the enable line between two |