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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVG4EUkEL18ugJAyoKDnoy=8Wzkw5hrwSJMqLkuoH09cQ@mail.gmail.com>
Date: Mon, 18 Aug 2025 15:58:15 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
Cc: Magnus Damm <magnus.damm@...il.com>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Biju Das <biju.das.jz@...renesas.com>, 
	Fabrizio Castro <fabrizio.castro.jz@...esas.com>, 
	Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH 04/13] arm64: dts: renesas: r9a09g087: Add pinctrl node

Hi Prabhakar,

On Mon, 18 Aug 2025 at 15:44, Lad, Prabhakar <prabhakar.csengg@...il.com> wrote:
> On Mon, Aug 18, 2025 at 2:34 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > On Tue, 12 Aug 2025 at 22:03, Prabhakar <prabhakar.csengg@...il.com> wrote:
> > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> > >
> > > Add pinctrl node to RZ/N2H ("R9A09G087") SoC DTSI.
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> >
> > Thanks for your patch!
> >
> > > --- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
> > > +++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
> > > @@ -5,6 +5,17 @@
> > >   * Copyright (C) 2025 Renesas Electronics Corp.
> > >   */
> > >
> > > +#define RZN2H_PINS_PER_PORT    8
> > > +
> > > +/*
> > > + * Create the pin index from its bank and position numbers and store in
> > > + * the upper 16 bits the alternate function identifier
> > > + */
> > > +#define RZN2H_PORT_PINMUX(b, p, f)     ((b) * RZN2H_PINS_PER_PORT + (p) | ((f) << 16))
> > > +
> > > +/* Convert a port and pin label to its global pin index */
> > > +#define RZN2H_GPIO(port, pin)  ((port) * RZN2H_PINS_PER_PORT + (pin))
> >
> > Shouldn't this be in a header file under include/dt-bindings/pinctrl/?
>
> Agreed, theT2H related macros are used in the driver whereas the above
> aren't. In the past DT maintainers opposed including such headers
> which aren't used in the DT and drivers. Hence I choose this approach.
> Please let me know if you want me to move this into a header file
> under dt-bindings.

We need to share the definitions between DT sources and DT overlay
sources, so that sounds like a convincing argument for a header file
to me.

Now, as RZT2H_PORT_PINMUX() must be identical to RZN2H_PORT_PINMUX(),
this could be the existing
<dt-bindings/pinctrl/renesas,r9a09g077-pinctrl.h> file
(cfr. my comment on [PATCH 07/13]).

> > Else you have to duplicate these definitions in DT overlays.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ