Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schemas: Add a schema for thermal consumer #117

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <robh@kernel.org>

# always select the core schema
select: true

properties:
thermal-zones:
kholk marked this conversation as resolved.
Show resolved Hide resolved
anyOf:
- type: object # for nodes named 'thermal-zones'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We inherited this in other cases, but not great to introduce a new one. However, I don't have a better naming suggestion, so I guess it is fine.

- $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