From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [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>
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131206/b167f37c/attachment.sig>
next prev parent reply other threads:[~2013-12-06 13:23 UTC|newest]
Thread overview: 18+ 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][ 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][ 4/8] staging: imx-drm: Use de-active and pixelclk-active display-timings Denis Carikli
2013-12-05 20:54 ` Marek Vasut
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]
2013-12-05 18:28 ` [PATCHv5][ 6/8] ARM: dts: mbimx51sd: Add display support Denis Carikli
2013-12-05 20:56 ` Marek Vasut
2014-01-22 13:56 ` Denis Carikli
2013-12-05 18:28 ` [PATCHv5][ 7/8] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support Denis Carikli
2013-12-05 18:28 ` [PATCHv5][ 8/8] ARM: imx_v6_v7_defconfig: Enable backlight gpio support Denis Carikli
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=linux-arm-kernel@lists.infradead.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).