devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sinan Divarci <Sinan.Divarci@analog.com>,
	jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] dt-bindings: hwmon: Add bindings for max31732
Date: Wed, 14 Dec 2022 18:00:03 +0100	[thread overview]
Message-ID: <386e3717-a063-a2ea-6028-19d11b5838b0@linaro.org> (raw)
In-Reply-To: <20221214142206.13288-4-Sinan.Divarci@analog.com>

On 14/12/2022 15:22, Sinan Divarci wrote:
> Adding bindings for max31732 quad remote temperature sensor

Full stop.

Subject: drop second, redundant "bindings for".

> 
> Signed-off-by: Sinan Divarci <Sinan.Divarci@analog.com>
> ---
>  .../bindings/hwmon/adi,max31732.yaml          | 83 +++++++++++++++++++
>  1 file changed, 83 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/adi,max31732.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/adi,max31732.yaml b/Documentation/devicetree/bindings/hwmon/adi,max31732.yaml
> new file mode 100644
> index 000000000..c701cda95
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/adi,max31732.yaml
> @@ -0,0 +1,83 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2022 Analog Devices Inc.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/adi,max31732.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices MAX31732 Temperature Sensor Device Driver

Drop "Device Driver"

> +
> +maintainers:
> +  - Sinan Divarci <Sinan.Divarci@analog.com>
> +
> +description: Bindings for the Analog Devices MAX31732 Temperature Sensor Device.

Drop "Bindings for". Actually, either drop entire description or write
something else than title.

> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,max31732
> +
> +  reg:
> +    description: I2C address of the Temperature Sensor Device.

Drop description.

> +    maxItems: 1
> +
> +  interrupts:
> +    minItems: 1
> +    maxItems: 2
> +
> +  interrupt-names:
> +    description: Name of the interrupt pin of max31732 used for IRQ.

Drop description.

> +    minItems: 1
> +    items:
> +      - enum: [ALARM1, ALARM2]
> +      - enum: [ALARM1, ALARM2]

This should be fixed, not flexible. Why it's flexible?

lowercase letters only

> +
> +  adi,alarm1-interrupt-mode:
> +    description: |
> +      Enables the ALARM1 output to function in interrupt mode.
> +      Default ALARM1 output function is comparator mode.

Why this is a property of DT/hardware? Don't encode policy in DT.

> +    type: boolean
> +
> +  adi,alarm2-interrupt-mode:
> +    description: |
> +      Enables the ALARM2 output to function in interrupt mode.
> +      Default ALARM2 output function is comparator mode.

Same question.

> +    type: boolean
> +
> +  adi,alarm1-fault-queue:
> +    description: The number of consecutive faults required to assert ALARM1.

Same question - why this number differs with hardware?

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2, 4, 6]
> +    default: 1
> +
> +  adi,alarm2-fault-queue:
> +    description: The number of consecutive faults required to assert ALARM2.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2, 4, 6]
> +    default: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        sensor@1c {
> +            compatible = "adi,max31732";
> +            reg = <0x1c>;
> +            interrupt-parent = <&gpio>;
> +            interrupts = <17 IRQ_TYPE_EDGE_BOTH>, <27 IRQ_TYPE_EDGE_BOTH>;
> +            interrupt-names = "ALARM1", "ALARM2";
> +            adi,alarm1-fault-queue = <4>;
> +            adi,alarm2-fault-queue = <2>;
> +            adi,alarm2-interrupt-mode;
> +      };

Messed indentation.


> +    };

Best regards,
Krzysztof


  reply	other threads:[~2022-12-14 17:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 14:22 [PATCH v2 0/3] hwmon: Add max31732 quad remote temperature sensor driver Sinan Divarci
2022-12-14 14:22 ` [PATCH v2 1/3] drivers: " Sinan Divarci
2022-12-14 17:02   ` Krzysztof Kozlowski
2022-12-14 17:24     ` Guenter Roeck
2022-12-15  8:32       ` Krzysztof Kozlowski
2022-12-29 15:38   ` Guenter Roeck
2022-12-14 14:22 ` [PATCH v2 2/3] docs: hwmon: add max31732 documentation Sinan Divarci
2022-12-29 15:39   ` Guenter Roeck
2022-12-14 14:22 ` [PATCH v2 3/3] dt-bindings: hwmon: Add bindings for max31732 Sinan Divarci
2022-12-14 17:00   ` Krzysztof Kozlowski [this message]
2022-12-29 15:52     ` Guenter Roeck
2022-12-29 16:39       ` Krzysztof Kozlowski
2022-12-29 18:30         ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=386e3717-a063-a2ea-6028-19d11b5838b0@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=Sinan.Divarci@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).