Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935827AbcJZWRs (ORCPT ); Wed, 26 Oct 2016 18:17:48 -0400 Received: from up.free-electrons.com ([163.172.77.33]:54041 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932768AbcJZWRk (ORCPT ); Wed, 26 Oct 2016 18:17:40 -0400 Date: Thu, 27 Oct 2016 00:17:24 +0200 From: Maxime Ripard To: Rob Herring Cc: Chen-Yu Tsai , David Airlie , Mark Rutland , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v2 1/8] drm/bridge: rgb-to-vga: Support an enable GPIO Message-ID: <20161026221724.55yufeql6s5nd5gq@lukather> References: <20161020034344.14154-1-wens@csie.org> <20161020034344.14154-2-wens@csie.org> <20161026221346.tdpmbrwca4jehch2@rob-hp-laptop> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eevsugkk5iyywdid" Content-Disposition: inline In-Reply-To: <20161026221346.tdpmbrwca4jehch2@rob-hp-laptop> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2769 Lines: 78 --eevsugkk5iyywdid Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Rob, On Wed, Oct 26, 2016 at 05:13:46PM -0500, Rob Herring wrote: > On Thu, Oct 20, 2016 at 11:43:37AM +0800, Chen-Yu Tsai wrote: > > Some rgb-to-vga bridges have an enable GPIO, either directly tied to > > an enable pin on the bridge IC, or indirectly controlling a power > > switch. > >=20 > > Add support for it. > >=20 > > Signed-off-by: Chen-Yu Tsai > > --- > > .../bindings/display/bridge/dumb-vga-dac.txt | 2 ++ > > drivers/gpu/drm/bridge/dumb-vga-dac.c | 28 ++++++++++++++= ++++++++ > > 2 files changed, 30 insertions(+) > >=20 > > diff --git a/Documentation/devicetree/bindings/display/bridge/dumb-vga-= dac.txt b/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt > > index 003bc246a270..d3484822bf77 100644 > > --- a/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt > > +++ b/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt > > @@ -16,6 +16,8 @@ graph bindings specified in Documentation/devicetree/= bindings/graph.txt. > > - Video port 0 for RGB input > > - Video port 1 for VGA output > > =20 > > +Optional properties: > > +- enable-gpios: GPIO pin to enable or disable the bridge >=20 > This should also define the active state. >=20 > > +static void dumb_vga_enable(struct drm_bridge *bridge) > > +{ > > + struct dumb_vga *vga =3D drm_bridge_to_dumb_vga(bridge); > > + > > + if (vga->enable_gpio) > > + gpiod_set_value_cansleep(vga->enable_gpio, 1); >=20 > So the driver should allow either active high or low. You mean like having a enable-active-high property? Isn't that redundant with the GPIO flags? Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --eevsugkk5iyywdid Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYEStvAAoJEBx+YmzsjxAgx/oP/1xsDMBwsWl81wBeT5Yw4x1S nSaQk6aqDYK+9ISQVlCdBdq6G4pYL5DHdaJwaDPrZ2yWlx9Nr1JPx9Ps8i7pEteE bm4Wrp5jO9QRZ3unAjMR3MPSaNOnPgV393nn/F3zEpKYI7rSuCSD1emQPfaw1xDz FcXilN6wAZKcYmh0Pgd1u7G+An3GYhpU4sQL6TdUm72zUqUOSPHndC+jXNloJkwO W3pg+JVxCjrt+GmjN6GoSW2ltOCsI9kUsnNt8VSeY4ETj5OyDyJHFDm1qjddGPZ7 /0k5vrF/0FPeUlILbYBIYPu9ndKC1mUIYV95hnpi/Af+9Hvu4QYAyrRVwcsCJc+7 ngIbu4cer7gX6y4OyFAkdY93PHzrXS/A+8eE8/UKIAnUk+XhMrWqpaXGfrQTmL8U LyGy7ld8PxPGD0zdZsSsul6zpSiGMME8MhnMW3WZ5RgoTpifV6kbdgwDAJw/wZYr ZaLdIIV6wENLdeJlH0cEloQPyVU055HC3PbxZeEvUwknDpzdQPMj3VZ8zqE/EUmg sjxd884vmm5E4tVJ+9rbtQoOHUcRJtsYf8M0WcAA/vSZLkhRryfBCIuW1NqNpWwW 0dkE9gdLk4r49zhZksvdtUfBBei/XCKMi0R/z//M6QbUHphAZur0bk8JTJor5XxD me3N+I8EDrqL2wdg7Vxo =Nhhu -----END PGP SIGNATURE----- --eevsugkk5iyywdid--