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

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

 



Hi Biju,

On Tue, May 9, 2023 at 11:32 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: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()?
>
> Yes, indeed.
>
> > I think that can be solved by enhancing i2c_new_ancillary_device() to take a
> > proper device name, instead of using "dummy"?
>
> Geert, Wolfram,
>
> Any pointers for instantiating i2c_client device(for eg: rtc_isl1208.c)
> by enhancing i2c_new_ancillary_device() api?
>
> Apart for this, since a single compatible(the pmic one) is used,
>
> In rtc device probe, How do we identify this PMIC RTC device and use the "TYPE_ISL1208" config
> in RTC driver, once we instantiate RTC device?

You create ancillary devices with different names, based on the detected
PMIC version, and add new types for them to the isl1208 driver?

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