devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-rtc@vger.kernel.org,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	Gareth Williams <gareth.williams.jx@renesas.com>,
	Milan Stevanovic <milan.stevanovic@se.com>,
	Jimmy Lalande <jimmy.lalande@se.com>,
	Pascal Eberhard <pascal.eberhard@se.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Herve Codina <herve.codina@bootlin.com>,
	Clement Leger <clement.leger@bootlin.com>,
	Michel Pollet <michel.pollet@bp.renesas.com>
Subject: Re: [PATCH v2 3/7] rtc: rzn1: Add new RTC driver
Date: Thu, 28 Apr 2022 11:28:03 +0200	[thread overview]
Message-ID: <CAMuHMdVPuut+c7ujTPgSvquRXyB=6r9GqXzVG+RPZLkEmL2oSw@mail.gmail.com> (raw)
In-Reply-To: <20220428110917.6b1a19ce@xps13>

Hi Miquel,

On Thu, Apr 28, 2022 at 11:09 AM Miquel Raynal
<miquel.raynal@bootlin.com> wrote:
> geert@linux-m68k.org wrote on Thu, 28 Apr 2022 10:58:03 +0200:
> > On Thu, Apr 21, 2022 at 11:00 AM Miquel Raynal
> > <miquel.raynal@bootlin.com> wrote:
> > > From: Michel Pollet <michel.pollet@bp.renesas.com>
> > >
> > > Add a basic RTC driver for the RZ/N1.
> > >
> > > Signed-off-by: Michel Pollet <michel.pollet@bp.renesas.com>
> > > Co-developed-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

> > > --- /dev/null
> > > +++ b/drivers/rtc/rtc-rzn1.c
> >
> > > +static int rzn1_rtc_probe(struct platform_device *pdev)
> > > +{
> > > +       struct rzn1_rtc *rtc;
> > > +       int ret;
> > > +
> > > +       rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
> > > +       if (!rtc)
> > > +               return -ENOMEM;
> > > +
> > > +       platform_set_drvdata(pdev, rtc);
> > > +
> > > +       rtc->clk = devm_clk_get(&pdev->dev, "hclk");
> > > +       if (IS_ERR(rtc->clk))
> > > +               return dev_err_probe(&pdev->dev, PTR_ERR(rtc->clk), "Missing hclk\n");
> >
> > As you don't care about the clock rate, only about enabling/disabling
> > the clock, I recommend using Runtime PM instead of explicit clock
> > handling.
>
> That's right.
>
> > That does depend on:
> > [PATCH v3 4/8] soc: renesas: rzn1: Select PM and PM_GENERIC_DOMAINS configs[1]
> > [PATCH v3 5/8] ARM: dts: r9a06g032: Add missing '#power-domain-cells'[2]
>
> There should not be any dependency with the RTC tree so that should not
> be too complex to handle.

Agreed.

> > and on documenting the power-domains property to the RTC DT bindings,
> > and on adding a proper power-domains property to the RTC node in DTS.
>
> Right.
>
> Do we need to define these properties in the UART, DMA and NAND
> controller nodes as well? I seem to remember that you mentioned it but
> I don't recall for which one and I was too focused (lazy?) on other
> features so I forgot about it.

It would be good to have them everywhere.  The initial RZ/N1D DTS
lacked them, as it only had the uart driver, which is not a Renesas
IP core.

The dw-dmac and 8250_dw drivers already use Runtime PM.
The renesas-nand-controller driver can be updated later, after the
power-domains properties have been added to the DTS.

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-04-28  9:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  9:00 [PATCH v2 0/7] RZN1 RTC support Miquel Raynal
2022-04-21  9:00 ` [PATCH v2 1/7] dt-bindings: rtc: rzn1: Describe the RZN1 RTC Miquel Raynal
2022-04-21 11:38   ` Krzysztof Kozlowski
2022-04-28  8:45   ` Geert Uytterhoeven
2022-04-21  9:00 ` [PATCH v2 2/7] soc: renesas: rzn1-sysc: Fix the RTC hclock description Miquel Raynal
2022-04-22 23:16   ` Stephen Boyd
2022-04-27 15:32   ` Geert Uytterhoeven
2022-04-27 15:42     ` Miquel Raynal
2022-04-27 15:43     ` Geert Uytterhoeven
2022-04-21  9:00 ` [PATCH v2 3/7] rtc: rzn1: Add new RTC driver Miquel Raynal
2022-04-28  8:58   ` Geert Uytterhoeven
2022-04-28  9:09     ` Miquel Raynal
2022-04-28  9:28       ` Geert Uytterhoeven [this message]
2022-04-21  9:00 ` [PATCH v2 4/7] rtc: rzn1: Add alarm support Miquel Raynal
2022-04-21  9:00 ` [PATCH v2 5/7] rtc: rzn1: Add oscillator offset support Miquel Raynal
2022-04-21  9:00 ` [PATCH v2 6/7] MAINTAINERS: Add myself as maintainer of the RZN1 RTC driver Miquel Raynal
2022-04-21  9:00 ` [PATCH v2 7/7] ARM: dts: r9a06g032: Describe the RTC Miquel Raynal
2022-04-28  8:48   ` 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='CAMuHMdVPuut+c7ujTPgSvquRXyB=6r9GqXzVG+RPZLkEmL2oSw@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=clement.leger@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gareth.williams.jx@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=herve.codina@bootlin.com \
    --cc=jimmy.lalande@se.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=michel.pollet@bp.renesas.com \
    --cc=milan.stevanovic@se.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mturquette@baylibre.com \
    --cc=pascal.eberhard@se.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=thomas.petazzoni@bootlin.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 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).