Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1252483 > unrolled thread

[PATCH RFC v2 0/2] simplefb: Add regulator handling support

Started byChen-Yu Tsai <wens@csie.org>
First post2015-10-21 08:00 +0200
Last post2015-10-23 01:40 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH RFC v2 0/2] simplefb: Add regulator handling support Chen-Yu Tsai <wens@csie.org> - 2015-10-21 08:00 +0200
    [PATCH RFC v2 1/2] dt-bindings: simplefb: Support a list of regulator supply properties Chen-Yu Tsai <wens@csie.org> - 2015-10-21 08:00 +0200
      Re: [PATCH RFC v2 1/2] dt-bindings: simplefb: Support a list of  regulator supply properties Hans de Goede <hdegoede@redhat.com> - 2015-10-21 10:00 +0200
    Re: [PATCH RFC v2 0/2] simplefb: Add regulator handling support Mark Brown <broonie@kernel.org> - 2015-10-23 01:40 +0200

#1252483 — [PATCH RFC v2 0/2] simplefb: Add regulator handling support

FromChen-Yu Tsai <wens@csie.org>
Date2015-10-21 08:00 +0200
Subject[PATCH RFC v2 0/2] simplefb: Add regulator handling support
Message-ID<qlUBk-2gl-3@gated-at.bofh.it>
Hi everyone,

This is v2 of the simplefb regulator support series. This series adds
regulator claiming and enabling support for simplefb.

Sometimes the simplefb display output path consits of external conversion
chips and/or LCD drivers and backlights. These devices normally have
GPIOs to turn them on and/or bring them out of reset, and regulators
supplying power to them.

While the kernel does not touch unclaimed GPIOs, the regulator core
happily disables unused regulators. Thus we need simplefb to claim
and enable the regulators used throughout the display pipeline.

Instead of the unnamed "vinN-supply" properties, v2 supports any named
regulator supplies under its device node. It will look through its
properties, and claim any regulators by matching "*-supply", as Mark
suggested.

I've not done a generic helper in the regulator core yet, instead doing
the regulator property handling in the simplefb code for now.


Patch 1 adds the regulator properties to the DT binding.

Patch 2 adds code to the simplefb driver to claim and enable regulators.


Regards
ChenYu


Chen-Yu Tsai (2):
  dt-bindings: simplefb: Support a list of regulator supply properties
  simplefb: Claim and enable regulators

 .../bindings/video/simple-framebuffer.txt          |  13 ++-
 drivers/video/fbdev/simplefb.c                     | 122 ++++++++++++++++++++-
 2 files changed, 130 insertions(+), 5 deletions(-)

-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1252484 — [PATCH RFC v2 1/2] dt-bindings: simplefb: Support a list of regulator supply properties

FromChen-Yu Tsai <wens@csie.org>
Date2015-10-21 08:00 +0200
Subject[PATCH RFC v2 1/2] dt-bindings: simplefb: Support a list of regulator supply properties
Message-ID<qlUBk-2gl-15@gated-at.bofh.it>
In reply to#1252483
The physical display tied to the framebuffer may have regulators
providing power to it, such as power for LCDs or interface conversion
chips.

The number of regulators in use may vary, but the regulator supply
binding can not be a list. Work around this by adding a "num-supplies"
property to communicate the number of supplies, and a list of 0 ~ N
"vinN-supply" properties for the actual regulator supply.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../devicetree/bindings/video/simple-framebuffer.txt        | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
index 4474ef6e0b95..8c9e9f515c87 100644
--- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
+++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
@@ -47,10 +47,14 @@ Required properties:
   - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
 
 Optional properties:
-- clocks : List of clocks used by the framebuffer. Clocks listed here
-           are expected to already be configured correctly. The OS must
-           ensure these clocks are not modified or disabled while the
-           simple framebuffer remains active.
+- clocks : List of clocks used by the framebuffer.
+- *-supply : Any number of regulators used by the framebuffer. These should
+	     be named according to the names in the device's design.
+
+  The above resources are expected to already be configured correctly.
+  The OS must ensure they are not modified or disabled while the simple
+  framebuffer remains active.
+
 - display : phandle pointing to the primary display hardware node
 
 Example:
@@ -68,6 +72,7 @@ chosen {
 		stride = <(1600 * 2)>;
 		format = "r5g6b5";
 		clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
+		lcd-supply = <&reg_dc1sw>;
 		display = <&lcdc0>;
 	};
 	stdout-path = "display0";
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1252521 — Re: [PATCH RFC v2 1/2] dt-bindings: simplefb: Support a list of regulator supply properties

FromHans de Goede <hdegoede@redhat.com>
Date2015-10-21 10:00 +0200
SubjectRe: [PATCH RFC v2 1/2] dt-bindings: simplefb: Support a list of regulator supply properties
Message-ID<qlWts-51P-3@gated-at.bofh.it>
In reply to#1252484
Hi,

On 21-10-15 07:59, Chen-Yu Tsai wrote:
> The physical display tied to the framebuffer may have regulators
> providing power to it, such as power for LCDs or interface conversion
> chips.
>
> The number of regulators in use may vary, but the regulator supply
> binding can not be a list. Work around this by adding a "num-supplies"
> property to communicate the number of supplies, and a list of 0 ~ N
> "vinN-supply" properties for the actual regulator supply.

This bit of the commit message is no longer accurate. Other then that
this patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>   .../devicetree/bindings/video/simple-framebuffer.txt        | 13 +++++++++----
>   1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> index 4474ef6e0b95..8c9e9f515c87 100644
> --- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> +++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> @@ -47,10 +47,14 @@ Required properties:
>     - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
>
>   Optional properties:
> -- clocks : List of clocks used by the framebuffer. Clocks listed here
> -           are expected to already be configured correctly. The OS must
> -           ensure these clocks are not modified or disabled while the
> -           simple framebuffer remains active.
> +- clocks : List of clocks used by the framebuffer.
> +- *-supply : Any number of regulators used by the framebuffer. These should
> +	     be named according to the names in the device's design.
> +
> +  The above resources are expected to already be configured correctly.
> +  The OS must ensure they are not modified or disabled while the simple
> +  framebuffer remains active.
> +
>   - display : phandle pointing to the primary display hardware node
>
>   Example:
> @@ -68,6 +72,7 @@ chosen {
>   		stride = <(1600 * 2)>;
>   		format = "r5g6b5";
>   		clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
> +		lcd-supply = <&reg_dc1sw>;
>   		display = <&lcdc0>;
>   	};
>   	stdout-path = "display0";
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254235

FromMark Brown <broonie@kernel.org>
Date2015-10-23 01:40 +0200
Message-ID<qmxCG-Il-13@gated-at.bofh.it>
In reply to#1252483

[Multipart message — attachments visible in raw view] — view raw

On Wed, Oct 21, 2015 at 01:58:59PM +0800, Chen-Yu Tsai wrote:
> Hi everyone,
> 
> This is v2 of the simplefb regulator support series. This series adds
> regulator claiming and enabling support for simplefb.

This approach seems reasonable

Acked-by: Mark Brown <broonie@kernel.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web