summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/qcom
diff options
context:
space:
mode:
authorRichard Acayan <mailingradian@gmail.com>2022-10-13 20:19:33 -0400
committerLinus Walleij <linus.walleij@linaro.org>2022-10-17 11:27:28 +0200
commitf764b84848e81508d65bac69c77ed2ed165eb511 (patch)
tree93263238c2c0075c88feed44e3e74f5ed19a3f32 /drivers/pinctrl/qcom
parent5887bc1ced74a46f457634466b92f45b1ab03083 (diff)
downloadlinux-f764b84848e81508d65bac69c77ed2ed165eb511.tar.bz2
pinctrl: qcom: do not reinitialize gpio valid mask
It may be necessary for some devices to specify reserved gpios in the device-specific DTS, in addition to the reserved gpios common to all devices with a given SoC. Remove this bitmap_fill() call so that the settings applied to the gpio valid mask by DTS are not overridden by the driver's reserved gpios. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20221014001934.4995-3-mailingradian@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/qcom')
-rw-r--r--drivers/pinctrl/qcom/pinctrl-msm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index a2abfe987ab1..c5c9e588fb13 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -687,9 +687,8 @@ static int msm_gpio_init_valid_mask(struct gpio_chip *gc,
const int *reserved = pctrl->soc->reserved_gpios;
u16 *tmp;
- /* Driver provided reserved list overrides DT and ACPI */
+ /* Remove driver-provided reserved GPIOs from valid_mask */
if (reserved) {
- bitmap_fill(valid_mask, ngpios);
for (i = 0; reserved[i] >= 0; i++) {
if (i >= ngpios || reserved[i] >= ngpios) {
dev_err(pctrl->dev, "invalid list of reserved GPIOs\n");