All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Lakshay Piplani <lakshay.piplani@nxp.com>,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
	andy@kernel.org, marcelo.schmitt1@gmail.com,
	gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk,
	peterz@infradead.org, jstephan@baylibre.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org
Cc: vikash.bansal@nxp.com, priyanka.jain@nxp.com,
	shashank.rebbapragada@nxp.com, Frank.Li@nxp.com,
	carlos.song@nxp.com, xiaoning.wang@nxp.com, haibo.chen@nxp.com
Subject: Re: [PATCH 1/2] dt-bindings: iio: temperature: Add NXP P3T175x support.
Date: Thu, 24 Jul 2025 11:02:58 +0200	[thread overview]
Message-ID: <184bf60f-f803-48a0-a854-badc14584e53@kernel.org> (raw)
In-Reply-To: <20250724083951.2273717-1-lakshay.piplani@nxp.com>

On 24/07/2025 10:39, Lakshay Piplani wrote:
> Add bindings for the NXP P3T175x (P3T1755/P3T1750)
> digital temperature sensor, supporting both I2C &
> I3C interfaces.
> 


Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597

Subject: drop full stop.

> +properties:
> +  compatible:
> +    enum:
> +      - nxp,p3t1755
> +      - nxp,p3t1750

Keep the list sorted.

> +
> +  interrupts:
> +    maxItems: 1
> +
> +  reg:
> +    maxItems: 1
> +    description: |
> +      In I2C mode, the device supports up to 32 static addresses.
> +      In I3C mode, the 'reg' property encodes a triplet of
> +      <static-address BCR PID> used for device matching.
> +      Static address is optional if matching is done via PID.
> +
> +  nxp,interrupt-mode:
> +    type: boolean
> +    description: |
> +      Enables interrupt mode (TM = 1), where alerts are latched until
> +      cleared by a register read.
> +      Required for IBI support over I3C. On I2C, both interrupt and
> +      comparator mode support events.

Both properties are redundant because they are implied by the bus, no?

> +
> +  nxp,alert-active-high:
> +    type: boolean
> +    description: |
> +      Only applicable for I2C mode.
> +      Sets the polarity of ALERT pin to active high, if true.

Why are you encoding standard interrupt flags as a new property?

> +      Ignored in I3C mode (which uses IBI signaling).
> +
> +  nxp,fault-queue:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2, 4, 6]
> +    description: |
> +      Number of consecutive temperature limit
> +      violations required before an alert is triggered.
> +      valid values:- 1, 2, 4 or 6.
> +      If unspecified, hardware default (2) is used.

Why would that be board level configuration?

> +
> +  assigned-address:

:true

and that's it... unless you want to make sure it has a type also for I2C
case? How other I3C device binding solve it?

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 0x1
> +    maximum: 0xff
> +    description: |
> +      Dynamic address to be assigned to this device. In case static address is
> +      present (first cell of the reg property != 0), this address is assigned
> +      through SETDASA. If static address is not present, this address is assigned
> +      through SETNEWDA after assigning a temporary address via ENTDAA.

But for sure no need to duplicate common schema.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        temp-sensor@48 {
> +            compatible = "nxp,p3t1755";
> +            reg = <0x48>;
> +            nxp,interrupt-mode;
> +            nxp,fault-queue = <6>;
> +            interrupt-parent = <&gpio2>;
> +            interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
> +        };
> +    };
> +
> +  - |
> +    i3c {
> +      #address-cells = <3>;
> +      #size-cells = <0>;
> +      temp-sensor@48,236152a00 {
> +        reg = <0x48 0x236 0x152a00>;
> +        assigned-address = <0x50>;
> +      };
> +    };
> +
> +  - |
> +    i3c {

Drop this example.


Best regards,
Krzysztof

  parent reply	other threads:[~2025-07-24  9:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24  8:39 [PATCH 1/2] dt-bindings: iio: temperature: Add NXP P3T175x support Lakshay Piplani
2025-07-24  8:39 ` [PATCH 2/2] iio: temperature: Add driver for NXP P3T175x temperature sensor Lakshay Piplani
2025-07-24  8:57   ` Krzysztof Kozlowski
2025-07-24 11:59   ` Andy Shevchenko
2025-07-24 12:29   ` Jonathan Cameron
2025-07-24 14:29   ` Frank Li
2025-07-24  9:02 ` Krzysztof Kozlowski [this message]
2025-07-24 21:39 ` [PATCH 1/2] dt-bindings: iio: temperature: Add NXP P3T175x support kernel test robot

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=184bf60f-f803-48a0-a854-badc14584e53@kernel.org \
    --to=krzk@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=andy@kernel.org \
    --cc=carlos.song@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=haibo.chen@nxp.com \
    --cc=jic23@kernel.org \
    --cc=jstephan@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lakshay.piplani@nxp.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=peterz@infradead.org \
    --cc=priyanka.jain@nxp.com \
    --cc=robh@kernel.org \
    --cc=shashank.rebbapragada@nxp.com \
    --cc=vikash.bansal@nxp.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xiaoning.wang@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.