From: Michael Walle <michael-QKn5cuLxLXY@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "Lee Jones" <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-hwmon-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
"Linus Walleij"
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Bartosz Golaszewski"
<bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Jean Delvare" <jdelvare-IBi9RG/b67k@public.gmane.org>,
"Guenter Roeck" <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
"Thierry Reding"
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Uwe Kleine-König"
<u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
"Wim Van Sebroeck"
<wim-Q8PRGTgFL9WUCWQAtAn6Ix2eb7JE58TQ@public.gmane.org>,
"Shawn Guo" <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Li Yang" <leoyang.li-3arQi8VN3Tc@public.gmane.org>,
"Thomas Gleixner" <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
"Jason Cooper" <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
"Marc Zyngier" <maz-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH v4 02/11] mfd: Add support for Kontron sl28cpld management controller
Date: Fri, 05 Jun 2020 22:07:36 +0200 [thread overview]
Message-ID: <c5632bfab3956265e90fc2fb6c0b3cae@walle.cc> (raw)
In-Reply-To: <20200605105026.GC5413-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
Hi,
Am 2020-06-05 12:50, schrieb Mark Brown:
> On Fri, Jun 05, 2020 at 07:57:09AM +0100, Lee Jones wrote:
>> On Thu, 04 Jun 2020, Michael Walle wrote:
>
>> > + sl28cpld->regmap = devm_regmap_init_i2c(i2c, &sl28cpld_regmap_config);
>> > + if (IS_ERR(sl28cpld->regmap))
>> > + return PTR_ERR(sl28cpld->regmap);
>
>> This is now a shared memory allocator and not an MFD at all.
>
>> I'm clamping down on these type of drivers!
>
>> Please find a better way to accomplish this.
>
> What is the concern with this? Looking at the patch I'm guessing the
> concern would be that the driver isn't instantiating any MFD children
> and instead requiring them to be put in the DT?
>
>> Potentially using "simple-mfd" and "simple-regmap".
>
>> The former already exists and does what you want. The latter doesn't
>> yet exist, but could solve your and lots of other contributor's
>> issues.
>
> I have no idea what you are thinking of when you say "simple-regmap" so
> it is difficult to comment.
I guess, Lee is suggesting to be able to create a regmap instance via
device tree (and populate its child nodes?). Like
compatible = "syscon", "simple-mfd";
but for any regmap, not just MMIO.
But, there is more in my driver:
(1) there is a version check
(2) there is another function for which there is no suitable linux
subsystem I'm aware of and thus which I'd like to us sysfs
attributes for: This controller supports 16 non-volatile
configuration bits. (this is still TBD)
I don't see what is different between this driver and for example the
gateworks-gsc.c. Just that mine doesn't use a global register set, but
local offsets and a base for each component. From a hardware
perspective its one device behind an I2C address providing different
functions across multiple driver subsystems.
Actually, I've tried to remove the devm_of_platform_populate() and
instead added the "simple-mfd" to my mfd node:
compatible = "kontron,sl28cpld-r1", "simple-mfd";
I guess that doesn't work because the device is below the i2c bus?
--
-michael
next prev parent reply other threads:[~2020-06-05 20:07 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 21:10 [PATCH v4 00/11] Add support for Kontron sl28cpld Michael Walle
2020-06-04 21:10 ` [PATCH v4 01/11] dt-bindings: mfd: Add bindings for sl28cpld Michael Walle
2020-06-09 16:28 ` Rob Herring
2020-06-04 21:10 ` [PATCH v4 02/11] mfd: Add support for Kontron sl28cpld management controller Michael Walle
[not found] ` <20200604211039.12689-3-michael-QKn5cuLxLXY@public.gmane.org>
2020-06-05 6:57 ` Lee Jones
2020-06-05 9:51 ` Michael Walle
2020-06-05 10:50 ` Mark Brown
[not found] ` <20200605105026.GC5413-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2020-06-05 20:07 ` Michael Walle [this message]
2020-06-06 11:46 ` Mark Brown
2020-06-06 12:45 ` Michael Walle
[not found] ` <dc052a5c77171014ecc465b1da8b7ef8-QKn5cuLxLXY@public.gmane.org>
2020-06-08 8:28 ` Lee Jones
2020-06-08 10:02 ` Andy Shevchenko
2020-06-08 15:41 ` Michael Walle
2020-06-08 18:56 ` Lee Jones
2020-06-08 21:09 ` Michael Walle
[not found] ` <32231f26f7028d62aeda8fdb3364faf1-QKn5cuLxLXY@public.gmane.org>
2020-06-09 6:47 ` Lee Jones
2020-06-09 14:38 ` Michael Walle
2020-06-09 14:42 ` Mark Brown
2020-06-09 15:01 ` Michael Walle
[not found] ` <a2bae71634fe288f067d5e92090b7561-QKn5cuLxLXY@public.gmane.org>
2020-06-09 17:15 ` Rob Herring
2020-06-09 17:29 ` Mark Brown
2020-06-09 18:41 ` Lee Jones
2020-06-09 15:19 ` Lee Jones
2020-06-09 15:30 ` Michael Walle
2020-06-09 19:45 ` Lee Jones
2020-06-10 7:10 ` Michael Walle
2020-06-10 7:19 ` Lee Jones
2020-06-10 7:49 ` Michael Walle
2020-06-10 7:56 ` Lee Jones
2020-06-10 9:27 ` Michael Walle
2020-06-10 18:30 ` Lee Jones
2020-06-10 17:16 ` Rob Herring
2020-06-10 18:02 ` Lee Jones
2020-06-08 18:20 ` Lee Jones
2020-06-09 16:54 ` Rob Herring
2020-06-09 18:52 ` Lee Jones
2020-06-05 8:01 ` Andy Shevchenko
2020-06-05 8:02 ` Andy Shevchenko
2020-06-05 10:09 ` Michael Walle
2020-06-05 10:48 ` Andy Shevchenko
2020-06-05 11:51 ` Michael Walle
2020-06-04 21:10 ` [PATCH v4 03/11] irqchip: add sl28cpld interrupt controller support Michael Walle
2020-06-05 1:26 ` kernel test robot
2020-06-05 8:07 ` Andy Shevchenko
2020-06-08 15:12 ` kernel test robot
2020-06-04 21:10 ` [PATCH v4 04/11] watchdog: add support for sl28cpld watchdog Michael Walle
2020-06-05 8:14 ` Andy Shevchenko
2020-06-05 10:24 ` Michael Walle
[not found] ` <8f042c2442852c29519c381833f3d289-QKn5cuLxLXY@public.gmane.org>
2020-06-05 10:50 ` Andy Shevchenko
2020-06-05 13:52 ` Guenter Roeck
[not found] ` <871a4990-5b94-3a17-01d4-74998375f08b-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2020-06-05 14:09 ` Andy Shevchenko
2020-06-05 15:05 ` Guenter Roeck
2020-06-05 16:04 ` Andy Shevchenko
[not found] ` <CAHp75VduUG=XkvyZwdZDNqBh3KE67MWZWgqBN67fN6StAa469w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-06-05 16:34 ` Guenter Roeck
[not found] ` <20200604211039.12689-1-michael-QKn5cuLxLXY@public.gmane.org>
2020-06-04 21:10 ` [PATCH v4 05/11] pwm: add support for sl28cpld PWM controller Michael Walle
2020-06-05 8:15 ` Andy Shevchenko
2020-06-05 8:49 ` Lee Jones
2020-06-05 9:33 ` Andy Shevchenko
2020-06-05 11:39 ` Michael Walle
2020-06-05 18:17 ` Michael Walle
2020-06-08 7:46 ` Lee Jones
2020-06-04 21:10 ` [PATCH v4 07/11] hwmon: add support for the sl28cpld hardware monitoring controller Michael Walle
2020-06-05 12:06 ` Andy Shevchenko
2020-06-04 21:10 ` [PATCH v4 06/11] gpio: add support for the sl28cpld GPIO controller Michael Walle
[not found] ` <20200604211039.12689-7-michael-QKn5cuLxLXY@public.gmane.org>
2020-06-05 12:00 ` Andy Shevchenko
2020-06-05 12:42 ` Michael Walle
2020-06-05 13:15 ` Andy Shevchenko
2020-06-05 18:44 ` Michael Walle
2020-06-05 21:19 ` Andy Shevchenko
2020-06-04 21:10 ` [PATCH v4 08/11] arm64: dts: freescale: sl28: enable sl28cpld Michael Walle
2020-06-04 21:10 ` [PATCH v4 09/11] arm64: dts: freescale: sl28: map GPIOs to input events Michael Walle
2020-06-04 21:10 ` [PATCH v4 10/11] arm64: dts: freescale: sl28: enable LED support Michael Walle
2020-06-04 21:10 ` [PATCH v4 11/11] arm64: dts: freescale: sl28: enable fan support Michael Walle
2020-06-05 6:13 ` [PATCH v4 00/11] Add support for Kontron sl28cpld Lee Jones
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=c5632bfab3956265e90fc2fb6c0b3cae@walle.cc \
--to=michael-qkn5culxlxy@public.gmane.org \
--cc=bgolaszewski-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=jdelvare-IBi9RG/b67k@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=leoyang.li-3arQi8VN3Tc@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-hwmon-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=maz-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=wim-Q8PRGTgFL9WUCWQAtAn6Ix2eb7JE58TQ@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).