Re: [PATCH v2 4/5] mfd: Add Renesas PMIC RAA215300 RTC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CC Wolfram

On Tue, May 9, 2023 at 11:03 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> On Tue, May 9, 2023 at 9:35 AM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx

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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux