M28: Fix OB1 bug in GPIO driver
Subsystems (2)
PATCH 1/1 M28: Fix OB1 bug in GPIO driver
This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has.
drivers/gpio/mxs_gpio.c +1 -1
@@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)int gpio_request (int gp,const char *label) { -if (PAD_BANK (gp) >PINCTRL_BANKS ) +if (PAD_BANK (gp) >=PINCTRL_BANKS )return -EINVAL ;return 0 ;
PATCH 1/1 M28: Fix OB1 bug in GPIO driver
Quoted 11 lines
This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has.
Signed-off-by Robert Deli?n <[email protected]>drivers/gpio/mxs_gpio.c +0
-0
drivers/gpio/mxs_gpio.c int gpio_direction_output(int gp, int value) · line 126
Quoted 8 lines
drivers/gpio/mxs_gpio.c +1
-1@@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)int gpio_request (int gp,const char *label) { -if (PAD_BANK (gp) >PINCTRL_BANKS ) +if (PAD_BANK (gp) >=PINCTRL_BANKS )return -EINVAL ;return 0 ;
Good catch, I'll verify and ack afterwards.
Thanks
M
PATCH 1/1 M28: Fix OB1 bug in GPIO driver
In reply to Robert DeliënQuoted 11 lines
This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has.
Signed-off-by Robert Deli?n <[email protected]>drivers/gpio/mxs_gpio.c +0
-0
drivers/gpio/mxs_gpio.c int gpio_direction_output(int gp, int value) · line 126
Quoted 8 lines
drivers/gpio/mxs_gpio.c +1
-1@@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)int gpio_request (int gp,const char *label) { -if (PAD_BANK (gp) >PINCTRL_BANKS ) +if (PAD_BANK (gp) >=PINCTRL_BANKS )return -EINVAL ;return 0 ;
I'd like to see Stefano review this too.
M
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 M28: Fix OB1 bug in GPIO driver
Quoted 5 lines
Quoted 3 lines
Sure, I wrote the code, I know what it does and where you see the problem. It's just to be dead sure. Anyway, I acked it so it means I agree with the change.
Of course. Thanks. Hence my elaboration, to make your checks easier.
Please, ALWAYS Cc the mailing list
PATCH 1/1 M28: Fix OB1 bug in GPIO driver
In reply to Robert DeliënQuoted 11 lines
This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has.
Signed-off-by Robert Deli?n <[email protected]>drivers/gpio/mxs_gpio.c +0
-0
drivers/gpio/mxs_gpio.c int gpio_direction_output(int gp, int value) · line 126
Quoted 8 lines
drivers/gpio/mxs_gpio.c +1
-1@@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)int gpio_request (int gp,const char *label) { -if (PAD_BANK (gp) >PINCTRL_BANKS ) +if (PAD_BANK (gp) >=PINCTRL_BANKS )return -EINVAL ;return 0 ;
Stefano, can you please apply ?
PATCH 1/1 M28: Fix OB1 bug in GPIO driver
In reply to Robert DeliënQuoted 10 lines · Robert Deli?n
This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has.
Signed-off-by Robert Deli?n <[email protected]>drivers/gpio/mxs_gpio.c +0
-0
drivers/gpio/mxs_gpio.c int gpio_direction_output(int gp, int value) · line 126
Quoted 8 lines
drivers/gpio/mxs_gpio.c +1
-1@@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)int gpio_request (int gp,const char *label) { -if (PAD_BANK (gp) >PINCTRL_BANKS ) +if (PAD_BANK (gp) >=PINCTRL_BANKS )return -EINVAL ;return 0 ;
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================