Re: [PATCH 14/54] dt-bindings: hwmon: Add IIO HWMON binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 21 Jul 2021 16:03:44 +0200
Maxime Ripard <maxime@xxxxxxxxxx> wrote:

> Even though we had the iio-hwmon driver for some time and a number of
> boards using it already, we never had a binding for it. Let's add it
> based on what the driver expects and the boards are providing.
> 
> Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
> Cc: Jean Delvare <jdelvare@xxxxxxxx>
> Cc: Jonathan Cameron <jic23@xxxxxxxxxx>
> Cc: linux-hwmon@xxxxxxxxxxxxxxx
> Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
> ---
>  .../devicetree/bindings/hwmon/iio-hwmon.yaml  | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml b/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml
> new file mode 100644
> index 000000000000..49dd40f663a6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/iio-hwmon.yaml
> @@ -0,0 +1,37 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/hwmon/iio-hwmon.yaml#";
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#";
> +
> +title: ADC-attached Hardware Sensor Device Tree Bindings
> +
> +maintainers:
> +  - Jonathan Cameron <jic23@xxxxxxxxxx>

I'd like to share the blame for this one.  Binding was originally added
by Guenter.

https://lore.kernel.org/linux-iio/1359668588-13678-4-git-send-email-linux@xxxxxxxxxxxx/
https://lore.kernel.org/linux-iio/1359668588-13678-11-git-send-email-linux@xxxxxxxxxxxx/
:)

As bindings go this one has always been controversial because
it's mapping between linux subsystems rather than really describing
hardware.  We've had various discussions over the years on how to do
this differently, but perhaps just documenting the current state is the
way to go.  That doesn't stop us moving to something better in the
future.

> +
> +description: >
> +  Bindings for hardware monitoring devices connected to ADC controllers
> +  supporting the Industrial I/O bindings.
> +
> +properties:
> +  compatible:
> +    const: iio-hwmon
> +
> +  io-channels:
> +    minItems: 1
> +    maxItems: 1024

Why 1024?

> +    description: >
> +      List of phandles to ADC channels to read the monitoring values
> +
> +required:
> +  - compatible
> +  - io-channels
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +      iio-hwmon {
> +          compatible = "iio-hwmon";
> +          io-channels = <&adc 1>, <&adc 2>;
> +      };




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux