All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Rob Herring <robh@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>, David Airlie <airlied@linux.ie>,
	Mark Rutland <mark.rutland@arm.com>,
	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
Date: Thu, 27 Oct 2016 00:17:24 +0200	[thread overview]
Message-ID: <20161026221724.55yufeql6s5nd5gq@lukather> (raw)
In-Reply-To: <20161026221346.tdpmbrwca4jehch2@rob-hp-laptop>

[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]

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.
> > 
> > Add support for it.
> > 
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >  .../bindings/display/bridge/dumb-vga-dac.txt       |  2 ++
> >  drivers/gpu/drm/bridge/dumb-vga-dac.c              | 28 ++++++++++++++++++++++
> >  2 files changed, 30 insertions(+)
> > 
> > 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
> >  
> > +Optional properties:
> > +- enable-gpios: GPIO pin to enable or disable the bridge
> 
> This should also define the active state.
> 
> > +static void dumb_vga_enable(struct drm_bridge *bridge)
> > +{
> > +	struct dumb_vga *vga = drm_bridge_to_dumb_vga(bridge);
> > +
> > +	if (vga->enable_gpio)
> > +		gpiod_set_value_cansleep(vga->enable_gpio, 1);
> 
> 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

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH v2 1/8] drm/bridge: rgb-to-vga: Support an enable GPIO
Date: Thu, 27 Oct 2016 00:17:24 +0200	[thread overview]
Message-ID: <20161026221724.55yufeql6s5nd5gq@lukather> (raw)
In-Reply-To: <20161026221346.tdpmbrwca4jehch2@rob-hp-laptop>

[-- Attachment #1: Type: text/plain, Size: 1722 bytes --]

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.
> > 
> > Add support for it.
> > 
> > Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
> > ---
> >  .../bindings/display/bridge/dumb-vga-dac.txt       |  2 ++
> >  drivers/gpu/drm/bridge/dumb-vga-dac.c              | 28 ++++++++++++++++++++++
> >  2 files changed, 30 insertions(+)
> > 
> > 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
> >  
> > +Optional properties:
> > +- enable-gpios: GPIO pin to enable or disable the bridge
> 
> This should also define the active state.
> 
> > +static void dumb_vga_enable(struct drm_bridge *bridge)
> > +{
> > +	struct dumb_vga *vga = drm_bridge_to_dumb_vga(bridge);
> > +
> > +	if (vga->enable_gpio)
> > +		gpiod_set_value_cansleep(vga->enable_gpio, 1);
> 
> 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

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/8] drm/bridge: rgb-to-vga: Support an enable GPIO
Date: Thu, 27 Oct 2016 00:17:24 +0200	[thread overview]
Message-ID: <20161026221724.55yufeql6s5nd5gq@lukather> (raw)
In-Reply-To: <20161026221346.tdpmbrwca4jehch2@rob-hp-laptop>

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.
> > 
> > Add support for it.
> > 
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >  .../bindings/display/bridge/dumb-vga-dac.txt       |  2 ++
> >  drivers/gpu/drm/bridge/dumb-vga-dac.c              | 28 ++++++++++++++++++++++
> >  2 files changed, 30 insertions(+)
> > 
> > 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
> >  
> > +Optional properties:
> > +- enable-gpios: GPIO pin to enable or disable the bridge
> 
> This should also define the active state.
> 
> > +static void dumb_vga_enable(struct drm_bridge *bridge)
> > +{
> > +	struct dumb_vga *vga = drm_bridge_to_dumb_vga(bridge);
> > +
> > +	if (vga->enable_gpio)
> > +		gpiod_set_value_cansleep(vga->enable_gpio, 1);
> 
> 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

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161027/b9eb1a24/attachment.sig>

  reply	other threads:[~2016-10-26 22:17 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20  3:43 [PATCH v2 0/8] drm/sun4i: Support first display pipeline on sun6i Chen-Yu Tsai
2016-10-20  3:43 ` Chen-Yu Tsai
2016-10-20  3:43 ` Chen-Yu Tsai
2016-10-20  3:43 ` [PATCH v2 1/8] drm/bridge: rgb-to-vga: Support an enable GPIO Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20 13:00   ` Maxime Ripard
2016-10-20 13:00     ` Maxime Ripard
2016-10-25  8:09   ` Archit Taneja
2016-10-25  8:09     ` Archit Taneja
2016-10-25  8:09     ` Archit Taneja
2016-10-25  8:59     ` Chen-Yu Tsai
2016-10-25  8:59       ` Chen-Yu Tsai
2016-10-25  8:59       ` Chen-Yu Tsai
2016-10-27  6:40       ` Archit Taneja
2016-10-27  6:40         ` Archit Taneja
2016-10-27  6:40         ` Archit Taneja
2016-10-27  6:52         ` Chen-Yu Tsai
2016-10-27  6:52           ` Chen-Yu Tsai
2016-10-27  6:52           ` Chen-Yu Tsai
2016-10-26 22:13   ` Rob Herring
2016-10-26 22:13     ` Rob Herring
2016-10-26 22:13     ` Rob Herring
2016-10-26 22:17     ` Maxime Ripard [this message]
2016-10-26 22:17       ` Maxime Ripard
2016-10-26 22:17       ` Maxime Ripard
2016-10-31 15:56       ` Russell King - ARM Linux
2016-10-31 15:56         ` Russell King - ARM Linux
2016-10-20  3:43 ` [PATCH v2 2/8] drm/sun4i: sun6i-drc: Support DRC on A31 and A31s Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20 15:58   ` Maxime Ripard
2016-10-20 15:58     ` Maxime Ripard
2016-10-20 15:58     ` Maxime Ripard
2016-10-20  3:43 ` [PATCH v2 3/8] drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20 15:58   ` Maxime Ripard
2016-10-20 15:58     ` Maxime Ripard
2016-10-20 15:58     ` Maxime Ripard
2016-10-20  3:43 ` [PATCH v2 4/8] drm/sun4i: Add compatible string for A31/A31s TCON (timing controller) Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20 15:59   ` Maxime Ripard
2016-10-20 15:59     ` Maxime Ripard
2016-10-20 15:59     ` Maxime Ripard
2016-10-20  3:43 ` [PATCH v2 5/8] drm/sun4i: Add compatible strings for A31/A31s display pipelines Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20 16:00   ` Maxime Ripard
2016-10-20 16:00     ` Maxime Ripard
2016-10-20 16:00     ` Maxime Ripard
2016-10-20  3:43 ` [PATCH v2 6/8] ARM: dts: sun6i: Add device nodes for first display pipeline Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20 16:02   ` Maxime Ripard
2016-10-20 16:02     ` Maxime Ripard
2016-10-20 16:02     ` Maxime Ripard
2016-10-20  3:43 ` [PATCH v2 7/8] ARM: dts: sun6i: Add A31 LCD0 RGB888 pins Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20 16:01   ` Maxime Ripard
2016-10-20 16:01     ` Maxime Ripard
2016-10-20 16:01     ` Maxime Ripard
2016-10-20  3:43 ` [PATCH v2 8/8] ARM: dts: sun6i: hummingbird-a31: Enable display output through VGA bridge Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20  3:43   ` Chen-Yu Tsai
2016-10-20 16:02   ` Maxime Ripard
2016-10-20 16:02     ` Maxime Ripard
2016-10-20 16:02     ` Maxime Ripard
2016-10-25  8:13   ` Archit Taneja
2016-10-25  8:13     ` Archit Taneja
2016-10-25  8:13     ` Archit Taneja
2016-10-25  8:50     ` Chen-Yu Tsai
2016-10-25  8:50       ` Chen-Yu Tsai
2016-10-25  8:50       ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161026221724.55yufeql6s5nd5gq@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mark.rutland@arm.com \
    --cc=robh@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.