summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0027-gpiolib-wm8994-Pay-attention-to-the-value-set-when-e.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0027-gpiolib-wm8994-Pay-attention-to-the-value-set-when-e.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0027-gpiolib-wm8994-Pay-attention-to-the-value-set-when-e.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0027-gpiolib-wm8994-Pay-attention-to-the-value-set-when-e.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0027-gpiolib-wm8994-Pay-attention-to-the-value-set-when-e.patch
new file mode 100644
index 00000000..706d9892
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0027-gpiolib-wm8994-Pay-attention-to-the-value-set-when-e.patch
@@ -0,0 +1,40 @@
1From 5cdc2897a0bb7b11585d5b14eb3f2faa1505348c Mon Sep 17 00:00:00 2001
2From: Mark Brown <broonie@opensource.wolfsonmicro.com>
3Date: Sat, 9 Jun 2012 11:07:56 +0800
4Subject: [PATCH 027/109] gpiolib: wm8994: Pay attention to the value set when
5 enabling as output
6
7commit 8cd578b6e28693f357867a77598a88ef3deb6b39 upstream.
8
9Not paying attention to the value being set is a bad thing because it
10means that we'll not set the hardware up to reflect what was requested.
11Not setting the hardware up to reflect what was requested means that the
12caller won't get the results they wanted.
13
14Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
16Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17---
18 drivers/gpio/gpio-wm8994.c | 5 ++++-
19 1 files changed, 4 insertions(+), 1 deletions(-)
20
21diff --git a/drivers/gpio/gpio-wm8994.c b/drivers/gpio/gpio-wm8994.c
22index 96198f3..a2da8f2 100644
23--- a/drivers/gpio/gpio-wm8994.c
24+++ b/drivers/gpio/gpio-wm8994.c
25@@ -89,8 +89,11 @@ static int wm8994_gpio_direction_out(struct gpio_chip *chip,
26 struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
27 struct wm8994 *wm8994 = wm8994_gpio->wm8994;
28
29+ if (value)
30+ value = WM8994_GPN_LVL;
31+
32 return wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset,
33- WM8994_GPN_DIR, 0);
34+ WM8994_GPN_DIR | WM8994_GPN_LVL, value);
35 }
36
37 static void wm8994_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
38--
391.7.7.6
40