Page MenuHomeFreeBSD

regulator: Set correct uvolt value in regnode_set_constraint
AbandonedPublic

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

Details

Reviewers
mmel
Summary

If a regulator is enabled but doesn't have the correct value set,
do it (this can happen if the bootloader didn't do the right thing).
Only then we can enable the regulator if it wasn't enabled.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

manu created this revision.Jan 2 2020, 3:30 PM
mmel requested changes to this revision.Jan 6 2020, 3:40 PM

I think that this is wrong way to fix you issue. We should not rely on preset values from loader. Voltages should be adjusted by drivers, and if this is not possible, the PMIC driver itself should set right values within its initialization - in exactly same way as we do within clocks initialization.

This revision now requires changes to proceed.Jan 6 2020, 3:40 PM
manu added a comment.Jan 7 2020, 11:50 AM

Mhm you might be right, maybe I should make the rk808 driver init the regulator at attach, or with SYSINIT at the end of boot

manu abandoned this revision.Jan 16 2020, 9:01 PM

Changes will be made to the rk805 driver instead.