devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Robert Chiras <robert.chiras@nxp.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH v4 2/2] drm/panel: Add support for Raydium RM67191 panel driver
Date: Tue, 25 Jun 2019 11:06:00 -0300	[thread overview]
Message-ID: <CAOMZO5C2syuzyGcpjVOvSvDghaA-ifc8oL-pqhivP49wBf=GSw@mail.gmail.com> (raw)
In-Reply-To: <1561446674-25084-3-git-send-email-robert.chiras@nxp.com>

Hi Robert,

On Tue, Jun 25, 2019 at 4:28 AM Robert Chiras <robert.chiras@nxp.com> wrote:

> +static int rad_bl_get_brightness(struct backlight_device *bl)
> +{
> +       struct mipi_dsi_device *dsi = bl_get_data(bl);
> +       struct rad_panel *rad = mipi_dsi_get_drvdata(dsi);
> +       struct device *dev = &dsi->dev;
> +       u16 brightness;
> +       int ret;
> +
> +       if (!rad->prepared)
> +               return 0;
> +
> +       DRM_DEV_DEBUG_DRIVER(dev, "\n");

Please remove this debug line.

> +       if (!rad->prepared)
> +               return 0;
> +
> +       DRM_DEV_DEBUG_DRIVER(dev, "New brightness: %d\n", bl->props.brightness);

Please remove it.

> +       ret = of_property_read_u32(np, "dsi-lanes", &dsi->lanes);
> +       if (ret) {
> +               dev_err(dev, "Failed to get dsi-lanes property (%d)\n", ret);
> +               return ret;
> +       }
> +
> +       panel->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);

Even it is optional, you still need to check for error and propagate
it in the case of error.

Otherwise defer probe will not work.

> +       ret = drm_panel_add(&panel->panel);
> +       if (ret)
> +               return ret;
> +
> +

One blank line is enough.

      reply	other threads:[~2019-06-25 14:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25  7:11 [PATCH v4 0/2] Add DSI panel driver for Raydium RM67191 Robert Chiras
2019-06-25  7:11 ` [PATCH v4 1/2] dt-bindings: display: panel: Add support for Raydium RM67191 panel Robert Chiras
2019-06-25  7:11 ` [PATCH v4 2/2] drm/panel: Add support for Raydium RM67191 panel driver Robert Chiras
2019-06-25 14:06   ` Fabio Estevam [this message]

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='CAOMZO5C2syuzyGcpjVOvSvDghaA-ifc8oL-pqhivP49wBf=GSw@mail.gmail.com' \
    --to=festevam@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robert.chiras@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    /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).