Skip to content

Commit

Permalink
pinctrl: aspeed: Use the right pinconf mask
Browse files Browse the repository at this point in the history
[ Upstream commit 1d6db5a ]

The Aspeed pinconf data structures are split into 'conf' and 'map'
types, where the 'conf' struct defines which register and bitfield to
manipulate, while the 'map' struct defines what value to write to
the register and bitfield.

Both structs have a mask member, and the wrong mask was being used to
tell the regmap which bits to update.

A todo is to look at whether we can remove the mask from the 'map'
struct.

Fixes: 5f52c85 ("pinctrl: aspeed: Use masks to describe pinconf bitfields")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Cc: Johnny Huang <johnny_huang@aspeedtech.com>
Link: https://lore.kernel.org/r/20200910025631.2996342-3-andrew@aj.id.au
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
amboar authored and gregkh committed Oct 29, 2020
1 parent a30a515 commit a13766e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/aspeed/pinctrl-aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ int aspeed_pin_config_set(struct pinctrl_dev *pctldev, unsigned int offset,
val = pmap->val << __ffs(pconf->mask);

rc = regmap_update_bits(pdata->scu, pconf->reg,
pmap->mask, val);
pconf->mask, val);

if (rc < 0)
return rc;
Expand Down

0 comments on commit a13766e

Please sign in to comment.