diff mbox series

gpio: aspeed: fix ast2600 bank properties

Message ID 20201019045026.10732-1-billy_tsai@aspeedtech.com
State Accepted
Commit 560b6ac37a87fcb78d580437e3e0bc2b6b5b0295
Headers show
Series gpio: aspeed: fix ast2600 bank properties | expand

Commit Message

Billy Tsai Oct. 19, 2020, 4:50 a.m. UTC
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.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
 drivers/gpio/gpio-aspeed.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tao Ren Oct. 19, 2020, 5:33 a.m. UTC | #1
Hi Billy,

On Mon, Oct 19, 2020 at 12:50:26PM +0800, Billy Tsai wrote:
> 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.

> 

> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>


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 | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c

> index d07bf2c3f136..f24754b3f6d1 100644

> --- a/drivers/gpio/gpio-aspeed.c

> +++ b/drivers/gpio/gpio-aspeed.c

> @@ -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 */


Reviewed-by: Tao Ren <rentao.bupt@gmail.com>


>  	{5, 0xffffffff,  0xffffff00}, /* U/V/W/X */

>  	{6, 0x0000ffff,  0x0000ffff}, /* Y/Z */

>  	{ },

> -- 

> 2.17.1

> 


Cheers,

Tao
Joel Stanley Oct. 19, 2020, 7:29 a.m. UTC | #2
Hi Billy,

On Mon, 19 Oct 2020 at 04:50, Billy Tsai <billy_tsai@aspeedtech.com> wrote:
>
> 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.
>
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>

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.

Reviewed-by: Joel Stanley <joel@jms.id.au>
Fixes: ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver")

Cheers,

Joel




> ---
>  drivers/gpio/gpio-aspeed.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
> index d07bf2c3f136..f24754b3f6d1 100644
> --- a/drivers/gpio/gpio-aspeed.c
> +++ b/drivers/gpio/gpio-aspeed.c
> @@ -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
>
Andrew Jeffery Oct. 21, 2020, 11:38 p.m. UTC | #3
On Mon, 19 Oct 2020, at 15:20, Billy Tsai wrote:
> 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.
> 
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>

Good catch, thanks Billy.

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Bartosz Golaszewski Oct. 26, 2020, 2:53 p.m. UTC | #4
On Mon, Oct 19, 2020 at 6:50 AM Billy Tsai <billy_tsai@aspeedtech.com> wrote:
>
> 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.
>
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
> ---
>  drivers/gpio/gpio-aspeed.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
> index d07bf2c3f136..f24754b3f6d1 100644
> --- a/drivers/gpio/gpio-aspeed.c
> +++ b/drivers/gpio/gpio-aspeed.c
> @@ -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
>

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

Bartosz
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index d07bf2c3f136..f24754b3f6d1 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -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 */
 	{ },