mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
f003d732d7
Refreshed all patches. Removed upstreamed: - 031-v5.0-MIPS-BCM47XX-Setup-struct-device-for-the-SoC.patch - 142-jffs2-Fix-use-of-uninitialized-delayed_work-lockdep-.patch Removed upstreamed hunk in: - 800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
From f8ac3d3472a8dc99c8647a637611d146d88be8cb Mon Sep 17 00:00:00 2001
|
|
From: Linus Walleij <linus.walleij@linaro.org>
|
|
Date: Tue, 9 Oct 2018 10:09:14 +0200
|
|
Subject: [PATCH 01/18] pinctrl: gemini: Mask and set properly
|
|
|
|
The code was written under the assumption that the
|
|
regmap_update_bits() would mask the bits in the mask and
|
|
set the bits in the value.
|
|
|
|
It missed the points that it will not set bits in the value
|
|
unless these are also masked in the mask. Set value bits
|
|
that are not in the mask will simply be ignored.
|
|
|
|
Fixes: 06351d133dea ("pinctrl: add a Gemini SoC pin controller")
|
|
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
|
---
|
|
drivers/pinctrl/pinctrl-gemini.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/pinctrl/pinctrl-gemini.c
|
|
+++ b/drivers/pinctrl/pinctrl-gemini.c
|
|
@@ -2184,7 +2184,8 @@ static int gemini_pmx_set_mux(struct pin
|
|
func->name, grp->name);
|
|
|
|
regmap_read(pmx->map, GLOBAL_MISC_CTRL, &before);
|
|
- regmap_update_bits(pmx->map, GLOBAL_MISC_CTRL, grp->mask,
|
|
+ regmap_update_bits(pmx->map, GLOBAL_MISC_CTRL,
|
|
+ grp->mask | grp->value,
|
|
grp->value);
|
|
regmap_read(pmx->map, GLOBAL_MISC_CTRL, &after);
|
|
|