All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Lee Jones <lee@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	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>
Subject: RE: [PATCH v2 4/5] mfd: Add Renesas PMIC RAA215300 RTC driver
Date: Tue, 9 May 2023 07:35:02 +0000	[thread overview]
Message-ID: <OS0PR01MB5922474E0B42B6301DB1961986769@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdU36vONu2GMKYZwtLPo_+CDYnWKDXjMytAg0r6BPRUv7Q@mail.gmail.com>

Hi Geert,

Thanks for the feedback.

> Subject: Re: [PATCH v2 4/5] mfd: Add Renesas PMIC RAA215300 RTC driver
> 
> Hi Biju,
> 
> 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

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.

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

These are the reasons for creating MFD driver and platform device.

I may be totally wrong. Please correct me if that is the case.

Cheers,
Biju


  reply	other threads:[~2023-05-09  7:35 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 [this message]
2023-05-09  9:03         ` Geert Uytterhoeven
2023-05-09  9:06           ` Geert Uytterhoeven
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=OS0PR01MB5922474E0B42B6301DB1961986769@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=lee@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.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.