regulator: anatop: allow regulator to be in bypass mode
authorMika Båtsman <mbatsman@mvista.com>
Fri, 17 Jun 2016 10:31:37 +0000 (13:31 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 17 Jun 2016 10:40:20 +0000 (11:40 +0100)
commit8a092e682f20f193f2070dba2ea1904e95814126
tree59c156578219d2eaace521bc3b5f9c747d7fc039
parent1a695a905c18548062509178b98bc91e67510864
regulator: anatop: allow regulator to be in bypass mode

Bypass support was added in commit d38018f2019c ("regulator: anatop: Add
bypass support to digital LDOs"). A check for valid voltage selectors was
added in commit da0607c8df5c ("regulator: anatop: Fail on invalid voltage
selector") but it also discards all regulators that are in bypass mode. Add
check for the bypass setting. Errors below were seen on a Variscite mx6
board.

anatop_regulator 20c8000.anatop:regulator-vddcore@140: Failed to read a valid default voltage selector.
anatop_regulator: probe of 20c8000.anatop:regulator-vddcore@140 failed with error -22
anatop_regulator 20c8000.anatop:regulator-vddsoc@140: Failed to read a valid default voltage selector.
anatop_regulator: probe of 20c8000.anatop:regulator-vddsoc@140 failed with error -22

Fixes: da0607c8df5c ("regulator: anatop: Fail on invalid voltage selector")
Signed-off-by: Mika Båtsman <mbatsman@mvista.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/anatop-regulator.c