From: Jagan Teki <jagan@amarulasolutions.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Rob Herring <robh+dt@kernel.org>,
Andrzej Hajda <a.hajda@samsung.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Robert Foss <robert.foss@linaro.org>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 4/4] drm/bridge: ti-sn65dsi83: Add vcc supply regulator support
Date: Thu, 9 Dec 2021 22:14:57 +0530 [thread overview]
Message-ID: <CAMty3ZA+BwtGLhFM8gS5f_=j4JnMrvnqf01bTW4mbe0ddyiG-Q@mail.gmail.com> (raw)
In-Reply-To: <YbIxGc8faqUQhUWP@pendragon.ideasonboard.com>
Hi Laurent,
On Thu, Dec 9, 2021 at 10:09 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> 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@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 ?
Agreed, thanks (Usually I do check to avoid NULL pointer if any).
Jagan.
next prev parent reply other threads:[~2021-12-09 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 9:19 [PATCH v4 0/4] ti-sn65dsi83 patches Alexander Stein
2021-11-18 9:19 ` [PATCH v4 1/4] dt-bindings: display: bridge: sn65dsi83: Make enable GPIO optional Alexander Stein
2021-12-09 7:07 ` Jagan Teki
2021-12-09 12:23 ` (EXT) " Alexander Stein
2021-11-18 9:19 ` [PATCH v4 2/4] drm/bridge: ti-sn65dsi83: " Alexander Stein
2021-11-18 9:19 ` [PATCH v4 3/4] dt-bindings: drm/bridge: ti-sn65dsi83: Add vcc supply bindings Alexander Stein
2021-12-09 7:08 ` Jagan Teki
2021-11-18 9:19 ` [PATCH v4 4/4] drm/bridge: ti-sn65dsi83: Add vcc supply regulator support Alexander Stein
2021-12-09 7:04 ` Jagan Teki
2021-12-09 16:38 ` Laurent Pinchart
2021-12-09 16:44 ` Jagan Teki [this message]
2021-12-09 16:37 ` Laurent Pinchart
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='CAMty3ZA+BwtGLhFM8gS5f_=j4JnMrvnqf01bTW4mbe0ddyiG-Q@mail.gmail.com' \
--to=jagan@amarulasolutions.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=alexander.stein@ew.tq-group.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=laurent.pinchart@ideasonboard.com \
--cc=narmstrong@baylibre.com \
--cc=robert.foss@linaro.org \
--cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).