* [PATCH RESEND] pinctrl: bcm2835: Fix initial value for direction_output
@ 2015-12-07 18:10 ` Stefan Wahren
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Wahren @ 2015-12-07 18:10 UTC (permalink / raw)
To: Linus Walleij, Stephen Warren, Lee Jones, Eric Anholt
Cc: linux-gpio, linux-rpi-kernel, linux-arm-kernel, Stefan Wahren
Currently the provided initial value for bcm2835_gpio_direction_output
has no effect. So fix this issue by changing the value before
changing the GPIO direction. As a result we need to move the function below
bcm2835_gpio_set.
Suggested-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: e1b2dc70cd5b ("pinctrl: add bcm2835 driver")
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Eric Anholt <eric@anholt.net>
---
This patch was inspired by this discussion [1].
[1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2015-April/001499.html
Changes:
- added suggested-by, fixes and acked-by tag since first submit
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 8efa235..fd1441b 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -352,12 +352,6 @@ static int bcm2835_gpio_get(struct gpio_chip *chip, unsigned offset)
return bcm2835_gpio_get_bit(pc, GPLEV0, offset);
}
-static int bcm2835_gpio_direction_output(struct gpio_chip *chip,
- unsigned offset, int value)
-{
- return pinctrl_gpio_direction_output(chip->base + offset);
-}
-
static void bcm2835_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
{
struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->dev);
@@ -365,6 +359,13 @@ static void bcm2835_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
bcm2835_gpio_set_bit(pc, value ? GPSET0 : GPCLR0, offset);
}
+static int bcm2835_gpio_direction_output(struct gpio_chip *chip,
+ unsigned offset, int value)
+{
+ bcm2835_gpio_set(chip, offset, value);
+ return pinctrl_gpio_direction_output(chip->base + offset);
+}
+
static int bcm2835_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
{
struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->dev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH RESEND] pinctrl: bcm2835: Fix initial value for direction_output
@ 2015-12-07 18:10 ` Stefan Wahren
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Wahren @ 2015-12-07 18:10 UTC (permalink / raw)
To: linux-arm-kernel
Currently the provided initial value for bcm2835_gpio_direction_output
has no effect. So fix this issue by changing the value before
changing the GPIO direction. As a result we need to move the function below
bcm2835_gpio_set.
Suggested-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: e1b2dc70cd5b ("pinctrl: add bcm2835 driver")
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Eric Anholt <eric@anholt.net>
---
This patch was inspired by this discussion [1].
[1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2015-April/001499.html
Changes:
- added suggested-by, fixes and acked-by tag since first submit
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 8efa235..fd1441b 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -352,12 +352,6 @@ static int bcm2835_gpio_get(struct gpio_chip *chip, unsigned offset)
return bcm2835_gpio_get_bit(pc, GPLEV0, offset);
}
-static int bcm2835_gpio_direction_output(struct gpio_chip *chip,
- unsigned offset, int value)
-{
- return pinctrl_gpio_direction_output(chip->base + offset);
-}
-
static void bcm2835_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
{
struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->dev);
@@ -365,6 +359,13 @@ static void bcm2835_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
bcm2835_gpio_set_bit(pc, value ? GPSET0 : GPCLR0, offset);
}
+static int bcm2835_gpio_direction_output(struct gpio_chip *chip,
+ unsigned offset, int value)
+{
+ bcm2835_gpio_set(chip, offset, value);
+ return pinctrl_gpio_direction_output(chip->base + offset);
+}
+
static int bcm2835_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
{
struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->dev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND] pinctrl: bcm2835: Fix initial value for direction_output
2015-12-07 18:10 ` Stefan Wahren
@ 2015-12-10 11:05 ` Stefan Wahren
-1 siblings, 0 replies; 6+ messages in thread
From: Stefan Wahren @ 2015-12-10 11:05 UTC (permalink / raw)
To: Linus Walleij, Lee Jones, Eric Anholt, Stephen Warren
Cc: linux-gpio, linux-rpi-kernel, linux-arm-kernel
Hi Linus,
> Stefan Wahren <stefan.wahren@i2se.com> hat am 7. Dezember 2015 um 19:10
> geschrieben:
>
>
> Currently the provided initial value for bcm2835_gpio_direction_output
> has no effect. So fix this issue by changing the value before
> changing the GPIO direction. As a result we need to move the function below
> bcm2835_gpio_set.
>
> Suggested-by: Martin Sperl <kernel@martin.sperl.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Fixes: e1b2dc70cd5b ("pinctrl: add bcm2835 driver")
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
> Acked-by: Eric Anholt <eric@anholt.net>
> ---
on Nov 30 you wrote that you want Stephen's ACK and now it's there.
But your current patch "[PATCH 092/182] pinctrl: bcm2835: use gpiochip data
pointer" seems to conflict with my?
Any wishes?
Stefan
>
> This patch was inspired by this discussion [1].
>
> [1] -
> http://lists.infradead.org/pipermail/linux-rpi-kernel/2015-April/001499.html
>
> Changes:
> - added suggested-by, fixes and acked-by tag since first submit
>
> drivers/pinctrl/bcm/pinctrl-bcm2835.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH RESEND] pinctrl: bcm2835: Fix initial value for direction_output
@ 2015-12-10 11:05 ` Stefan Wahren
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Wahren @ 2015-12-10 11:05 UTC (permalink / raw)
To: linux-arm-kernel
Hi Linus,
> Stefan Wahren <stefan.wahren@i2se.com> hat am 7. Dezember 2015 um 19:10
> geschrieben:
>
>
> Currently the provided initial value for bcm2835_gpio_direction_output
> has no effect. So fix this issue by changing the value before
> changing the GPIO direction. As a result we need to move the function below
> bcm2835_gpio_set.
>
> Suggested-by: Martin Sperl <kernel@martin.sperl.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Fixes: e1b2dc70cd5b ("pinctrl: add bcm2835 driver")
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
> Acked-by: Eric Anholt <eric@anholt.net>
> ---
on Nov 30 you wrote that you want Stephen's ACK and now it's there.
But your current patch "[PATCH 092/182] pinctrl: bcm2835: use gpiochip data
pointer" seems to conflict with my?
Any wishes?
Stefan
>
> This patch was inspired by this discussion [1].
>
> [1] -
> http://lists.infradead.org/pipermail/linux-rpi-kernel/2015-April/001499.html
>
> Changes:
> - added suggested-by, fixes and acked-by tag since first submit
>
> drivers/pinctrl/bcm/pinctrl-bcm2835.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND] pinctrl: bcm2835: Fix initial value for direction_output
2015-12-10 11:05 ` Stefan Wahren
@ 2015-12-14 10:33 ` Linus Walleij
-1 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2015-12-14 10:33 UTC (permalink / raw)
To: Stefan Wahren
Cc: Lee Jones, Eric Anholt, Stephen Warren, linux-gpio,
linux-rpi-kernel, linux-arm-kernel
On Thu, Dec 10, 2015 at 12:05 PM, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> Hi Linus,
>
>> Stefan Wahren <stefan.wahren@i2se.com> hat am 7. Dezember 2015 um 19:10
>> geschrieben:
>>
>>
>> Currently the provided initial value for bcm2835_gpio_direction_output
>> has no effect. So fix this issue by changing the value before
>> changing the GPIO direction. As a result we need to move the function below
>> bcm2835_gpio_set.
>>
>> Suggested-by: Martin Sperl <kernel@martin.sperl.org>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> Fixes: e1b2dc70cd5b ("pinctrl: add bcm2835 driver")
>> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
>> Acked-by: Eric Anholt <eric@anholt.net>
>> ---
>
> on Nov 30 you wrote that you want Stephen's ACK and now it's there.
Yeal already applied it for fixes. Added the Fixes: tag now.
> But your current patch "[PATCH 092/182] pinctrl: bcm2835: use gpiochip data
> pointer" seems to conflict with my?
No problem. I will merge the next release candidate into the GPIO tree
and fix the conflicts after this fix is merged.
Fixing conflicts is all subsystem maintainers do some days :D
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH RESEND] pinctrl: bcm2835: Fix initial value for direction_output
@ 2015-12-14 10:33 ` Linus Walleij
0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2015-12-14 10:33 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Dec 10, 2015 at 12:05 PM, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> Hi Linus,
>
>> Stefan Wahren <stefan.wahren@i2se.com> hat am 7. Dezember 2015 um 19:10
>> geschrieben:
>>
>>
>> Currently the provided initial value for bcm2835_gpio_direction_output
>> has no effect. So fix this issue by changing the value before
>> changing the GPIO direction. As a result we need to move the function below
>> bcm2835_gpio_set.
>>
>> Suggested-by: Martin Sperl <kernel@martin.sperl.org>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> Fixes: e1b2dc70cd5b ("pinctrl: add bcm2835 driver")
>> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
>> Acked-by: Eric Anholt <eric@anholt.net>
>> ---
>
> on Nov 30 you wrote that you want Stephen's ACK and now it's there.
Yeal already applied it for fixes. Added the Fixes: tag now.
> But your current patch "[PATCH 092/182] pinctrl: bcm2835: use gpiochip data
> pointer" seems to conflict with my?
No problem. I will merge the next release candidate into the GPIO tree
and fix the conflicts after this fix is merged.
Fixing conflicts is all subsystem maintainers do some days :D
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-14 10:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07 18:10 [PATCH RESEND] pinctrl: bcm2835: Fix initial value for direction_output Stefan Wahren
2015-12-07 18:10 ` Stefan Wahren
2015-12-10 11:05 ` Stefan Wahren
2015-12-10 11:05 ` Stefan Wahren
2015-12-14 10:33 ` Linus Walleij
2015-12-14 10:33 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.