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@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 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