All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 2/2] pinctrl: renesas: Add RZ/V2M pin and gpio controller driver
Date: Tue, 14 Jun 2022 17:36:03 +0200	[thread overview]
Message-ID: <CAMuHMdW=iUzNJRYnsK_MrVLA-CFsm-xfuCjZbUUe+q6oZx4Z4w@mail.gmail.com> (raw)
In-Reply-To: <TYYPR01MB7086A7083ACEBF9468ACE2AFF5AA9@TYYPR01MB7086.jpnprd01.prod.outlook.com>

Hi Phil,

On Tue, Jun 14, 2022 at 5:00 PM Phil Edworthy <phil.edworthy@renesas.com> wrote:
> On 14 June 2022 13:43 Geert Uytterhoeven wrote:
> > On Fri, May 20, 2022 at 5:41 PM Phil Edworthy wrote:
> > > Add support for pin and gpio controller driver for RZ/V2M SoC.
> > > Based on the RZ/G2L driver.
> > >
> > > Note that the DETDO and DETMS dedicated pins are currently not
> > > documented in the HW manual as to which pin group they are in.
> > > HW team have since said that the output level of V1.8V I/O group 4
> > > (for MD0-7, and debugger) is the same as the 1.8V IO group 3.
> >
> > Thank you, I rediscovered this explanation just before pressing send ;-)
> >
> > >
> > > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > > --- a/drivers/pinctrl/renesas/Kconfig
> > > +++ b/drivers/pinctrl/renesas/Kconfig
> > > @@ -193,6 +194,18 @@ config PINCTRL_RZG2L
> > >           This selects GPIO and pinctrl driver for Renesas
> > RZ/{G2L,G2UL,V2L}
> > >           platforms.
> > >
> > > +config PINCTRL_RZV2M
> > > +       bool "pin control support for RZ/V2M"
> > > +       depends on OF
> > > +       depends on ARCH_R9A09G011 || COMPILE_TEST
> > > +       select GPIOLIB
> > > +       select GENERIC_PINCTRL_GROUPS
> > > +       select GENERIC_PINMUX_FUNCTIONS
> > > +       select GENERIC_PINCONF
> > > +       help
> > > +         This selects GPIO and pinctrl driver for Renesas RZ/V2M
> > > +         platforms.
> > > +
> >
> > Please preserve sort order.
> For a while I couldn't see what's wrong here. It should be ordered on
> the text, not the Kconfig symbol, right?

Exactly, cfr. commit d89a08f52b0dd30d ("pinctrl: sh-pfc: Tidy up
driver description title").

> > > +       case PIN_CONFIG_DRIVE_STRENGTH_UA:
> > > +               if (!(cfg & PIN_CFG_DRV))
> > > +                       return -EINVAL;
> > > +
> > > +               /* DRV uses 2-bits per pin */
> > > +               bit <<= 1;
> > > +
> > > +               /* Dedicated port is irregularly located to the others
> > */
> > > +               if (port_offset == RZV2M_DEDICATED_PORT_IDX)
> > > +                       val = (readl(pctrl->base + DRV_DEDICATED) >>
> > bit) & DRV_MASK;
> > > +               else
> > > +                       val = (readl(pctrl->base + DRV(port_offset))
> > > + >> bit) & DRV_MASK;
> >
> > You can simplify this, by handling the dedicated port offset in the
> > definition of the DRV() macro.  Same for SR().
> Do you mean put conditional code in the DRV() macro?

Indeed. Cfr. the IMUCTR(n) in drivers/iommu/ipmmu-vmsa.c.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

      reply	other threads:[~2022-06-14 15:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 15:40 [PATCH 0/2] pinctrl: Add RZ/V2M pin and gpio driver Phil Edworthy
2022-05-20 15:40 ` [PATCH 1/2] dt-bindings: pinctrl: renesas: Add DT bindings for RZ/V2M pinctrl Phil Edworthy
2022-05-20 17:22   ` Rob Herring
2022-05-24 18:47   ` Rob Herring
2022-05-24 19:04     ` Phil Edworthy
2022-06-14 12:10   ` Geert Uytterhoeven
2022-06-14 13:00     ` Phil Edworthy
2022-06-20  7:25       ` Phil Edworthy
2022-05-20 15:40 ` [PATCH 2/2] pinctrl: renesas: Add RZ/V2M pin and gpio controller driver Phil Edworthy
2022-06-14 12:42   ` Geert Uytterhoeven
2022-06-14 14:59     ` Phil Edworthy
2022-06-14 15:36       ` Geert Uytterhoeven [this message]

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='CAMuHMdW=iUzNJRYnsK_MrVLA-CFsm-xfuCjZbUUe+q6oZx4Z4w@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=phil.edworthy@renesas.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.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.