RohmSemiconductor / Linux-Kernel-PMIC-Drivers

Rohm power management IC drivers for Linux kernel.
2 stars 3 forks source link

BD71828/BD71815/BD718x7 regulators: HW run-level default handing is faulty #9

Closed M-Vaittinen closed 3 years ago

M-Vaittinen commented 3 years ago

The RUN_LEVEL definitions from include/linux/mfd/rohm-generic.h are used for bitmask by regulator drivers. The definitions are an enum W/O set values in the header => first few values (1,2) work fine but value 3 will already be invalid as it also sets both 1&2 and probably never matches 3 (if only one bit is compared).

On BD71837/47/50 this is probably not causing any problems as they only use RUN/IDLE/SUSPEND levels - and regulators which support suspend do also support RUN/IDLE. On BD71828 this may cause problems depending on device-tree.

A fix to this problem was submitted to the Linux community: https://lore.kernel.org/lkml/20210118075851.GA1016281@localhost.localdomain/T/#u

M-Vaittinen commented 3 years ago

Fixed by this patch: https://lore.kernel.org/lkml/20210118075851.GA1016281@localhost.localdomain/T/#u