Skip to content

Commit

Permalink
schemas: Add a schema for thermal consumer
Browse files Browse the repository at this point in the history
This adds a schema for thermal-zones consumers, useful for smart voltage
scaling drivers that need to adjust CPU/GPU/other voltages based on chip
quality and temperature of one or multiple zones, and for battery charge
drivers that need to scale the charging current based on board dependant
thermal zones readings (for example, battery temperature, device skin
temperature, etc).

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
  • Loading branch information
AngeloGioacchino Del Regno authored and robherring committed Nov 28, 2023
1 parent 2a1708d commit 414a9f7
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions dtschema/schemas/thermal/thermal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright 2023 Collabora Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/thermal.yaml#
$schema: http://devicetree.org/meta-schemas/base.yaml#

title: Thermal Consumer Common Properties

maintainers:
- Rob Herring <[email protected]>

# always select the core schema
select: true

properties:
thermal-zones:
anyOf:
- type: object # for nodes named 'thermal-zones'
- $ref: /schemas/types.yaml#/definitions/phandle-array
description: List of thermal zone phandles, one for each
thermal zone input to the device.

thermal-zone-names:
$ref: /schemas/types.yaml#/definitions/string-array
description: List of thermal zone name strings sorted in the
same order as the thermal-zones property. Consumer drivers
will use thermal-zone-names to match thermal zone input
names with thermal zone specifiers.

dependentRequired:
thermal-zone-names: [ thermal-zones ]

additionalProperties: true

0 comments on commit 414a9f7

Please sign in to comment.