Re: [PATCH v9 3/7] thermal/drivers/tsens: Add TSENS enable and calibration support for V2
From: Dmitry Baryshkov
Date: Tue Nov 26 2024 - 07:06:44 EST
On Mon, Nov 25, 2024 at 10:37:24AM +0530, Manikanta Mylavarapu wrote:
> From: Praveenkumar I <quic_ipkumar@xxxxxxxxxxx>
>
> SoCs without RPM need to enable sensors and calibrate them from the kernel.
> The IPQ5332 and IPQ5424 use the tsens v2.3.3 IP and do not have RPM.
> Therefore, add a new calibration function for V2, as the tsens.c calib
> function only supports V1. Also add new feature_config, ops and data for
> IPQ5332, IPQ5424.
>
> Although the TSENS IP supports 16 sensors, not all are used. The hw_id
> is used to enable the relevant sensors.
>
> Signed-off-by: Praveenkumar I <quic_ipkumar@xxxxxxxxxxx>
> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@xxxxxxxxxxx>
> ---
> Changes in V9:
> - Update variable declaration order in tsens_v2_calibrate_sensor()
> - Replace tab with space during the 'val' computation in the
> tsens_v2_calibrate_sensor()
> - Update 'RSEULT_FORMAT_TEMP' to 'RESULT_FORMAT_TEMP'
>
> drivers/thermal/qcom/tsens-v2.c | 178 ++++++++++++++++++++++++++++++++
> drivers/thermal/qcom/tsens.c | 8 +-
> drivers/thermal/qcom/tsens.h | 4 +-
> 3 files changed, 188 insertions(+), 2 deletions(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
--
With best wishes
Dmitry