]> git.baikalelectronics.ru Git - kernel.git/commit
thermal/drivers/tsens: Sort out msm8976 vs msm8956 data
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sun, 1 Jan 2023 19:40:20 +0000 (21:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:32:54 +0000 (09:32 +0100)
commit7b4352063d00777ba6259d824a295c7b57286c34
tree2b817cc1c1f274c6607566de4693c9be5cd8f83d
parent8b9c5282e98bf66d2acdc75ae283a43d2c8e9a9e
thermal/drivers/tsens: Sort out msm8976 vs msm8956 data

[ Upstream commit f5ceb59163fe7b7d184185a823b6b1726f28b337 ]

Tsens driver mentions that msm8976 data should be used for both msm8976
and msm8956 SoCs. This is not quite correct, as according to the
vendor kernels, msm8976 should use standard slope values (3200), while
msm8956 really uses the slope values found in the driver.

Add separate compatibility string for msm8956, move slope value
overrides to the corresponding init function and use the standard
compute_intercept_slope() function for both platforms.

Fixes: 629b0697e72a ("thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976")
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230101194034.831222-7-dmitry.baryshkov@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/qcom/tsens-v1.c
drivers/thermal/qcom/tsens.c
drivers/thermal/qcom/tsens.h