HomeFreeBSD

regulator: Add a regnode_set_constraint function

Description

regulator: Add a regnode_set_constraint function

This method check that boot_on or always_on is set to 1 and if it
is it will try to enable the regulator.
The binding docs aren't clear on what to do but Linux enable the regulator
if any of those properties is set so we want to do the same.
The function first check the status to see if the regulator is
already enabled it then get the voltage to check if it is in a acceptable
range and then enables it.
This will be either called from the regnode_init method (if it's needed by the platform)
or by a SYSINIT at SI_SUB_LAST

Reviewed by: mmel
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D22106

Details

Provenance
manuAuthored on
Reviewer
mmel
Differential Revision
D22106: regulator: Add a regnode_set_constraint function
Parents
rS353918: axp81x: Use the default regnode_init method
Branches
Unknown
Tags
Unknown