* [PATCH v2 1/6] gpio: rcar: Add optional functional clock to bindings
[not found] <1397500397-12607-1-git-send-email-geert@linux-m68k.org>
@ 2014-04-14 18:33 ` Geert Uytterhoeven
2014-04-15 15:56 ` Laurent Pinchart
2014-04-22 21:34 ` Linus Walleij
2014-04-14 18:33 ` [PATCH v2 2/6] gpio: rcar: Add minimal runtime PM support Geert Uytterhoeven
1 sibling, 2 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-04-14 18:33 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-sh, Geert Uytterhoeven, Linus Walleij, Laurent Pinchart,
linux-gpio, devicetree
From: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: linux-gpio@vger.kernel.org
Cc: devicetree@vger.kernel.org
---
v2:
- Functional clock is mandatory depending on hardware (thanks, Laurent)
---
.../devicetree/bindings/gpio/renesas,gpio-rcar.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index f61cef74a212..941a26aa4322 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -21,6 +21,12 @@ Required Properties:
GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
- gpio-ranges: Range of pins managed by the GPIO controller.
+Optional properties:
+
+ - clocks: Must contain a reference to the functional clock. The property is
+ mandatory if the hardware implements a controllable functional clock for
+ the GPIO instance.
+
Please refer to gpio.txt in this directory for details of gpio-ranges property
and the common GPIO bindings used by client devices.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/6] gpio: rcar: Add minimal runtime PM support
[not found] <1397500397-12607-1-git-send-email-geert@linux-m68k.org>
2014-04-14 18:33 ` [PATCH v2 1/6] gpio: rcar: Add optional functional clock to bindings Geert Uytterhoeven
@ 2014-04-14 18:33 ` Geert Uytterhoeven
2014-04-16 11:26 ` Laurent Pinchart
2014-04-23 7:03 ` Linus Walleij
1 sibling, 2 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-04-14 18:33 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-sh, Geert Uytterhoeven, Linus Walleij, Laurent Pinchart,
linux-gpio
From: Geert Uytterhoeven <geert+renesas@glider.be>
This is just enough to automatically enable the functional clock, if
present. Clock management during suspend/resume is still to be added.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: linux-gpio@vger.kernel.org
---
v2:
- Use pm_runtime_put() instead of pm_runtime_put_sync()
---
drivers/gpio/gpio-rcar.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 03c91482432c..bfcfeeefcf78 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -26,6 +26,7 @@
#include <linux/pinctrl/consumer.h>
#include <linux/platform_data/gpio-rcar.h>
#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
@@ -377,6 +378,9 @@ static int gpio_rcar_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, p);
+ pm_runtime_enable(dev);
+ pm_runtime_get_sync(dev);
+
io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
@@ -460,6 +464,8 @@ static int gpio_rcar_probe(struct platform_device *pdev)
err1:
irq_domain_remove(p->irq_domain);
err0:
+ pm_runtime_put(dev);
+ pm_runtime_disable(dev);
return ret;
}
@@ -473,6 +479,8 @@ static int gpio_rcar_remove(struct platform_device *pdev)
return ret;
irq_domain_remove(p->irq_domain);
+ pm_runtime_put(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/6] gpio: rcar: Add optional functional clock to bindings
2014-04-14 18:33 ` [PATCH v2 1/6] gpio: rcar: Add optional functional clock to bindings Geert Uytterhoeven
@ 2014-04-15 15:56 ` Laurent Pinchart
2014-04-22 21:34 ` Linus Walleij
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-04-15 15:56 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Simon Horman, Magnus Damm, linux-sh, Geert Uytterhoeven,
Linus Walleij, linux-gpio, devicetree
Hi Geert,
Thank you for the patch.
On Monday 14 April 2014 20:33:12 Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: linux-gpio@vger.kernel.org
> Cc: devicetree@vger.kernel.org
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> v2:
> - Functional clock is mandatory depending on hardware (thanks, Laurent)
> ---
> .../devicetree/bindings/gpio/renesas,gpio-rcar.txt | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt index
> f61cef74a212..941a26aa4322 100644
> --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> @@ -21,6 +21,12 @@ Required Properties:
> GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
> - gpio-ranges: Range of pins managed by the GPIO controller.
>
> +Optional properties:
> +
> + - clocks: Must contain a reference to the functional clock. The property
> is + mandatory if the hardware implements a controllable functional
> clock for + the GPIO instance.
> +
> Please refer to gpio.txt in this directory for details of gpio-ranges
> property and the common GPIO bindings used by client devices.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/6] gpio: rcar: Add minimal runtime PM support
2014-04-14 18:33 ` [PATCH v2 2/6] gpio: rcar: Add minimal runtime PM support Geert Uytterhoeven
@ 2014-04-16 11:26 ` Laurent Pinchart
2014-04-23 7:03 ` Linus Walleij
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-04-16 11:26 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Simon Horman, Magnus Damm, linux-sh, Geert Uytterhoeven,
Linus Walleij, linux-gpio
Hi Geert,
Thank you for the patch.
On Monday 14 April 2014 20:33:13 Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@glider.be>
>
> This is just enough to automatically enable the functional clock, if
> present. Clock management during suspend/resume is still to be added.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: linux-gpio@vger.kernel.org
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> v2:
> - Use pm_runtime_put() instead of pm_runtime_put_sync()
> ---
> drivers/gpio/gpio-rcar.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
> index 03c91482432c..bfcfeeefcf78 100644
> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -26,6 +26,7 @@
> #include <linux/pinctrl/consumer.h>
> #include <linux/platform_data/gpio-rcar.h>
> #include <linux/platform_device.h>
> +#include <linux/pm_runtime.h>
> #include <linux/spinlock.h>
> #include <linux/slab.h>
>
> @@ -377,6 +378,9 @@ static int gpio_rcar_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, p);
>
> + pm_runtime_enable(dev);
> + pm_runtime_get_sync(dev);
> +
> io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>
> @@ -460,6 +464,8 @@ static int gpio_rcar_probe(struct platform_device *pdev)
> err1:
> irq_domain_remove(p->irq_domain);
> err0:
> + pm_runtime_put(dev);
> + pm_runtime_disable(dev);
> return ret;
> }
>
> @@ -473,6 +479,8 @@ static int gpio_rcar_remove(struct platform_device
> *pdev) return ret;
>
> irq_domain_remove(p->irq_domain);
> + pm_runtime_put(&pdev->dev);
> + pm_runtime_disable(&pdev->dev);
> return 0;
> }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/6] gpio: rcar: Add optional functional clock to bindings
2014-04-14 18:33 ` [PATCH v2 1/6] gpio: rcar: Add optional functional clock to bindings Geert Uytterhoeven
2014-04-15 15:56 ` Laurent Pinchart
@ 2014-04-22 21:34 ` Linus Walleij
1 sibling, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2014-04-22 21:34 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Simon Horman, Magnus Damm, linux-sh@vger.kernel.org,
Geert Uytterhoeven, Laurent Pinchart, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org
On Mon, Apr 14, 2014 at 8:33 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> From: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: linux-gpio@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> ---
> v2:
> - Functional clock is mandatory depending on hardware (thanks, Laurent)
This v2 version applied with Laurent's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/6] gpio: rcar: Add minimal runtime PM support
2014-04-14 18:33 ` [PATCH v2 2/6] gpio: rcar: Add minimal runtime PM support Geert Uytterhoeven
2014-04-16 11:26 ` Laurent Pinchart
@ 2014-04-23 7:03 ` Linus Walleij
2014-04-23 7:13 ` Geert Uytterhoeven
1 sibling, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2014-04-23 7:03 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Simon Horman, Magnus Damm, linux-sh@vger.kernel.org,
Geert Uytterhoeven, Laurent Pinchart, linux-gpio@vger.kernel.org
On Mon, Apr 14, 2014 at 8:33 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> From: Geert Uytterhoeven <geert+renesas@glider.be>
>
> This is just enough to automatically enable the functional clock, if
> present. Clock management during suspend/resume is still to be added.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: linux-gpio@vger.kernel.org
> ---
> v2:
> - Use pm_runtime_put() instead of pm_runtime_put_sync()
This v2 version applied with Laurent's ACK. I guess you wanted it
applied to the GPIO tree, I don't see the other patches.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/6] gpio: rcar: Add minimal runtime PM support
2014-04-23 7:03 ` Linus Walleij
@ 2014-04-23 7:13 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-04-23 7:13 UTC (permalink / raw)
To: Linus Walleij
Cc: Simon Horman, Magnus Damm, linux-sh@vger.kernel.org,
Geert Uytterhoeven, Laurent Pinchart, linux-gpio@vger.kernel.org
Hi Linus,
On Wed, Apr 23, 2014 at 9:03 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Apr 14, 2014 at 8:33 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> From: Geert Uytterhoeven <geert+renesas@glider.be>
>>
>> This is just enough to automatically enable the functional clock, if
>> present. Clock management during suspend/resume is still to be added.
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
>> Cc: linux-gpio@vger.kernel.org
>> ---
>> v2:
>> - Use pm_runtime_put() instead of pm_runtime_put_sync()
>
> This v2 version applied with Laurent's ACK. I guess you wanted it
> applied to the GPIO tree, I don't see the other patches.
Thanks, yes that was the idea.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-23 7:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1397500397-12607-1-git-send-email-geert@linux-m68k.org>
2014-04-14 18:33 ` [PATCH v2 1/6] gpio: rcar: Add optional functional clock to bindings Geert Uytterhoeven
2014-04-15 15:56 ` Laurent Pinchart
2014-04-22 21:34 ` Linus Walleij
2014-04-14 18:33 ` [PATCH v2 2/6] gpio: rcar: Add minimal runtime PM support Geert Uytterhoeven
2014-04-16 11:26 ` Laurent Pinchart
2014-04-23 7:03 ` Linus Walleij
2014-04-23 7:13 ` Geert Uytterhoeven
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).