Re: [PATCH part2 5/6] regulator: max14577: Implement SUSPEND mode for MAX77836 LDO-s

From: Krzysztof Kozlowski
Date: Mon May 05 2014 - 04:47:36 EST


On czw, 2014-05-01 at 11:19 -0700, Mark Brown wrote:
> On Wed, Apr 23, 2014 at 04:50:39PM +0200, Krzysztof Kozlowski wrote:
>
> > This patch adds support for mode REGULATOR_MODE_STANDBY (and NORMAL) to
> > LDO regulators by implementing the set_mode() and get_mode() operations.
> > However the necessary regulator constraints (valid modes) are not parsed
> > by of_regulator_match() so the driver adds them manually to the
> > regulator init_data.
>
> No, that's not the idea here. The reason that the modes need to be
> explicitly enabled is that there's an element of board design in
> determining if a given mode can satisfy the required current demand for
> the board with sufficient quality (usually the lower power modes have
> both a lower maximum current and poorer regulation accuracy especially
> as the current rises). Doing it unconditionally isn't in general
> reliable.
>
> The reason that the modes aren't supported by DT is that defining a
> binding is hard - it's not clear what exactly a "mode" means since it's
> basically a Linux internal thing. We probably need to explicitly add
> definitions of the modes to the bindings for individual devices
> unfortunately (ie, saying "mode X maps to Y in the datasheet", possibly
> using the datasheet modes in the binding for ease of use and having that
> translation in the driver).
>
> Ideally we'd be able to have the automatic mode setting working for
> devices but in practice nobody wants to publish the numbers and working
> out how much the board needs can also be hard so that isn't really
> practical.

I understand. Lets skip this patch now. I will prepare in the future a
version of this patch with own DT binding for max77836 suspend mode.

Best regards,
Krzysztof

--
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/