02cf5bcb | 13-Jul-2023 |
Min-Hua Chen <minhuadotchen@gmail.com> |
thermal/drivers/tsens: Make tsens_xxxx_nvmem static
This patch fixes the following sparse warnings:
drivers/thermal/qcom/tsens-v1.c:24:40: sparse: warning: symbol 'tsens_qcs404_nvmem' was not decla
thermal/drivers/tsens: Make tsens_xxxx_nvmem static
This patch fixes the following sparse warnings:
drivers/thermal/qcom/tsens-v1.c:24:40: sparse: warning: symbol 'tsens_qcs404_nvmem' was not declared. Should it be static? drivers/thermal/qcom/tsens-v0_1.c:26:40: sparse: warning: symbol 'tsens_8916_nvmem' was not declared. Should it be static? drivers/thermal/qcom/tsens-v0_1.c:42:40: sparse: warning: symbol 'tsens_8974_nvmem' was not declared. Should it be static? drivers/thermal/qcom/tsens-v0_1.c:64:40: sparse: warning: symbol 'tsens_8974_backup_nvmem' was not declared. Should it be static?
No functional change intended.
Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230713160415.149381-1-minhuadotchen@gmail.com
show more ...
|
4af164c1 | 07-Jun-2023 |
Stephan Gerhold <stephan.gerhold@kernkonzept.com> |
thermal/drivers/qcom/tsens-v0_1: Add MSM8909 data
The MSM8909 SoC has 5 thermal sensors in a TSENS v0.1 block. Like MDM9607 it uses a non-standard default slope value of 3000 [1] and needs per-senso
thermal/drivers/qcom/tsens-v0_1: Add MSM8909 data
The MSM8909 SoC has 5 thermal sensors in a TSENS v0.1 block. Like MDM9607 it uses a non-standard default slope value of 3000 [1] and needs per-sensor "correction factors" to workaround issues with the factory calibration [2].
[1]: https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LA.UM.7.7.c26-09100-8x09.0/arch/arm/boot/dts/qcom/msm8909.dtsi#L476 [2]: https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/commit/6df022c6d0c2c1b4a5a6c2124dba4d57910c0911
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230508-msm8909-tsens-v5-6-5eb632235ba7@kernkonzept.com
show more ...
|
b6f739da | 07-Jun-2023 |
Stephan Gerhold <stephan.gerhold@kernkonzept.com> |
thermal/drivers/qcom/tsens-v0_1: Add mdm9607 correction offsets
According to the msm-3.18 vendor kernel from Qualcomm, mdm9607 needs "correction factors" to adjust for additional offsets observed af
thermal/drivers/qcom/tsens-v0_1: Add mdm9607 correction offsets
According to the msm-3.18 vendor kernel from Qualcomm, mdm9607 needs "correction factors" to adjust for additional offsets observed after the factory calibration values in the fuses [1, 2].
The fixed offsets should be applied unless there is a special calibration mode value that indicates that no offsets are needed [3].
Note that the new calibration mode values are called differently in this patch compared to the vendor kernel: - TSENS_TWO_POINT_CALIB_N_WA -> ONE_PT_CALIB2_NO_OFFSET - TSENS_TWO_POINT_CALIB_N_OFFSET_WA -> TWO_PT_CALIB_NO_OFFSET This is because close inspection of the calibration function [3] reveals that TSENS_TWO_POINT_CALIB_N_WA is actually a "one point" calibration because the if statements skip all "point2" related code for it.
[1]: https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/commit/d9d2db1b82bf3f72f5de0803d55e6849eb5b671e [2]: https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/commit/d75aef53a760e8ff7bac54049d00c8b2ee1b193e [3]: https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LE.UM.4.3.2.r1-04200-9x07/drivers/thermal/msm-tsens.c#L2987-3136
Fixes: a2149ab815fc ("thermal/drivers/qcom/tsens-v0_1: Add support for MDM9607") Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230508-msm8909-tsens-v5-3-5eb632235ba7@kernkonzept.com
show more ...
|
6812d1df | 07-Jun-2023 |
Stephan Gerhold <stephan.gerhold@kernkonzept.com> |
thermal/drivers/qcom/tsens-v0_1: Fix mdm9607 slope values
According to the msm-3.18 vendor kernel from Qualcomm [1], mdm9607 uses a non-standard slope value of 3000 (instead of 3200) for all sensors
thermal/drivers/qcom/tsens-v0_1: Fix mdm9607 slope values
According to the msm-3.18 vendor kernel from Qualcomm [1], mdm9607 uses a non-standard slope value of 3000 (instead of 3200) for all sensors. Fill it properly similar to the 8939 code added recently.
[1]: https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LE.UM.4.3.2.r1-04200-9x07/arch/arm/boot/dts/qcom/mdm9607.dtsi#L875
Fixes: a2149ab815fc ("thermal/drivers/qcom/tsens-v0_1: Add support for MDM9607") Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230508-msm8909-tsens-v5-2-5eb632235ba7@kernkonzept.com
show more ...
|
c631da1f | 07-Jun-2023 |
Stephan Gerhold <stephan.gerhold@kernkonzept.com> |
thermal/drivers/qcom/tsens: Drop unused legacy structs
The old single-cell parsing code was removed for MSM8939, MDM9607 and MSM8976 but for some reason the structs defining the bit positions etc we
thermal/drivers/qcom/tsens: Drop unused legacy structs
The old single-cell parsing code was removed for MSM8939, MDM9607 and MSM8976 but for some reason the structs defining the bit positions etc were kept around (unused). Drop them now.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Fixes: 51d78b8b1beb ("thermal/drivers/tsens: Drop single-cell code for mdm9607") Fixes: dfadb4599ab0 ("thermal/drivers/tsens: Drop single-cell code for msm8939") Fixes: 3a908971f7cb ("thermal/drivers/tsens: Drop single-cell code for msm8976/msm8956") Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230508-msm8909-tsens-v5-1-5eb632235ba7@kernkonzept.com
show more ...
|
5618f1be | 03-Jan-2023 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
thermal/drivers/qcom-spmi-adc-tm5: Use asm intead of asm-generic
There is no point to specify asm-generic for the unaligned.h. Drop the 'generic' suffix.
Signed-off-by: Andy Shevchenko <andriy.shev
thermal/drivers/qcom-spmi-adc-tm5: Use asm intead of asm-generic
There is no point to specify asm-generic for the unaligned.h. Drop the 'generic' suffix.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20230103145339.40501-1-andriy.shevchenko@linux.intel.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
df715f26 | 16-Jan-2023 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
thermal/drivers/qcom: Remove duplicate set next trip point interrupt code
The tsens driver reprogram the next trip points in the irq handler. This function then call thermal_zone_device_update().
H
thermal/drivers/qcom: Remove duplicate set next trip point interrupt code
The tsens driver reprogram the next trip points in the irq handler. This function then call thermal_zone_device_update().
However, thermal_zone_device_update() calls thermal_zone_set_trips() and from there it calls the backend 'set_trips' ops. This one in turn reprogram the next trip points (low/high).
Consequently, the code setting the next trip points interrupt in the interrupt handle is not needed and could be removed.
Reviewed-by: Bjorn Andersson <andersson@kernel.org> Acked-by: Amit Kucheria <amitk@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230116101955.3961427-1-daniel.lezcano@linaro.org
show more ...
|
3a908971 | 01-Jan-2023 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
thermal/drivers/tsens: Drop single-cell code for msm8976/msm8956
There is no dtsi file for msm8976 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling
thermal/drivers/tsens: Drop single-cell code for msm8976/msm8956
There is no dtsi file for msm8976 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the single-cell calibration data on msm8976.
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230101194034.831222-15-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
dfadb459 | 01-Jan-2023 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
thermal/drivers/tsens: Drop single-cell code for msm8939
There is no dtsi file for msm8939 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the sing
thermal/drivers/tsens: Drop single-cell code for msm8939
There is no dtsi file for msm8939 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the single-cell calibration data on msm8939.
Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20230101194034.831222-14-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
51d78b8b | 01-Jan-2023 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
thermal/drivers/tsens: Drop single-cell code for mdm9607
There is no dtsi file for mdm9607 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the sing
thermal/drivers/tsens: Drop single-cell code for mdm9607
There is no dtsi file for mdm9607 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the single-cell calibration data on mdm9607.
Cc: Konrad Dybcio <konrad.dybcio@linaro.org> 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-13-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
913d32e2 | 01-Jan-2023 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
thermal/drivers/tsens: Rework legacy calibration data parsers
Rework existing calibration parsing code to use simple data structure describing data layout. This allows us to drop all the mask & shif
thermal/drivers/tsens: Rework legacy calibration data parsers
Rework existing calibration parsing code to use simple data structure describing data layout. This allows us to drop all the mask & shift values, replacing them with data tables.
The code for msm8974 is not reworked, as it has separate calibration and backup data.
Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20230101194034.831222-12-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
439f2409 | 01-Jan-2023 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
thermal/drivers/tsens: Support using nvmem cells for msm8974 calibration
MSM8974 has two sets of calibration data: main one and backup. Add support for parsing both sets of calibration data from nvm
thermal/drivers/tsens: Support using nvmem cells for msm8974 calibration
MSM8974 has two sets of calibration data: main one and backup. Add support for parsing both sets of calibration data from nvmem cells.
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-11-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
498d2457 | 01-Jan-2023 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
thermal/drivers/tsens: Support using nvmem cells for calibration data
Add a unified function using nvmem cells for parsing the calibration data rather than parsing the calibration blob manually.
Si
thermal/drivers/tsens: Support using nvmem cells for calibration data
Add a unified function using nvmem cells for parsing the calibration data rather than parsing the calibration blob manually.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20230101194034.831222-10-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|