From: Markus Pargmann <mpa@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] regulator: max8660: Add error message for missing regulator data
Date: Tue, 24 Mar 2015 17:40:11 +0100 [thread overview]
Message-ID: <20150324164011.GL28604@pengutronix.de> (raw)
In-Reply-To: <20150324160857.GF17265@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]
On Tue, Mar 24, 2015 at 09:08:57AM -0700, Mark Brown wrote:
> On Tue, Mar 24, 2015 at 01:08:03PM +0100, Markus Pargmann wrote:
> > The driver probe fails when there is a subdevice without platform_data.
> > Add a error message so it is clear what failed.
>
> ...
>
> > for (i = 0; i < pdata->num_subdevs; i++) {
> > - if (!pdata->subdevs[i].platform_data)
> > + if (!pdata->subdevs[i].platform_data) {
> > + dev_err(dev, "No data for %d regulator\n", i);
> > return -EINVAL;
> > + }
>
> Why is the platform data mandatory? In general the goal is that a
> regulator driver should be able to probe with no platform data.
subdevs[]->platform_data is a struct regulator_init_data which has to
exist so we can register the regulator later.
Best Regards,
Markus
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-24 16:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 12:08 [PATCH 1/2] regulator: max8660: Remove boot_on handling Markus Pargmann
2015-03-24 12:08 ` [PATCH 2/2] regulator: max8660: Add error message for missing regulator data Markus Pargmann
2015-03-24 12:38 ` Wolfram Sang
2015-03-24 16:36 ` Markus Pargmann
2015-03-24 16:08 ` Mark Brown
2015-03-24 16:40 ` Markus Pargmann [this message]
2015-03-24 17:07 ` Mark Brown
2015-03-24 16:22 ` [PATCH 1/2] regulator: max8660: Remove boot_on handling Mark Brown
2015-03-24 16:49 ` Markus Pargmann
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=20150324164011.GL28604@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=broonie@kernel.org \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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).