Re: [PATCH] regulator: don't fail to apply_uV for fixed regulatorswithout set_voltage

From: Mark Brown
Date: Tue Jul 03 2012 - 18:32:29 EST


On Tue, Jul 03, 2012 at 04:03:34PM -0600, Stephen Warren wrote:

> When instantiating a regulator from device tree,
> of_get_regulation_constraints() sets apply_uV=true when min_uV==max_uV.
> If the regulator only supports that one voltage, it may not implement
> set_voltage or set_voltage_sel. If so, the call from
> machine_constraints_voltage() to _regulator_do_set_voltage() will fail,
> since the latter requires one of those ops to be implemented. Avoid this
> problem by avoiding the call to _regulator_do_set_voltage() if the
> regulator is already set of the specified voltage.

This just seems like someone's written a silly device tree - they're
asking the OS to set a voltage on something with a fixed voltage. From
discussion on IRC it seems like this was a misunderstanding on your part
about what one is intended to put in the device tree, the idea is that
the DT should only specify things that are changed on the board - users
shouldn't need to cut'n'paste information that's fixed in the PMIC
silicon into each board DT.

Besides, there's clearly not anything specific to setting constraints
about this...
--
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/