[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20181002145903.5DA961121A41@debutante.sirena.org.uk>
Date: Tue, 2 Oct 2018 15:59:03 +0100 (BST)
From: Mark Brown <broonie@...nel.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Leonard Crestez <leonard.crestez@....com>,
Fabio Estevam <festevam@...il.com>,
John Stultz <john.stultz@...aro.org>,
Anders Roxell <anders.roxell@...aro.org>,
John Stultz <john.stultz@...aro.org>,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org
Subject: Applied "regulator: fixed: Default enable high on DT regulators" to the regulator tree
The patch
regulator: fixed: Default enable high on DT regulators
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 28be5f15df2ee6882b0a122693159c96a28203c7 Mon Sep 17 00:00:00 2001
From: Linus Walleij <linus.walleij@...aro.org>
Date: Mon, 1 Oct 2018 22:43:46 +0200
Subject: [PATCH] regulator: fixed: Default enable high on DT regulators
commit efdfeb079cc3
("regulator: fixed: Convert to use GPIO descriptor only")
switched to use gpiod_get() to look up the regulator from the
gpiolib core whether that is device tree or boardfile.
This meant that we activate the code in
a603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags")
which means the descriptors coming from the device tree already
have the right inversion and open drain semantics set up from
the gpiolib core.
As the fixed regulator was inspected again we got the
inverted inversion and things broke.
Fix it by ignoring the config in the device tree for now: the
later patches in the series will push all inversion handling
over to the gpiolib core and set it up properly in the
boardfiles for legacy devices, but I did not finish that
for this kernel cycle.
Fixes: commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only")
Reported-by: Leonard Crestez <leonard.crestez@....com>
Reported-by: Fabio Estevam <festevam@...il.com>
Reported-by: John Stultz <john.stultz@...aro.org>
Reported-by: Anders Roxell <anders.roxell@...aro.org>
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
Tested-by: John Stultz <john.stultz@...aro.org>
Signed-off-by: Mark Brown <broonie@...nel.org>
---
drivers/regulator/fixed.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 1142f195529b..7d639ad953b6 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -79,9 +79,14 @@ of_get_fixed_voltage_config(struct device *dev,
of_property_read_u32(np, "startup-delay-us", &config->startup_delay);
- config->enable_high = of_property_read_bool(np, "enable-active-high");
- config->gpio_is_open_drain = of_property_read_bool(np,
- "gpio-open-drain");
+ /*
+ * 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";
--
2.19.0.rc2
Powered by blists - more mailing lists