All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Lee Jones <lee@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Magnus Damm <magnus.damm@gmail.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH v2 4/5] mfd: Add Renesas PMIC RAA215300 RTC driver
Date: Tue, 9 May 2023 11:06:10 +0200	[thread overview]
Message-ID: <CAMuHMdVfn-fKQXBPRR6SOcp7QkRJ42e8xgj71vQoguLbjBaWjg@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdV+kjU5Ymy70_fus+tvO6ENPY04QG0ANr2WtraPK0H45w@mail.gmail.com>

CC Wolfram

On Tue, May 9, 2023 at 11:03 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, May 9, 2023 at 9:35 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > Subject: Re: [PATCH v2 4/5] mfd: Add Renesas PMIC RAA215300 RTC driver
> > > On Tue, May 9, 2023 at 9:06 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > Subject: [PATCH v2 4/5] mfd: Add Renesas PMIC RAA215300 RTC driver
> > > > >
> > > > > Currently, it is not possible to instantiate the i2c client driver
> > > > > using MFD cell as it is not a platform driver. Add support for
> > > > > Renesas PMIC
> > > > > RAA215300 RTC platform driver, so that it can be instantiated by MFD
> > > API.
> > > > > The rtc device is created by using i2c_new_ancillary_device() and it
> > > > > register as the rtc device by the helper function provided by
> > > > > rtc-isl2108 driver.
> > > >
> > > > Not sure this platform driver has to be placed in RTC subsystem rather
> > > > than MFD subsystem as PMIC MFD driver, can instantiate it using MFD cell??
> > >
> > > Can't you just instantiate the i2c ancillary device from the PMIC driver,
> > > and drop the new mfd and platform rtc drivers?
> >
> > Yes, it is possible.
> >
> > The only reason MFD is used for future expansion like adding support for
> >
> > 1) battery charger
> > Or
> > 2) regulator
>
> I'd just start with a skeleton regulator ("PMIC") driver...
>
> > In that case, we can share regmap to sub devices. But these drivers are not currently planned.
> >
> > Apart from that,
> >
> > 1) It avoids subsystem dependencies, ie, PMIC driver directly calling rtc driver
> >    for registering RTC device.
>
> You mean the direct call into raa215300_rtc_probe_helper()?
> I think that can be solved by enhancing i2c_new_ancillary_device() to
> take a proper device name, instead of using "dummy"?
>
> > 2) I guess, the current split will also give some modular design.
> >    We have a control to enable or disable the driver.
> >    ie, Enable the driver PMIC with RTC enabled and
> >    disable the driver PMIC with RTC not enabled(ie, XIN/XOUT grounded) in the system design
> >    by controlling the config "PMIC_RAA215300_RTC".
>
> You already have CONFIG_RTC_DRV_ISL1208, and look at
> "renesas,rtc-enabled" before activating the RTC?
>
> > These are the reasons for creating MFD driver and platform device.
> >
> > I may be totally wrong. Please correct me if that is the case.

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:[~2023-05-09  9:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 17:25 [PATCH v2 0/5] Add Renesas PMIC RAA215300 and built-in RTC support Biju Das
2023-05-05 17:25 ` [PATCH v2 1/5] dt-bindings: mfd: Add Renesas RAA215300 PMIC bindings Biju Das
2023-05-05 18:08   ` Krzysztof Kozlowski
2023-05-05 18:21     ` Biju Das
2023-05-05 18:32       ` Krzysztof Kozlowski
2023-05-05 17:25 ` [PATCH v2 2/5] mfd: Add Renesas PMIC RAA215300 driver Biju Das
2023-05-05 17:25 ` [PATCH v2 3/5] rtc: isl1208: Add support for the built-in RTC on the PMIC RAA215300 Biju Das
2023-05-05 17:25 ` [PATCH v2 4/5] mfd: Add Renesas PMIC RAA215300 RTC driver Biju Das
2023-05-09  7:06   ` Biju Das
2023-05-09  7:10     ` Geert Uytterhoeven
2023-05-09  7:35       ` Biju Das
2023-05-09  9:03         ` Geert Uytterhoeven
2023-05-09  9:06           ` Geert Uytterhoeven [this message]
2023-05-09  9:32           ` Biju Das
2023-05-09  9:39             ` Geert Uytterhoeven
2023-05-09 17:05               ` Biju Das
2023-05-13 14:34                 ` Biju Das
2023-05-05 17:25 ` [PATCH v2 5/5] arm64: dts: renesas: rzg2l-smarc-som: Enable PMIC and built-in RTC Biju Das

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=CAMuHMdVfn-fKQXBPRR6SOcp7QkRJ42e8xgj71vQoguLbjBaWjg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=lee@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=wsa+renesas@sang-engineering.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.