From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751819AbbJLRKZ (ORCPT ); Mon, 12 Oct 2015 13:10:25 -0400 Received: from foss.arm.com ([217.140.101.70]:48641 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbbJLRKX (ORCPT ); Mon, 12 Oct 2015 13:10:23 -0400 Date: Mon, 12 Oct 2015 18:10:18 +0100 From: Mark Rutland To: Chen-Yu Tsai Cc: Hans de Goede , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , Maxime Ripard , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Brown Subject: Re: [PATCH RFC 1/2] dt-bindings: simplefb: Support a list of regulator supply properties Message-ID: <20151012171018.GB3659@leverpostej> References: <1444669458-5588-1-git-send-email-wens@csie.org> <1444669458-5588-2-git-send-email-wens@csie.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444669458-5588-2-git-send-email-wens@csie.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 13, 2015 at 01:04:17AM +0800, 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 is getting more complicated by the minute... > Signed-off-by: Chen-Yu Tsai > --- > .../devicetree/bindings/video/simple-framebuffer.txt | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt > index 4474ef6e0b95..0cc43e1be8b5 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. > +- num-supplies : The number of regulators used by the framebuffer. > +- vinN-supply : The N-th (from 0) regulator used by the framebuffer. I don't see why you need num-supplies. Why not just try probing vin${N}-supply until such a property isn't present in the DT? Thanks, Mark.