Re: [PATCH 2/3] regulator: add a subdriver for TI TPS6105xregulator portions
From: Mark Brown
Date: Tue Mar 08 2011 - 08:29:21 EST
On Tue, Mar 08, 2011 at 02:26:14PM +0100, Linus Walleij wrote:
> On Tue, Mar 8, 2011 at 12:56 PM, Mark Brown
> >> + ? ? /* This instance is not set for regulator mode so bail out */
> >> + ? ? if (pdata->mode != TPS6105X_MODE_VOLTAGE)
> >> + ? ? ? ? ? ? return 0;
> > -ENODEV? ?Logging to explain why we're bombing out might be helpful too.
> Not in this case actually, the chip is configured by platform data to
> operate as regulator, LED or flashgun. All three drivers may be
> compiled in at some point, and a system may have three TPS chips
> performing each function. They will spawn three children each,
> but only one of them should probe.
> So the fact that the regulator driver doesn't probe doesn't mean any
> failure, some other driver will likely probe successfully for the chip.
The general approach other MFDs have taken to this is to pay attention
to the platform data when registering subdevices so that you don't get
inappropriate subdevices registered in the first place.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/