thermal: int340x: processor_thermal: Common function to clear SOC interrupt
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 9 Oct 2023 19:05:33 +0000 (12:05 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 12 Oct 2023 19:09:48 +0000 (21:09 +0200)
commit088f16f35257becaed1c3deececda6080bc77ee3
treecf8ebd94ca2e3bf83c27ce90530794c12ea30104
parent24e4c26202801f31392a04965b539e70223d9026
thermal: int340x: processor_thermal: Common function to clear SOC interrupt

The SOC interrupt status register contains multiple interrupt sources
(workload hint interrupt and power floor interrupt). It is not possible
to clear individual interrupt source with read-modify-write, as it may
clear the new interrupt from the firmware after a read operation. It is
also not possible to set the interrupt status bit to 1 for the other
interrupt source, which is not part of clearing.

Hence, create a common function, to clear all status bits at once.

Call this function after processing all interrupt sources.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
drivers/thermal/intel/int340x_thermal/processor_thermal_wt_hint.c