linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-clk <linux-clk@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH v3 3/4] clk: renesas: rcar-usb2-clock-sel: Add multiple clocks management
Date: Wed, 4 Mar 2020 06:32:40 +0000	[thread overview]
Message-ID: <TYAPR01MB45445392291F9914012BE15CD8E50@TYAPR01MB4544.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdXpkTH9bqAahMpUB6quCXpgFi8Uw1RPYdXFkeaFh0js4w@mail.gmail.com>

Hi Geert-san,

Thank you for your review!

> From: Geert Uytterhoeven, Sent: Monday, November 18, 2019 7:25 PM
> 
> Hi Shimoda-san,
> 
> On Fri, Nov 1, 2019 at 8:03 AM Yoshihiro Shimoda
> <yoshihiro.shimoda.uh@renesas.com> wrote:
<snip>
> > --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c
> > +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c
> 
> > @@ -128,6 +146,14 @@ static int rcar_usb2_clock_sel_probe(struct platform_device *pdev)
> >         if (IS_ERR(priv->base))
> >                 return PTR_ERR(priv->base);
> >
> > +       priv->clks[CLK_INDEX_EHCI_OHCI].clk = devm_clk_get(dev, "ehci_ohci");
> > +       if (IS_ERR(priv->clks[CLK_INDEX_EHCI_OHCI].clk))
> > +               return PTR_ERR(priv->clks[CLK_INDEX_EHCI_OHCI].clk);
> > +
> > +       priv->clks[CLK_INDEX_HS_USB].clk = devm_clk_get(dev, "hs-usb-if");
> > +       if (IS_ERR(priv->clks[CLK_INDEX_HS_USB].clk))
> > +               return PTR_ERR(priv->clks[CLK_INDEX_HS_USB].clk);
> > +
> 
> Is these any specific reason you're not just filling in the .id fields first,
> and calling devm_clk_bulk_get()?
> 
>     static const struct clk_bulk_data rcar_usb2_clocks[] = {
>             { .id = "ehci_ohci", },
>             { .id = "hs-usb-if", },
>     };
> 
>     memcpy(priv->clks, rcar_usb2_clocks, sizeof(priv->clks));
>     ... = devm_clk_bulk_get(dev, ARRAY_SIZE(priv->clks), priv->clks);
>     ...
> 
> That way you can drop the enums, and use ARRAY_SIZE(rcar_usb2_clocks)
> instead of CLK_NUM.

I don't know why I didn't use devm_clk_bulk_get()...
I'll fix the code.

Best regards,
Yoshihiro Shimoda


  reply	other threads:[~2020-03-04  6:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01  7:03 [PATCH v3 0/4] clk: renesas: rcar-usb2-clock-sel: Fix clks/resets handling Yoshihiro Shimoda
2019-11-01  7:03 ` [PATCH v3 1/4] dt-bindings: clock: renesas: rcar-usb2-clock-sel: Fix clock[-name]s properties Yoshihiro Shimoda
2019-11-01  7:03 ` [PATCH v3 2/4] dt-bindings: clock: renesas: rcar-usb2-clock-sel: Add power-domains and resets properties Yoshihiro Shimoda
2019-11-18 10:12   ` Geert Uytterhoeven
2020-03-04  6:29     ` Yoshihiro Shimoda
2019-11-01  7:03 ` [PATCH v3 3/4] clk: renesas: rcar-usb2-clock-sel: Add multiple clocks management Yoshihiro Shimoda
2019-11-18 10:24   ` Geert Uytterhoeven
2020-03-04  6:32     ` Yoshihiro Shimoda [this message]
2019-11-01  7:03 ` [PATCH v3 4/4] clk: renesas: rcar-usb2-clock-sel: Add reset_control Yoshihiro Shimoda
2019-11-18 10:27   ` 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=TYAPR01MB45445392291F9914012BE15CD8E50@TYAPR01MB4544.jpnprd01.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /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 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).