[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150324164011.GL28604@pengutronix.de>
Date: Tue, 24 Mar 2015 17:40:11 +0100
From: Markus Pargmann <mpa@...gutronix.de>
To: Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Wolfram Sang <wsa@...-dreams.de>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] regulator: max8660: Add error message for missing
regulator data
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 |
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists