Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

From: Tim Kryger
Date: Fri Aug 15 2014 - 10:19:46 EST


On Fri, Aug 15, 2014 at 12:48 AM, Javier Martinez Canillas
<javier.martinez@xxxxxxxxxxxxxxx> wrote:
> Hello Tim,
>
> On 08/15/2014 07:36 AM, Tim Kryger wrote:
>> On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown <broonie@xxxxxxxxxx> wrote:
>>
>>> Right, there's two things going on here. One is that as you describe we
>>> shouldn't be putting constraints in .dtsi files if we don't know they're
>>> OK for a given board. The other thing is that on this particular board
>>> it turns out that there's no support for varying the voltages at all so
>>> it doesn't make sense to have to specify a range, there's only one value
>>> anyway so the software really should be able to figure out that fixed
>>> value all by itself.
>>
>> If constraints are truly irrelevant when the voltage supplied to
>> consumers is fixed, why doesn't regulator_list_voltage honor this
>> exemption and skip the voltage filtering that uses (potentially
>> unspecified) constraints when output is entirely determined by a
>> parent (or grandparent) supply that can't change its voltage?
>>
>
> I had a similar thought before and proposed the patch:
>
> "[RFC 3/5] regulator: core: Only apply constraints if available on list
> voltage" [0].

> [0]: https://lkml.org/lkml/2014/7/29/418

You proposed constraints only be applied when they are defined.

That is a little different from my suggestion where the constraints
check is skipped when the regulator output is fixed. It effectively
does this now when the regulator itself provides the fixed voltage.
However, the checks aren't skipped when that fixed voltage is coming
from an ancestor. Why the difference?

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