* [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller
@ 2013-04-29 14:07 ` Maxime Ripard
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2013-04-29 14:07 UTC (permalink / raw)
To: linux-arm-kernel
The current driver doesn't use the set and clear registers found on the
mxs gpio controller.
This leads the generic gpio controller to be using some internal value
to avoid looking up the value stored in the registers, making it behave
pretty much like a cache.
This raises some coherency problem when a gpio is not modified by the
gpio controller, while it can easily be fixed by using the set and clear
registers.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpio/gpio-mxs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 25000b0..f8e6af2 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -326,7 +326,8 @@ static int mxs_gpio_probe(struct platform_device *pdev)
err = bgpio_init(&port->bgc, &pdev->dev, 4,
port->base + PINCTRL_DIN(port),
- port->base + PINCTRL_DOUT(port), NULL,
+ port->base + PINCTRL_DOUT(port) + MXS_SET,
+ port->base + PINCTRL_DOUT(port) + MXS_CLR,
port->base + PINCTRL_DOE(port), NULL, 0);
if (err)
goto out_irqdesc_free;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller
@ 2013-04-29 14:07 ` Maxime Ripard
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2013-04-29 14:07 UTC (permalink / raw)
To: Shawn Guo, Linus Walleij
Cc: linux-arm-kernel, Maxime Ripard, Grant Likely, linux-kernel
The current driver doesn't use the set and clear registers found on the
mxs gpio controller.
This leads the generic gpio controller to be using some internal value
to avoid looking up the value stored in the registers, making it behave
pretty much like a cache.
This raises some coherency problem when a gpio is not modified by the
gpio controller, while it can easily be fixed by using the set and clear
registers.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/gpio/gpio-mxs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 25000b0..f8e6af2 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -326,7 +326,8 @@ static int mxs_gpio_probe(struct platform_device *pdev)
err = bgpio_init(&port->bgc, &pdev->dev, 4,
port->base + PINCTRL_DIN(port),
- port->base + PINCTRL_DOUT(port), NULL,
+ port->base + PINCTRL_DOUT(port) + MXS_SET,
+ port->base + PINCTRL_DOUT(port) + MXS_CLR,
port->base + PINCTRL_DOE(port), NULL, 0);
if (err)
goto out_irqdesc_free;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller
2013-04-29 14:07 ` Maxime Ripard
@ 2013-05-02 2:44 ` Shawn Guo
-1 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2013-05-02 2:44 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Apr 29, 2013 at 04:07:18PM +0200, Maxime Ripard wrote:
> The current driver doesn't use the set and clear registers found on the
> mxs gpio controller.
>
> This leads the generic gpio controller to be using some internal value
> to avoid looking up the value stored in the registers, making it behave
> pretty much like a cache.
>
> This raises some coherency problem when a gpio is not modified by the
> gpio controller, while it can easily be fixed by using the set and clear
> registers.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> drivers/gpio/gpio-mxs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
> index 25000b0..f8e6af2 100644
> --- a/drivers/gpio/gpio-mxs.c
> +++ b/drivers/gpio/gpio-mxs.c
> @@ -326,7 +326,8 @@ static int mxs_gpio_probe(struct platform_device *pdev)
>
> err = bgpio_init(&port->bgc, &pdev->dev, 4,
> port->base + PINCTRL_DIN(port),
> - port->base + PINCTRL_DOUT(port), NULL,
> + port->base + PINCTRL_DOUT(port) + MXS_SET,
> + port->base + PINCTRL_DOUT(port) + MXS_CLR,
> port->base + PINCTRL_DOE(port), NULL, 0);
> if (err)
> goto out_irqdesc_free;
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller
@ 2013-05-02 2:44 ` Shawn Guo
0 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2013-05-02 2:44 UTC (permalink / raw)
To: Maxime Ripard; +Cc: Linus Walleij, linux-arm-kernel, Grant Likely, linux-kernel
On Mon, Apr 29, 2013 at 04:07:18PM +0200, Maxime Ripard wrote:
> The current driver doesn't use the set and clear registers found on the
> mxs gpio controller.
>
> This leads the generic gpio controller to be using some internal value
> to avoid looking up the value stored in the registers, making it behave
> pretty much like a cache.
>
> This raises some coherency problem when a gpio is not modified by the
> gpio controller, while it can easily be fixed by using the set and clear
> registers.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> drivers/gpio/gpio-mxs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
> index 25000b0..f8e6af2 100644
> --- a/drivers/gpio/gpio-mxs.c
> +++ b/drivers/gpio/gpio-mxs.c
> @@ -326,7 +326,8 @@ static int mxs_gpio_probe(struct platform_device *pdev)
>
> err = bgpio_init(&port->bgc, &pdev->dev, 4,
> port->base + PINCTRL_DIN(port),
> - port->base + PINCTRL_DOUT(port), NULL,
> + port->base + PINCTRL_DOUT(port) + MXS_SET,
> + port->base + PINCTRL_DOUT(port) + MXS_CLR,
> port->base + PINCTRL_DOE(port), NULL, 0);
> if (err)
> goto out_irqdesc_free;
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller
2013-05-02 2:44 ` Shawn Guo
@ 2013-05-16 15:37 ` Maxime Ripard
-1 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2013-05-16 15:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi Linus,
Le 02/05/2013 04:44, Shawn Guo a ?crit :
> On Mon, Apr 29, 2013 at 04:07:18PM +0200, Maxime Ripard wrote:
>> The current driver doesn't use the set and clear registers found on the
>> mxs gpio controller.
>>
>> This leads the generic gpio controller to be using some internal value
>> to avoid looking up the value stored in the registers, making it behave
>> pretty much like a cache.
>>
>> This raises some coherency problem when a gpio is not modified by the
>> gpio controller, while it can easily be fixed by using the set and clear
>> registers.
>>
>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
Would you consider merging this patch?
Thanks,
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller
@ 2013-05-16 15:37 ` Maxime Ripard
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2013-05-16 15:37 UTC (permalink / raw)
To: Linus Walleij; +Cc: Shawn Guo, linux-arm-kernel, Grant Likely, linux-kernel
Hi Linus,
Le 02/05/2013 04:44, Shawn Guo a écrit :
> On Mon, Apr 29, 2013 at 04:07:18PM +0200, Maxime Ripard wrote:
>> The current driver doesn't use the set and clear registers found on the
>> mxs gpio controller.
>>
>> This leads the generic gpio controller to be using some internal value
>> to avoid looking up the value stored in the registers, making it behave
>> pretty much like a cache.
>>
>> This raises some coherency problem when a gpio is not modified by the
>> gpio controller, while it can easily be fixed by using the set and clear
>> registers.
>>
>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
Would you consider merging this patch?
Thanks,
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller
2013-04-29 14:07 ` Maxime Ripard
@ 2013-05-20 18:15 ` Linus Walleij
-1 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2013-05-20 18:15 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Apr 29, 2013 at 4:07 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The current driver doesn't use the set and clear registers found on the
> mxs gpio controller.
>
> This leads the generic gpio controller to be using some internal value
> to avoid looking up the value stored in the registers, making it behave
> pretty much like a cache.
>
> This raises some coherency problem when a gpio is not modified by the
> gpio controller, while it can easily be fixed by using the set and clear
> registers.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Patch applied for rc-fixes with Shawns ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller
@ 2013-05-20 18:15 ` Linus Walleij
0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2013-05-20 18:15 UTC (permalink / raw)
To: Maxime Ripard
Cc: Shawn Guo, linux-arm-kernel@lists.infradead.org, Grant Likely,
linux-kernel@vger.kernel.org
On Mon, Apr 29, 2013 at 4:07 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The current driver doesn't use the set and clear registers found on the
> mxs gpio controller.
>
> This leads the generic gpio controller to be using some internal value
> to avoid looking up the value stored in the registers, making it behave
> pretty much like a cache.
>
> This raises some coherency problem when a gpio is not modified by the
> gpio controller, while it can easily be fixed by using the set and clear
> registers.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Patch applied for rc-fixes with Shawns ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-20 18:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29 14:07 [PATCH] gpio: mxs: Use set and clear capabilities of the gpio controller Maxime Ripard
2013-04-29 14:07 ` Maxime Ripard
2013-05-02 2:44 ` Shawn Guo
2013-05-02 2:44 ` Shawn Guo
2013-05-16 15:37 ` Maxime Ripard
2013-05-16 15:37 ` Maxime Ripard
2013-05-20 18:15 ` Linus Walleij
2013-05-20 18:15 ` 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.