[PATCH v3 2/6] thermal/drivers/mediatek/lvts_thermal: Honor sensors in immediate mode

Alexandre Mergnat amergnat at baylibre.com
Fri Jul 7 06:50:37 PDT 2023



On 06/07/2023 17:37, Nícolas F. R. A. Prado wrote:
> Each controller can be configured to operate on immediate or filtered
> mode. On filtered mode, the sensors are enabled by setting the
> corresponding bits in MONCTL0, while on immediate mode, by setting
> MSRCTL1.
> 
> Previously, the code would set MSRCTL1 for all four sensors when
> configured to immediate mode, but given that the controller might not
> have all four sensors connected, this would cause interrupts to trigger
> for non-existent sensors. Fix this by handling the MSRCTL1 register
> analogously to the MONCTL0: only enable the sensors that were declared.


Reviewed-by: Alexandre Mergnat <amergnat at baylibre.com>

-- 
Regards,
Alexandre



More information about the Linux-mediatek mailing list