[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251120151658.GG661940@google.com>
Date: Thu, 20 Nov 2025 15:16:58 +0000
From: Lee Jones <lee@...nel.org>
To: "Yakovlev, Georgy" <Georgy.Yakovlev@...y.com>
Cc: Timothy Pearson <tpearson@...torengineering.com>,
devicetree <devicetree@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Rob Herring <robh+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Shawn Anastasio <sanastasio@...torengineering.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v3 2/4] mfd: sony-cronos-cpld: Add driver for Sony Cronos
CPLD
On Wed, 19 Nov 2025, Yakovlev, Georgy wrote:
>
>
> > On Oct 9, 2025, at 3:42 AM, Lee Jones <lee@...nel.org> wrote:
> >
> > This doesn't need to / shouldn't reside in the kernel.
> >
> > Why not use I2C and handle all of this in userspace?
> We would prefer to keep the sysfs interfaces in-kernel due to I2C bus contention between the MFD sub-drivers and userspace applications.
> Keeping everything in-kernel allows the kernel itself to arbitrate between the various MFD sub-drivers; punting to userspace complicates each userspace application as they each individually would need to handle I2C bus contention and associated EBUSY responses vs. a sysfs read.
After speaking with the sysfs maintainer, the long and the short of it
is that this isn't going to be accepted. There are a lot of random
sysfs entries being proposed here that are seemingly being dumped into
MFD, which is "not okay".
MFD is often seen as a dumping ground for devices that do not fit
anywhere else. In reality, it's for child device registration, shared
resource management and occasionally some core functionality for larger
devices. Here you can expect to be able to check if you're operating on
the correct device, create the Regmap and instantiate the drivers. For
that we may be able to reasonably suggest that you use simple-mfd-i2c.
The vast majority of this 'device' seems to pertain to letting userspace
control the device via I2C. The way I see it you have 2 options.
Either use simple-mfd-i2c and get the information you need over I2C from
userspace or find another suitable location to house all of the
non-MFD related handling.
> >> \ No newline at end of file
> >
> > ???
> >
> >> diff --git a/MAINTAINERS b/MAINTAINERS
> >> index 0e897f2ba9eb..a1052663fb27 100644
> >> --- a/MAINTAINERS
> >> +++ b/MAINTAINERS
> >> @@ -23458,6 +23458,13 @@ S: Maintained
> >> F: drivers/ssb/
> >> F: include/linux/ssb/
> >>
> >> +SONY CRONOS CPLD DRIVER
> >> +M: Georgy Yakovlev <Georgy.Yakovlev@...y.com>
> >
> > This person is going to have to Ack the fact that you're making them the
> > person responsible for maintaining this.
> Yes, I acknowledge.
> Not new to open source in general, but new to kernel submissions.
> Sorry for delayed response, was away.
> >
> >> +S: Maintained
> >> +F: Documentation/devicetree/bindings/mfd/sony,cronos-cpld.yaml
> >> +F: drivers/mfd/sony-cronos-cpld.c
> >> +F: include/linux/mfd/sony/cronos/
> >> +
> >> SONY IMX208 SENSOR DRIVER
> >> M: Sakari Ailus <sakari.ailus@...ux.intel.com>
> >> L: linux-media@...r.kernel.org
> >> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> >> index 425c5fba6cb1..cd0c624022f6 100644
> >> --- a/drivers/mfd/Kconfig
> >> +++ b/drivers/mfd/Kconfig
> >> @@ -2341,6 +2341,17 @@ config MFD_QCOM_PM8008
> >> under it in the device tree. Additional drivers must be enabled in
> >> order to use the functionality of the device.
> >>
> >> +config MFD_SONY_CRONOS_CPLD
> >> + tristate "Sony Cronos CPLD Support"
> >
--
Lee Jones [李琼斯]
Powered by blists - more mailing lists