[PATCH v4 4/4] drm/bridge: ti-sn65dsi83: Add vcc supply regulator support
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Dec 9 16:38:49 UTC 2021
Hi Jagan,
On Thu, Dec 09, 2021 at 12:34:49PM +0530, Jagan Teki wrote:
> On Thu, Nov 18, 2021 at 2:50 PM Alexander Stein wrote:
> >
> > VCC needs to be enabled before releasing the enable GPIO.
> >
> > Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
> > ---
> > drivers/gpu/drm/bridge/ti-sn65dsi83.c | 19 +++++++++++++++++++
> > 1 file changed, 19 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> > index 065610edc37a..54d18e82ed74 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;
> > @@ -337,6 +339,12 @@ static void sn65dsi83_atomic_enable(struct drm_bridge *bridge,
> > u16 val;
> > int ret;
> >
> > + ret = regulator_enable(ctx->vcc);
> > + if (ret) {
> > + dev_err(ctx->dev, "Failed to enable vcc\n");
> > + return;
> > + }
>
> Better check the vcc and enable it since it is an optional one.
Won't the regulator core create a dummy regulator if none is specified
in DT ?
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list