All of lore.kernel.org
 help / color / mirror / Atom feed
* AW: (EXT) Re: [PATCH 1/3] drm/bridge: ti-sn65dsi83: Add vcc supply regulator support
@ 2021-10-12  6:35 Alexander Stein
  0 siblings, 0 replies; only message in thread
From: Alexander Stein @ 2021-10-12  6:35 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: David Airlie, Daniel Vetter, Rob Herring, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, dri-devel, devicetree

Hi Sam,

On Mon, 11 Oct 2021 22:29:30 +0200, Sam Ravnborg wrote:
> > VCC needs to be enabled before releasing the enable GPIO.
> > 
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> >  drivers/gpu/drm/bridge/ti-sn65dsi83.c | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> > index a32f70bc68ea..5fab0fabcd15 100644
> > --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> > @@ -33,6 +33,7 @@
> >  #include <linux/of_device.h>
> >  #include <linux/of_graph.h>
> >  #include <linux/regmap.h>
> > +#include <linux/regulator/consumer.h>
> >  
> >  #include <drm/drm_atomic_helper.h>
> >  #include <drm/drm_bridge.h>
> > @@ -143,6 +144,7 @@ struct sn65dsi83 {
> >  	struct mipi_dsi_device		*dsi;
> >  	struct drm_bridge		*panel_bridge;
> >  	struct gpio_desc		*enable_gpio;
> > +	struct regulator		*vcc;
> >  	int				dsi_lanes;
> >  	bool				lvds_dual_link;
> >  	bool				lvds_dual_link_even_odd_swap;
> > @@ -647,6 +649,12 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx,
> enum sn65dsi83_model model)
> >  
> >  	ctx->panel_bridge = panel_bridge;
> >  
> > +	ctx->vcc = devm_regulator_get(dev, "vcc");
> In the binding the vcc regulator is required, but devm_regulator_get()
> will create a dummy regulator if not found. Maybe this is on purpose and
> all is good.

Thanks for addressing this. I was slightly unsure myself, but IMHO this is
all good as this makes the driver backward compatible with older DT
which lack the regulator. If there was no vcc regulator necessary and the bridge
was working,then a dummy regulator is fine, as the DT fix would be adding a
always-on, regulator-fixed without any enable/disable possibility anyway.

Best regards,
Alexander


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-12  6:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12  6:35 AW: (EXT) Re: [PATCH 1/3] drm/bridge: ti-sn65dsi83: Add vcc supply regulator support Alexander Stein

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.