Skip to content

Commit

Permalink
gpio: aspeed: fix ast2600 bank properties
Browse files Browse the repository at this point in the history
[ Upstream commit 3e640b1 ]

GPIO_U is mapped to the least significant byte of input/output mask, and
the byte in "output" mask should be 0 because GPIO_U is input only. All
the other bits need to be 1 because GPIO_V/W/X support both input and
output modes.

Similarly, GPIO_Y/Z are mapped to the 2 least significant bytes, and the
according bits need to be 1 because GPIO_Y/Z support both input and
output modes.

Fixes: ab4a855 ("gpio: aspeed: Add in ast2600 details to Aspeed driver")
Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tao-ren authored and gregkh committed Oct 7, 2020
1 parent cf7f698 commit f6ae5ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpio/gpio-aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,8 @@ static const struct aspeed_gpio_config ast2500_config =

static const struct aspeed_bank_props ast2600_bank_props[] = {
/* input output */
{5, 0xffffffff, 0x0000ffff}, /* U/V/W/X */
{6, 0xffff0000, 0x0fff0000}, /* Y/Z */
{5, 0xffffffff, 0xffffff00}, /* U/V/W/X */
{6, 0x0000ffff, 0x0000ffff}, /* Y/Z */
{ },
};

Expand Down

0 comments on commit f6ae5ac

Please sign in to comment.