Commit 5561d91b authored by Javier Carrasco's avatar Javier Carrasco Committed by Guenter Roeck
Browse files

dt-bindings: hwmon: ibmpowernv: convert to dtschema



Convert existing binding to support validation.

The binding has been renamed to match its compatible strings, with no
further additions.

Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240322-hwmon_dtschema-v3-2-6697de2a8228@gmail.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent e03d7350
Loading
Loading
Loading
Loading
+37 −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/hwmon/ibm,opal-sensor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: IBM POWERNV platform sensors

maintainers:
  - Javier Carrasco <javier.carrasco.cruz@gmail.com>

properties:
  compatible:
    enum:
      - ibm,opal-sensor-cooling-fan
      - ibm,opal-sensor-amb-temp
      - ibm,opal-sensor-power-supply
      - ibm,opal-sensor-power

  sensor-id:
    description:
      An opaque id provided by the firmware to the kernel, identifies a
      given sensor and its attribute data.
    $ref: /schemas/types.yaml#/definitions/uint32

required:
  - compatible
  - sensor-id

additionalProperties: false

examples:
  - |
    sensor {
        compatible = "ibm,opal-sensor-cooling-fan";
        sensor-id = <0x7052107>;
    };
+0 −23
Original line number Diff line number Diff line
IBM POWERNV platform sensors
----------------------------

Required node properties:
- compatible: must be one of
		"ibm,opal-sensor-cooling-fan"
		"ibm,opal-sensor-amb-temp"
		"ibm,opal-sensor-power-supply"
		"ibm,opal-sensor-power"
- sensor-id: an opaque id provided by the firmware to the kernel, identifies a
	     given sensor and its attribute data

Example sensors node:

cooling-fan#8-data {
	sensor-id = <0x7052107>;
	compatible = "ibm,opal-sensor-cooling-fan";
};

amb-temp#1-thrs {
	sensor-id = <0x5096000>;
	compatible = "ibm,opal-sensor-amb-temp";
};