Commit e30fc090 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull thermal control updates from Rafael Wysocki:
 "These update the thermal control sysfs interface and multiple thermal
  control drivers:

   - Convert EAGAIN into ENODATA in temp_show() to prevent user space
     from polling the sysfs file in vain after a failing O_NONBLOCK read
     under the assumption that the read would have blocked (Hsin-Te
     Yuan)

   - Add Wildcat Lake PCI ID to the int340x Intel processor thermal
     driver (Srinivas Pandruvada)

   - Add debugfs interface to override the temperature set by the
     firmware in the Intel platform temperature control (PTC) interface
     and add a new sysfs control attribute called thermal_tolerance to
     it (Srinivas Pandruvada)

   - Enable the stage 2 shutdown in the qcom-spmi-temp-alarm thermal
     driver and add support for more SPMI variants to it (Anjelique
     Melendez)

   - Constify the thermal_zone_device_ops structure where possible in
     several assorted thermal drivers (Christophe Jaillet)

   - Use the dev_fwnode() helper instead of of_fwnode_handle(), as it is
     more adequate, wherever possible in thermal drivers (Jiri Slaby)

   - Implement and document One-Time Programmable fuse support in the
     Rockchip thermal driver in order to increase the precision of the
     measurements (Nicolas Frattaroli)

   - Change the way the Mediatek LTVS thermal driver stores the
     initialization data sequence to support different sequences
     matching different platforms. Introduce mt7988 support with a new
     initialization sequence (Mason Chang)

   - Document the QCom TSens Milos Temperature Sensor DT bindings (Luca
     Weiss)

   - Add the fallback compatible string for MT7981 and MT8516 DT
     bindings (Aleksander Jan Bajkowski)

   - Add the compatible string for the Tegra210B01 SOC_THERM driver
     (Aaron Kling)"

* tag 'thermal-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits)
  dt-bindings: thermal: tegra: Document Tegra210B01
  dt-bindings: thermal: mediatek: Add fallback compatible string for MT7981 and MT8516
  dt-bindings: thermal: qcom-tsens: document the Milos Temperature Sensor
  thermal/drivers/mediatek/lvts_thermal: Add mt7988 lvts commands
  thermal/drivers/mediatek/lvts_thermal: Add lvts commands and their sizes to driver data
  thermal/drivers/mediatek/lvts_thermal: Change lvts commands array to static const
  thermal/drivers/rockchip: Support reading trim values from OTP
  dt-bindings: thermal: rockchip: document otp thermal trim
  thermal/drivers/rockchip: Support RK3576 SoC in the thermal driver
  dt-bindings: rockchip-thermal: Add RK3576 compatible
  thermal/drivers/rockchip: Rename rk_tsadcv3_tshut_mode
  thermal: Use dev_fwnode()
  thermal: Constify struct thermal_zone_device_ops
  thermal/drivers/loongson2: Constify struct thermal_zone_device_ops
  thermal/drivers/qcom-spmi-temp-alarm: Add support for LITE PMIC peripherals
  thermal/drivers/qcom-spmi-temp-alarm: Add support for GEN2 rev 2 PMIC peripherals
  thermal/drivers/qcom-spmi-temp-alarm: Prepare to support additional Temp Alarm subtypes
  thermal/drivers/qcom-spmi-temp-alarm: Add temp alarm data struct based on HW subtype
  thermal/drivers/qcom-spmi-temp-alarm: Enable stage 2 shutdown when required
  thermal: sysfs: Return ENODATA instead of EAGAIN for reads
  ...
parents 9bbf8e17 1e94cb6c
Loading
Loading
Loading
Loading
+17 −10
Original line number Diff line number Diff line
@@ -20,16 +20,23 @@ allOf:

properties:
  compatible:
    enum:
    oneOf:
      - enum:
          - mediatek,mt2701-thermal
          - mediatek,mt2712-thermal
          - mediatek,mt7622-thermal
      - mediatek,mt7981-thermal
          - mediatek,mt7986-thermal
          - mediatek,mt8173-thermal
          - mediatek,mt8183-thermal
          - mediatek,mt8365-thermal
      - items:
          - enum:
              - mediatek,mt8516-thermal
          - const: mediatek,mt2701-thermal
      - items:
          - enum:
              - mediatek,mt7981-thermal
          - const: mediatek,mt7986-thermal

  reg:
    maxItems: 1
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ properties:
      - nvidia,tegra124-soctherm
      - nvidia,tegra132-soctherm
      - nvidia,tegra210-soctherm
      - nvidia,tegra210b01-soctherm

  reg:
    maxItems: 2
@@ -207,6 +208,7 @@ allOf:
            enum:
              - nvidia,tegra124-soctherm
              - nvidia,tegra210-soctherm
              - nvidia,tegra210b01-soctherm
    then:
      properties:
        reg:
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ properties:
      - description: v2 of TSENS
        items:
          - enum:
              - qcom,milos-tsens
              - qcom,msm8953-tsens
              - qcom,msm8996-tsens
              - qcom,msm8998-tsens
+62 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ properties:
      - rockchip,rk3368-tsadc
      - rockchip,rk3399-tsadc
      - rockchip,rk3568-tsadc
      - rockchip,rk3576-tsadc
      - rockchip,rk3588-tsadc
      - rockchip,rv1108-tsadc

@@ -39,6 +40,17 @@ properties:
      - const: tsadc
      - const: apb_pclk

  nvmem-cells:
    items:
      - description: cell handle to where the trim's base temperature is stored
      - description:
          cell handle to where the trim's tenths of Celsius base value is stored

  nvmem-cell-names:
    items:
      - const: trim_base
      - const: trim_base_frac

  resets:
    minItems: 1
    maxItems: 3
@@ -50,6 +62,12 @@ properties:
      - const: tsadc
      - const: tsadc-phy

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

  "#thermal-sensor-cells":
    const: 1

@@ -71,6 +89,27 @@ properties:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

patternProperties:
  "@[0-9a-f]+$":
    type: object
    properties:
      reg:
        maxItems: 1
        description: sensor ID, a.k.a. channel number

      nvmem-cells:
        items:
          - description: handle of cell containing calibration data

      nvmem-cell-names:
        items:
          - const: trim

    required:
      - reg

    unevaluatedProperties: false

required:
  - compatible
  - reg
@@ -79,6 +118,29 @@ required:
  - clock-names
  - resets

allOf:
  - if:
      not:
        properties:
          compatible:
            contains:
              const: rockchip,rk3568-tsadc
    then:
      properties:
        nvmem-cells: false
        nvmem-cell-names: false
  - if:
      not:
        properties:
          compatible:
            contains:
              enum:
                - rockchip,rk3568-tsadc
                - rockchip,rk3576-tsadc
    then:
      patternProperties:
        "@[0-9a-f]+$": false

unevaluatedProperties: false

examples:
+9 −0
Original line number Diff line number Diff line
@@ -206,6 +206,15 @@ All these controls needs admin privilege to update.
	Update a new temperature target in milli degree celsius for hardware to
	use for the temperature control.

``thermal_tolerance`` (RW)
	This attribute ranges from 0 to 7, where 0 represents
	the most aggressive control to avoid any temperature overshoots, and
	7 represents a more graceful approach, favoring performance even at
	the expense of temperature overshoots.
	Note: This level may not scale linearly. For example, a value of 3 does
	not necessarily imply a 50% improvement in performance compared to a
	value of 0.

Given that this is platform temperature control, it is expected that a
single user-level manager owns and manages the controls. If multiple
user-level software applications attempt to write different targets, it
Loading