From: Thierry Reding <thierry.reding@gmail.com>
To: Denis Carikli <denis@eukrea.com>
Cc: "Marek Vasut" <marex@denx.de>,
devel@driverdev.osuosl.org,
driverdev-devel@linuxdriverproject.org,
"Eric Bénard" <eric@eukrea.com>,
"Pawel Moll" <pawel.moll@arm.com>,
"Stephen Warren" <swarren@wwwdotorg.org>,
"David Airlie" <airlied@linux.ie>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
"Rob Herring" <rob.herring@calxeda.com>,
devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Sascha Hauer" <kernel@pengutronix.de>,
"Mark Rutland" <mark.rutland@arm.com>,
"Shawn Guo" <shawn.guo@linaro.org>,
"Dan Carpenter" <dan.carpenter@oracle.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv5][ 5/8] staging: imx-drm: parallel display: add regulator support.
Date: Fri, 6 Dec 2013 14:23:25 +0100 [thread overview]
Message-ID: <20131206132324.GB30960@ulmo.nvidia.com> (raw)
In-Reply-To: <1386268092-21719-5-git-send-email-denis@eukrea.com>
[-- Attachment #1.1: Type: text/plain, Size: 974 bytes --]
On Thu, Dec 05, 2013 at 07:28:09PM +0100, Denis Carikli wrote:
[...]
> diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
[...]
> @@ -260,6 +275,13 @@ static int imx_pd_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> + imxpd->disp_reg = devm_regulator_get(&pdev->dev, "display");
> + if (PTR_ERR(imxpd->disp_reg) == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
> +
> + if (IS_ERR(imxpd->disp_reg))
> + dev_dbg(&pdev->dev, "Operating without display regulator.\n");
I don't think this is necessary. There is code in the regulator core
nowadays that supplies a dummy regulator if one hasn't been hooked up in
devicetree explicitly. So any error that you get at this point is likely
a valid one rather than just a missing regulator.
The advantage is that you no longer have to check at every step of the
way that the regulator is valid before calling the regulator API.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 169 bytes --]
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
prev parent reply other threads:[~2013-12-06 13:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 18:28 [PATCHv5][ 1/8] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format Denis Carikli
2013-12-05 18:28 ` [PATCHv5][ 4/8] staging: imx-drm: Use de-active and pixelclk-active display-timings Denis Carikli
2013-12-05 20:54 ` Marek Vasut
[not found] ` <1386268092-21719-1-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>
2013-12-05 18:28 ` [PATCHv5][ 2/8] staging: imx-drm: Add RGB666 support for parallel display Denis Carikli
2013-12-06 13:14 ` Thierry Reding
2013-12-06 13:29 ` Lucas Stach
2013-12-06 14:16 ` Thierry Reding
2013-12-05 18:28 ` [PATCHv5][ 3/8] staging: imx-drm: Correct BGR666 and the board's dts that use them Denis Carikli
2013-12-05 20:52 ` Marek Vasut
2013-12-06 13:07 ` Thierry Reding
2013-12-05 18:28 ` [PATCHv5][ 5/8] staging: imx-drm: parallel display: add regulator support Denis Carikli
2013-12-05 20:55 ` Marek Vasut
2013-12-06 13:23 ` Thierry Reding [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=20131206132324.GB30960@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=denis@eukrea.com \
--cc=devel@driverdev.osuosl.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=eric@eukrea.com \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marex@denx.de \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=shawn.guo@linaro.org \
--cc=swarren@wwwdotorg.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