Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.
From: Javier Martinez Canillas
Date: Thu Aug 14 2014 - 11:29:55 EST
Hello Tim,
Thanks for your feedback.
On 08/14/2014 04:13 PM, Tim Kryger wrote:
>
> https://lkml.org/lkml/2014/8/12/377
>
> Perhaps I misunderstood the discussion in that thread but couldn't
> this failure also be addressed by adding proper constraints for each
> FET in individual DTS files to reflect the range of voltages that are
> safe for all consumers of that supply on the board?
>
> I thought the main concern with your other change was that the
> constraints you listed in the DTSI represented the limits of the PMIC
> and not the consumers.
>
> -Tim
>
Yes, if the child regulator has the constraints defined then
regulator_voltage_list() won't filter the obtained parent voltage so it
won't be necessary to call regulator_get_voltage() directly.
But as Mark said on the thread you referred [0], if the voltage is not
allowed to change for a regulator then it makes no sense to have their
constraints specify a voltage range. And in this particular case the
parent supply of the FET used as vmmc-supply is a fixed regulator.
Now I wonder why mmc_regulator_get_ocrmask() even sets as a valid voltage
in the OCR mask the voltage for a fixed regulator if
mmc_regulator_set_ocr() is a no-op in this case but I guess is because
users of this function shouldn't really care about this peculiarity. In
any case, this change is consistent since with this patch FETs behaves the
same as other fixed regulators whose voltage can't be changed but the
voltage is still reported in the OCR mask.
Best regards,
Javier
[0]: https://lkml.org/lkml/2014/8/13/364
--
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/