lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <854925a6204f36fff6d653bb4a30c55a6adb3aef.camel@linaro.org>
Date: Mon, 24 Feb 2025 21:52:06 +0000
From: André Draszik <andre.draszik@...aro.org>
To: Rob Herring <robh@...nel.org>
Cc: Lee Jones <lee@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Conor Dooley <conor+dt@...nel.org>, Linus Walleij
 <linus.walleij@...aro.org>, Bartosz Golaszewski	 <brgl@...ev.pl>, Srinivas
 Kandagatla <srinivas.kandagatla@...aro.org>, Kees Cook <kees@...nel.org>,
 "Gustavo A. R. Silva" <gustavoars@...nel.org>, Peter Griffin	
 <peter.griffin@...aro.org>, Tudor Ambarus <tudor.ambarus@...aro.org>, Will
 McVicker <willmcvicker@...gle.com>, kernel-team@...roid.com,
 linux-kernel@...r.kernel.org, 	devicetree@...r.kernel.org,
 linux-gpio@...r.kernel.org, 	linux-hardening@...r.kernel.org
Subject: Re: [PATCH 2/6] dt-bindings: gpio: add max77759 binding

Hi Rob,

On Mon, 2025-02-24 at 09:38 -0600, Rob Herring wrote:
> On Mon, Feb 24, 2025 at 10:28:50AM +0000, André Draszik wrote:
> > Add the DT binding document for the GPIO module of the Maxim MAX77759.
> > 
> > Signed-off-by: André Draszik <andre.draszik@...aro.org>
> > ---
> >  .../bindings/gpio/maxim,max77759-gpio.yaml         | 47 ++++++++++++++++++++++
> >  1 file changed, 47 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/gpio/maxim,max77759-gpio.yaml
> > b/Documentation/devicetree/bindings/gpio/maxim,max77759-gpio.yaml
> > new file mode 100644
> > index 000000000000..9bafb16ad688
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpio/maxim,max77759-gpio.yaml
> > @@ -0,0 +1,47 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/gpio/maxim,max77759-gpio.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Maxim Integrated MAX77759 GPIO
> > +
> > +maintainers:
> > +  - André Draszik <andre.draszik@...aro.org>
> > +
> > +description: |
> > +  This module is part of the MAX77759 PMIC. For additional information, see
> > +  Documentation/devicetree/bindings/mfd/maxim,max77759.yaml.
> > +
> > +  The MAX77759 is a PMIC integrating, amongst others, a GPIO controller
> > +  including interrupt support for 2 GPIO lines.
> > +
> > +properties:
> > +  compatible:
> > +    const: maxim,max77759-gpio
> > +
> > +  "#interrupt-cells":
> > +    const: 2
> > +
> > +  interrupt-controller: true
> > +
> > +  interrupts:
> > +    maxItems: 2
> 
> You need to define what each interrupt is.

I think maybe the interrupts property is not needed after all:

The PMIC has one external interrupt line (described by the top-level
device), and the two interrupts here are just a representation of
the PMIC's internal status register (i.e. top level interrupt is
raised when status register for one of the gpio lines changes,
amongst other things).

The intention is for a gpio driver to just treat and model them as
cascaded interrupts, but they don't need to be configured in any
way via device tree, as everything happens internally inside the
PMIC, there is no board-dependent routing or trigger type possible.
(Of course, there can be drivers subscribing to one (or both) of the two
cascaded interrupts here, but that shouldn't matter I believe).

Does that make sense? I added the property because
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
says it's a requirement to have an interrupts property, but I
believe it doesn't actually apply in this case as there's nothing
than can be configured.

Am I missing something?

Cheers,
Andre'

> 
> > +
> > +  "#gpio-cells":
> > +    const: 2
> > +
> > +  gpio-controller: true
> > +
> > +  gpio-line-names:
> > +    minItems: 1
> > +    maxItems: 2
> > +
> > +required:
> > +  - compatible
> > +  - "#gpio-cells"
> > +  - gpio-controller
> > +  - "#interrupt-cells"
> > +  - interrupt-controller
> > +
> > +additionalProperties: false
> > 
> > -- 
> > 2.48.1.658.g4767266eb4-goog
> > 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ