]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r353917-r353919, r354396-r354397
authorEmmanuel Vadot <manu@FreeBSD.org>
Thu, 28 Nov 2019 18:44:06 +0000 (18:44 +0000)
committerEmmanuel Vadot <manu@FreeBSD.org>
Thu, 28 Nov 2019 18:44:06 +0000 (18:44 +0000)
commit619157927d68fc4e901ca80de8fe6c846cda8fbe
tree37f9b1886f0b67a97dae3c209796f22a0209fb47
parent565260c3c4fbfdbd6ce721c0f28de511c3ed843d
MFC r353917-r353919, r354396-r354397

r353917:
regulator: Add a regnode_method_init

This is a default init method for regulator that don't really
need one.

r353918:
axp81x: Use the default regnode_init method

r353919:
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
Differential Revision: https://reviews.freebsd.org/D22106

r354396:
regulator: Add regulator_check_voltage function

This function will call the regnode_check_voltage method for a given regulator
and check if the desired voltage in reachable by it.
Also adds a default method that check the std_param and which should be enough
for most regulators and add it as the method for axp* rk805 and fixed regulators.

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D22260

r354397:
arm: allwinner: aw_mmc: Check if the regulator support the voltage

Don't blindy say that we support both 3.3V and 1.8V.
If we have a regulator for the data lines, check that the voltage is
supported before adding the signaling caps.
If we don't have a regulator, just assume that the data lines are 3.3V
This unbreak eMMC on some allwinner boards.

Reported by: ganbold
X-MFC-With: r354396
sys/arm/allwinner/aw_mmc.c
sys/arm/allwinner/axp209.c
sys/arm/allwinner/axp81x.c
sys/arm64/rockchip/rk805.c
sys/dev/extres/regulator/regnode_if.m
sys/dev/extres/regulator/regulator.c
sys/dev/extres/regulator/regulator.h
sys/dev/extres/regulator/regulator_fixed.c