Page MenuHomeFreeBSD

extres: regulator: Fix regulator_status for already enable regulators
ClosedPublic

Authored by manu on May 16 2021, 3:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 14 2024, 12:24 PM
Unknown Object (File)
Dec 23 2023, 3:09 AM
Unknown Object (File)
Dec 14 2023, 10:29 PM
Unknown Object (File)
Dec 8 2023, 5:01 PM
Unknown Object (File)
Sep 12 2023, 11:48 PM
Unknown Object (File)
Jun 4 2023, 11:05 PM
Unknown Object (File)
Apr 8 2023, 10:41 AM
Unknown Object (File)
Apr 2 2023, 4:47 PM
Subscribers
None

Details

Summary

If a regulator hasn't been enable by a driver but is enabled in hardware
(most likely enabled by U-Boot), regulator_status will returns that it
is enabled and so any call to regulator_disable will panic as it wasn't
enabled by one of our drivers.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

manu requested review of this revision.May 16 2021, 3:16 PM
manu created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.May 21 2021, 4:06 PM
This revision was automatically updated to reflect the committed changes.

IMHO, this is wrong change. regulator_status() must report physical state of regulator - if given deice is powered or not. the mmc power sequencer should use similar technique as backlight. But seems like this kind of usage is common - so we can expand regulator framework with uncounted function -> something like regulator_on()/regulator_off()