This is a note to let you know that I've just added the patch titled
gpio-lpc32xx: Fix value handling of gpio_direction_output()
to the 3.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
gpio-lpc32xx-fix-value-handling-of-gpio_direction_output.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From b1268d3737c6316016026245eef276eda6b0a621 Mon Sep 17 00:00:00 2001
From: Roland Stigge <[email protected]>
Date: Thu, 20 Sep 2012 10:48:03 +0200
Subject: gpio-lpc32xx: Fix value handling of gpio_direction_output()
From: Roland Stigge <[email protected]>
commit b1268d3737c6316016026245eef276eda6b0a621 upstream.
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 <[email protected]>
Acked-by: Alexandre Pereira da Silva <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpio/gpio-lpc32xx.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/gpio/gpio-lpc32xx.c
+++ b/drivers/gpio/gpio-lpc32xx.c
@@ -307,6 +307,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;
@@ -317,6 +318,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;
@@ -325,6 +327,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;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.5/gpio-lpc32xx-fix-value-handling-of-gpio_direction_output.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html