mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
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: 06351d133d
("pinctrl: add a Gemini SoC pin controller")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
71a9d395aa
commit
d17f477c5b
@ -2184,7 +2184,8 @@ static int gemini_pmx_set_mux(struct pinctrl_dev *pctldev,
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user