Page MenuHomeFreeBSD

regulator_fixed: Add a get_voltage method

Authored by manu on Jan 2 2020, 3:27 PM.



Some consumer cannot know the voltage of the regulator without it.
While here, refuse to attach is min_voltage != max_voltage, it
shouldn't happens anyway.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

manu created this revision.Jan 2 2020, 3:27 PM
mmel accepted this revision.Jan 6 2020, 3:32 PM

This is slightly controversial. "regulator-min-microvolt" nor"regulator-max-microvolt" are not required properties for fixed regulators so we can't do this so simply. inmo,, we should monitor the presence of these properties and use this info for generate of the result.

This revision is now accepted and ready to land.Jan 6 2020, 3:32 PM
manu added a comment.Jan 6 2020, 5:13 PM

If there is no propoerties both value will be 0 and this will be ok.
If there is one there should be the other, even if it's not clear in the bindings doc I don't think that it make sense to only have one.

This revision was automatically updated to reflect the committed changes.