* [PATCH] gpio-lpc32xx: Fix value handling of gpio_direction_output()
@ 2012-09-20 8:48 Roland Stigge
2012-09-20 13:13 ` Alexandre Pereira da Silva
2012-09-24 19:55 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Roland Stigge @ 2012-09-20 8:48 UTC (permalink / raw)
To: grant.likely, linus.walleij, linux-kernel, linux-arm-kernel,
aletes.xgr, kevin.wells, srinivas.bakki
Cc: Roland Stigge
For GPIOs of gpio-lpc32xx, gpio_direction_output() ignores the value argument
(initial value of output). This patch fixes this by setting the level
accordingly.
Signed-off-by: Roland Stigge <stigge@antcom.de>
---
Applies to v3.6-rc6
drivers/gpio/gpio-lpc32xx.c | 5 +++++
1 file changed, 5 insertions(+)
--- linux-2.6.orig/drivers/gpio/gpio-lpc32xx.c
+++ linux-2.6/drivers/gpio/gpio-lpc32xx.c
@@ -308,6 +308,7 @@ static int lpc32xx_gpio_dir_output_p012(
{
struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip);
+ __set_gpio_level_p012(group, pin, value);
__set_gpio_dir_p012(group, pin, 0);
return 0;
@@ -318,6 +319,7 @@ static int lpc32xx_gpio_dir_output_p3(st
{
struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip);
+ __set_gpio_level_p3(group, pin, value);
__set_gpio_dir_p3(group, pin, 0);
return 0;
@@ -326,6 +328,9 @@ static int lpc32xx_gpio_dir_output_p3(st
static int lpc32xx_gpio_dir_out_always(struct gpio_chip *chip, unsigned pin,
int value)
{
+ struct lpc32xx_gpio_chip *group = to_lpc32xx_gpio(chip);
+
+ __set_gpo_level_p3(group, pin, value);
return 0;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio-lpc32xx: Fix value handling of gpio_direction_output()
2012-09-20 8:48 [PATCH] gpio-lpc32xx: Fix value handling of gpio_direction_output() Roland Stigge
@ 2012-09-20 13:13 ` Alexandre Pereira da Silva
2012-09-24 19:55 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Pereira da Silva @ 2012-09-20 13:13 UTC (permalink / raw)
To: Roland Stigge
Cc: grant.likely, linus.walleij, linux-kernel, linux-arm-kernel,
kevin.wells, srinivas.bakki
On Thu, Sep 20, 2012 at 5:48 AM, Roland Stigge <stigge@antcom.de> wrote:
> For GPIOs of gpio-lpc32xx, gpio_direction_output() ignores the value argument
> (initial value of output). This patch fixes this by setting the level
> accordingly.
>
> Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Nice catch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio-lpc32xx: Fix value handling of gpio_direction_output()
2012-09-20 8:48 [PATCH] gpio-lpc32xx: Fix value handling of gpio_direction_output() Roland Stigge
2012-09-20 13:13 ` Alexandre Pereira da Silva
@ 2012-09-24 19:55 ` Linus Walleij
2012-09-24 20:03 ` Roland Stigge
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2012-09-24 19:55 UTC (permalink / raw)
To: Roland Stigge
Cc: grant.likely, linux-kernel, linux-arm-kernel, aletes.xgr,
kevin.wells, srinivas.bakki
On Thu, Sep 20, 2012 at 10:48 AM, Roland Stigge <stigge@antcom.de> wrote:
> For GPIOs of gpio-lpc32xx, gpio_direction_output() ignores the value argument
> (initial value of output). This patch fixes this by setting the level
> accordingly.
>
> Signed-off-by: Roland Stigge <stigge@antcom.de>
Applied with Alexandre's ACK, should go into stable right?
So tagging this with Cc: stable and sending for the -rc:s.
Thanks,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio-lpc32xx: Fix value handling of gpio_direction_output()
2012-09-24 19:55 ` Linus Walleij
@ 2012-09-24 20:03 ` Roland Stigge
0 siblings, 0 replies; 4+ messages in thread
From: Roland Stigge @ 2012-09-24 20:03 UTC (permalink / raw)
To: Linus Walleij
Cc: grant.likely, linux-kernel, linux-arm-kernel, aletes.xgr,
kevin.wells, srinivas.bakki
On 24/09/12 21:55, Linus Walleij wrote:
>> For GPIOs of gpio-lpc32xx, gpio_direction_output() ignores the value argument
>> (initial value of output). This patch fixes this by setting the level
>> accordingly.
>>
>> Signed-off-by: Roland Stigge<stigge@antcom.de>
>
> Applied with Alexandre's ACK, should go into stable right?
> So tagging this with Cc: stable and sending for the -rc:s.
Right, thanks!
Roland
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-24 20:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-20 8:48 [PATCH] gpio-lpc32xx: Fix value handling of gpio_direction_output() Roland Stigge
2012-09-20 13:13 ` Alexandre Pereira da Silva
2012-09-24 19:55 ` Linus Walleij
2012-09-24 20:03 ` Roland Stigge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).