linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Biju Das <biju.das.jz@bp.renesas.com>
Subject: Re: [PATCH v4 2/4] pinctrl: renesas: Add RZ/G2L pin and gpio controller driver
Date: Thu, 12 Aug 2021 09:25:13 +0100	[thread overview]
Message-ID: <CA+V-a8unn87anEBKfMLg4D2fK20B7=2ctMQ1x9W5+Jq9RdtikQ@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdWy4JNZ2=Z+FdMdHukN6rGQMma7cc+Pm06AtsOk8j_eGA@mail.gmail.com>

Hi Geert,

Thank you for the review.

On Tue, Aug 10, 2021 at 10:13 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Tue, Jul 27, 2021 at 1:23 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> > Add support for pin and gpio controller driver for RZ/G2L SoC.
> >
> > Based on a patch in the BSP by Hien Huynh <hien.huynh.px@renesas.com>.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
>
> Thanks for your patch!
>
> > --- /dev/null
> > +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
>
> > +static void rzg2l_pinctrl_clk_disable(void *data)
> > +{
> > +       struct clk *clk = data;
>
> No need for the intermediate variable.
>
Agreed.

> > +
> > +       clk_disable_unprepare(clk);
> > +}
> > +
> > +static int rzg2l_pinctrl_probe(struct platform_device *pdev)
> > +{
> > +       struct rzg2l_pinctrl *pctrl;
> > +       int ret;
> > +
> > +       pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL);
> > +       if (!pctrl)
> > +               return -ENOMEM;
> > +
> > +       pctrl->dev = &pdev->dev;
> > +
> > +       pctrl->data = of_device_get_match_data(&pdev->dev);
> > +       if (!pctrl->data)
> > +               return -EINVAL;
> > +
> > +       pctrl->base = devm_platform_ioremap_resource(pdev, 0);
> > +       if (IS_ERR(pctrl->base))
> > +               return PTR_ERR(pctrl->base);
> > +
> > +       pctrl->clk = devm_clk_get(pctrl->dev, NULL);
> > +       if (IS_ERR(pctrl->clk)) {
> > +               ret = PTR_ERR(pctrl->clk);
> > +               dev_err(pctrl->dev, "failed to get GPIO clk : %i\n", ret);
> > +               return ret;
> > +       };
> > +
> > +       spin_lock_init(&pctrl->lock);
> > +
> > +       platform_set_drvdata(pdev, pctrl);
> > +
> > +       ret = clk_prepare_enable(pctrl->clk);
> > +       if (ret) {
> > +               dev_err(pctrl->dev, "failed to enable GPIO clk: %i\n", ret);
> > +               return ret;
> > +       };
> > +
> > +       ret = devm_add_action_or_reset(&pdev->dev, rzg2l_pinctrl_clk_disable, pctrl->clk);
>
> This line is a bit long.
>
> > +       if (ret) {
> > +               dev_err(pctrl->dev, "failed to register pinctrl clk disable devm action, %i\n",
>
> Elsewhere, this is called the "GPIO clk".
> This line is a bit long.
>
agreed.

> > +                       ret);
> > +               return ret;
> > +       }
> > +
> > +       ret = rzg2l_pinctrl_register(pctrl);
> > +       if (ret)
> > +               return ret;
> > +
> > +       dev_info(pctrl->dev, "%s support registered\n", DRV_NAME);
> > +       return 0;
> > +}
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-pinctrl-for-v5.15, with the above fixed, so no need
> to resend.
>
Thank you.

Cheers,
Prabhakar

> 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:[~2021-08-12  8:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 11:23 [PATCH v4 0/4] pin and gpio controller driver for Renesas RZ/G2L Lad Prabhakar
2021-07-27 11:23 ` [PATCH v4 1/4] dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Add DT bindings for RZ/G2L pinctrl Lad Prabhakar
2021-07-28 16:02   ` Rob Herring
2021-08-10  9:15     ` Geert Uytterhoeven
2021-07-27 11:23 ` [PATCH v4 2/4] pinctrl: renesas: Add RZ/G2L pin and gpio controller driver Lad Prabhakar
2021-08-10  9:13   ` Geert Uytterhoeven
2021-08-12  8:25     ` Lad, Prabhakar [this message]
2021-07-27 11:23 ` [PATCH v4 3/4] arm64: dts: renesas: r9a07g044: Add pinctrl node Lad Prabhakar
2021-08-10  9:16   ` Geert Uytterhoeven
2021-07-27 11:23 ` [PATCH v4 4/4] arm64: dts: renesas: rzg2l-smarc: Add scif0 pins Lad Prabhakar
2021-08-10  9:24   ` Geert Uytterhoeven

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='CA+V-a8unn87anEBKfMLg4D2fK20B7=2ctMQ1x9W5+Jq9RdtikQ@mail.gmail.com' \
    --to=prabhakar.csengg@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH v4 2/4] pinctrl: renesas: Add RZ/G2L pin and gpio controller driver' \
    /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

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).