2023-05-08 13:59:30

by Stephan Gerhold

[permalink] [raw]
Subject: [PATCH v4 0/6] thermal: qcom: tsens: Fix MDM9607, add MSM8909

Make the MDM9607 thermal sensor support consistent with Qualcomm's
vendor kernel (msm-3.18) by applying the correct default slope values
and adding "correction factors" to the factory calibration values in the
fuses. Use the same functionality to add the very similar MSM8909 SoC to
the tsens driver.

---
Changes in v4:
- Mostly just resend, explicitly initialize zero values for
the MSM8909 p1/p2_calib_offset for better clarity (Konrad)
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Drop now unused definition reported by kernel test robot
Changes in v2:
- Rewrite on top of per-sensor nvmem cell changes that landed in 6.3
- Add patches to fix existing support for MDM9607

---
Stephan Gerhold (6):
thermal: qcom: tsens: Drop unused legacy structs
thermal: qcom: tsens-v0_1: Fix mdm9607 slope values
thermal: qcom: tsens-v0_1: Add mdm9607 correction offsets
dt-bindings: thermal: qcom-tsens: Drop redundant compatibles
dt-bindings: thermal: qcom-tsens: Add MSM8909 compatible
thermal: qcom: tsens-v0_1: Add MSM8909 data

.../devicetree/bindings/thermal/qcom-tsens.yaml | 23 +----
drivers/thermal/qcom/tsens-v0_1.c | 99 +++++++++++++---------
drivers/thermal/qcom/tsens-v1.c | 22 -----
drivers/thermal/qcom/tsens.c | 19 ++++-
drivers/thermal/qcom/tsens.h | 6 +-
5 files changed, 84 insertions(+), 85 deletions(-)
---
base-commit: ac9a78681b921877518763ba0e89202254349d1b
change-id: 20230508-msm8909-tsens-6733a6d415be

Best regards,
--
Stephan Gerhold
Kernkonzept GmbH at Dresden, Germany, HRB 31129, CEO Dr.-Ing. Michael Hohmuth


2023-05-08 14:00:39

by Stephan Gerhold

[permalink] [raw]
Subject: [PATCH v4 4/6] dt-bindings: thermal: qcom-tsens: Drop redundant compatibles

Since the SoC compatibles must be followed by the IP version compatible
(e.g. compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";) it is
redundant to list all the SoC compatibles again in the if statement.
It will already match the IP-version compatible.

The list has already become inconsistent since for example
"qcom,msm8939-tsens" is covered by the if statement but is not listed
there explicitly like the other SoCs.

Simplify this by dropping the redundant SoC compatibles. ipq8064 and
msm8960 are still needed because they do not have an IP-version
compatible.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Stephan Gerhold <[email protected]>
---
.../devicetree/bindings/thermal/qcom-tsens.yaml | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index d1ec963a6834..59b74fdacf00 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -223,12 +223,7 @@ allOf:
contains:
enum:
- qcom,ipq8064-tsens
- - qcom,mdm9607-tsens
- - qcom,msm8916-tsens
- qcom,msm8960-tsens
- - qcom,msm8974-tsens
- - qcom,msm8976-tsens
- - qcom,qcs404-tsens
- qcom,tsens-v0_1
- qcom,tsens-v1
then:
@@ -244,22 +239,7 @@ allOf:
properties:
compatible:
contains:
- enum:
- - qcom,msm8953-tsens
- - qcom,msm8996-tsens
- - qcom,msm8998-tsens
- - qcom,sc7180-tsens
- - qcom,sc7280-tsens
- - qcom,sc8180x-tsens
- - qcom,sc8280xp-tsens
- - qcom,sdm630-tsens
- - qcom,sdm845-tsens
- - qcom,sm6350-tsens
- - qcom,sm8150-tsens
- - qcom,sm8250-tsens
- - qcom,sm8350-tsens
- - qcom,sm8450-tsens
- - qcom,tsens-v2
+ const: qcom,tsens-v2
then:
properties:
interrupts:

--
2.30.2