Commit cd1a3b2f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files
Merge updates of assorted thermal drivers for 7.1-rc1 from Daniel
Lezcano:

"- Added an OF node address to output message to make sensor names more
   distinguishable (Alexander Stein)

 - Added hwmon support for the i.MX97 thermal sensor (Alexander Stein)

 - Clamped correctly the results when doing value/temperature conversion
   in the Spreadtrum driver (Thorsten Blum)

 - Added the SDM670 compatible DT bindings for the Tsens and the lMH
   drivers (Richard Acayan)

 - Added the SM8750 compatible DT bindings for the Tsens (Manaf
   Meethalavalappu Pallikunhi)

 - Added the Eliza SoC compatible DT bindings for the Tsens (Krzysztof
   Kozlowski)

 - Fixed inverted condition check on error in the Spear driver (Gopi
   Krishna Menon)

 - Converted the DT bindings documentation into DT schema (Gopi Krishna
   Menon)

 - Used max() macro to increase readibility in the Broadcom STB thermal
   sensor (Thorsten Blum)

 - Removed stale @trim_offset kernel-doc entry (John Madieu)"

* tag 'thermal-v7.1-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
  thermal: renesas: rzg3e: Remove stale @trim_offset kernel-doc entry
  thermal/drivers/brcmstb_thermal: Use max to simplify brcmstb_get_temp
  dt-bindings: thermal: st,thermal-spear1340: convert to dtschema
  thermal/drivers/spear: Fix error condition for reading st,thermal-flags
  dt-bindings: thermal: qcom-tsens: Add Eliza SoC TSENS
  dt-bindings: thermal: qcom-tsens: Document the SM8750 Temperature Sensor
  thermal/drivers/sprd: Use min instead of clamp in sprd_thm_temp_to_rawdata
  dt-bindings: thermal: lmh: Add SDM670 compatible
  dt-bindings: thermal: tsens: add SDM670 compatible
  thermal/drivers/sprd: Fix raw temperature clamping in sprd_thm_rawdata_to_temp
  thermal/drivers/sprd: Fix temperature clamping in sprd_thm_temp_to_rawdata
  thermal/drivers/imx91: Add hwmon support
  thermal/of: Add OF node address to output message
parents ecc26ba4 bf746e2a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@ properties:
          - qcom,sc8180x-lmh
          - qcom,sdm845-lmh
          - qcom,sm8150-lmh
      - items:
          - const: qcom,sdm670-lmh
          - const: qcom,sdm845-lmh
      - items:
          - const: qcom,qcm2290-lmh
          - const: qcom,sm8150-lmh
+3 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ properties:
      - description: v2 of TSENS
        items:
          - enum:
              - qcom,eliza-tsens
              - qcom,glymur-tsens
              - qcom,kaanapali-tsens
              - qcom,milos-tsens
@@ -71,6 +72,7 @@ properties:
              - qcom,sc8180x-tsens
              - qcom,sc8280xp-tsens
              - qcom,sdm630-tsens
              - qcom,sdm670-tsens
              - qcom,sdm845-tsens
              - qcom,sm6115-tsens
              - qcom,sm6350-tsens
@@ -81,6 +83,7 @@ properties:
              - qcom,sm8450-tsens
              - qcom,sm8550-tsens
              - qcom,sm8650-tsens
              - qcom,sm8750-tsens
              - qcom,x1e80100-tsens
          - const: qcom,tsens-v2

+0 −14
Original line number Diff line number Diff line
* SPEAr Thermal

Required properties:
- compatible : "st,thermal-spear1340"
- reg : Address range of the thermal registers
- st,thermal-flags: flags used to enable thermal sensor

Example:

	thermal@fc000000 {
		compatible = "st,thermal-spear1340";
		reg = <0xfc000000 0x1000>;
		st,thermal-flags = <0x7000>;
	};
+36 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SPEAr Thermal Sensor

maintainers:
  - Viresh Kumar <vireshk@kernel.org>

properties:
  compatible:
    const: st,thermal-spear1340

  reg:
    maxItems: 1

  st,thermal-flags:
    description: flags used to enable thermal sensor
    $ref: /schemas/types.yaml#/definitions/uint32

required:
  - compatible
  - reg
  - st,thermal-flags

additionalProperties: false

examples:
  - |
    thermal@fc000000 {
      compatible = "st,thermal-spear1340";
      reg = <0xfc000000 0x1000>;
      st,thermal-flags = <0x7000>;
    };
+3 −5
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include <linux/irqreturn.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
@@ -154,7 +155,7 @@ static int brcmstb_get_temp(struct thermal_zone_device *tz, int *temp)
{
	struct brcmstb_thermal_priv *priv = thermal_zone_device_priv(tz);
	u32 val;
	long t;
	int t;

	val = __raw_readl(priv->tmon_base + AVS_TMON_STATUS);

@@ -164,10 +165,7 @@ static int brcmstb_get_temp(struct thermal_zone_device *tz, int *temp)
	val = (val & AVS_TMON_STATUS_data_msk) >> AVS_TMON_STATUS_data_shift;

	t = avs_tmon_code_to_temp(priv, val);
	if (t < 0)
		*temp = 0;
	else
		*temp = t;
	*temp = max(0, t);

	return 0;
}
Loading