Skip to contentSkip to conversation

gpio: aspeed: fix ast2600 bank properties

PATCH Applied Billy Tsai 5 participants 5 messages Oct 19, 2020 – Oct 26, 2020

Subsystems (2)
lore
Share & tools
lore

Billy Tsai

author reviewer
#0 lore raw

PATCH 1/1 gpio: aspeed: fix ast2600 bank properties

GPIO_T is mapped to the most significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_T is input only. All the other bits need to be 1 because GPIO_Q/R/S support both input and output modes.

---
 drivers/gpio/gpio-aspeed.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-aspeed.c +1 -0
index d07bf2c3f136..f24754b3f6d1 100644
@@ -1114,6 +1114,7 @@ static const struct aspeed_gpio_config ast2500_config =
 
 static const struct aspeed_bank_props ast2600_bank_props[] = {
 	/*     input	  output   */
+	{4, 0xffffffff,  0x00ffffff}, /* Q/R/S/T */
 	{5, 0xffffffff,  0xffffff00}, /* U/V/W/X */
 	{6, 0x0000ffff,  0x0000ffff}, /* Y/Z */
 	{ },
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Billy,

Quoted 6 lines · Billy Tsai

GPIO_T is mapped to the most significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_T is input only. All the other bits need to be 1 because GPIO_Q/R/S support both input and output modes.

You may want to add "Fixes" tag if you take it as a bug fix? For example:

Fixes ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver")

drivers/gpio/gpio-aspeed.c static const struct aspeed_gpio_config ast2500_config = · line 1117

Quoted 13 lines
---
 drivers/gpio/gpio-aspeed.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-aspeed.c +1 -0
index d07bf2c3f136..f24754b3f6d1 100644
@@ -1114,6 +1114,7 @@ static const struct aspeed_gpio_config ast2500_config =
 
 static const struct aspeed_bank_props ast2600_bank_props[] = {
 	/*     input	  output   */
+	{4, 0xffffffff,  0x00ffffff}, /* Q/R/S/T */
Quoted 6 lines
drivers/gpio/gpio-aspeed.c +0 -0
 	{5, 0xffffffff,  0xffffff00}, /* U/V/W/X */
 	{6, 0x0000ffff,  0x0000ffff}, /* Y/Z */
 	{ },
Signature · 1 line
2.17.1

Cheers,

Tao

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Billy Tsai

Hi Billy,

Quoted 7 lines · Billy Tsai

GPIO_T is mapped to the most significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_T is input only. All the other bits need to be 1 because GPIO_Q/R/S support both input and output modes.

This is a very similar commit message to the one that Tao sent out, so I thought for a moment that it was a duplicate patch. I can see now that it's a different change.

Fixes ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver")

Cheers,

Joel

Quoted 19 lines
---
 drivers/gpio/gpio-aspeed.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-aspeed.c +1 -1
index d07bf2c3f136..f24754b3f6d1 100644
@@ -1114,6 +1114,7 @@ static const struct aspeed_gpio_config ast2500_config =
 
 static const struct aspeed_bank_props ast2600_bank_props[] = {
        /*     input      output   */
+       {4, 0xffffffff,  0x00ffffff}, /* Q/R/S/T */
        {5, 0xffffffff,  0xffffff00}, /* U/V/W/X */
        {6, 0x0000ffff,  0x0000ffff}, /* Y/Z */
        { },
--

2.17.1

#4 lore raw
In reply to Billy Tsai
Quoted 24 lines · Billy Tsai

GPIO_T is mapped to the most significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_T is input only. All the other bits need to be 1 because GPIO_Q/R/S support both input and output modes.

---
 drivers/gpio/gpio-aspeed.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-aspeed.c +1 -1
index d07bf2c3f136..f24754b3f6d1 100644
@@ -1114,6 +1114,7 @@ static const struct aspeed_gpio_config ast2500_config =
 
 static const struct aspeed_bank_props ast2600_bank_props[] = {
        /*     input      output   */
+       {4, 0xffffffff,  0x00ffffff}, /* Q/R/S/T */
        {5, 0xffffffff,  0xffffff00}, /* U/V/W/X */
        {6, 0x0000ffff,  0x0000ffff}, /* Y/Z */
        { },
--
Quoted 2 lines

2.17.1

Applied to fixes with reviews collected and added the Fixes: tag.

Bartosz