devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Théo Lebrun" <theo.lebrun@bootlin.com>
To: "Stephen Boyd" <sboyd@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Lee Jones" <lee@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>
Cc: <linux-mips@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<linux-gpio@vger.kernel.org>,
	"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
	"Gregory CLEMENT" <gregory.clement@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>
Subject: Re: [PATCH v2 00/11] Add Mobileye EyeQ system controller support (clk, reset, pinctrl)
Date: Thu, 20 Jun 2024 20:00:46 +0200	[thread overview]
Message-ID: <D251HCFITAUR.2SM3S9Q75K4C7@bootlin.com> (raw)
In-Reply-To: <62e1512be0bc44acae9afb34467753db.sboyd@kernel.org>

Hello Stephen,

So, you should have received the latest revision [0]. It takes the
approach you advised:

 - One driver (clk) is platform. Others (reset, pinctrl) are auxiliary
   drivers.
 - The clk driver spawns auxiliary devices, passing to it the iomem
   pointer using ->platform_data.
 - The auxdevs spawned are based on compatible match data. We don't need
   any info to spawn them except their name, so match data only has an
   optional string. No array needed even, just two pointers: plain, simple.
 - This means the iomem register logic is split across each driver.

[0]: https://lore.kernel.org/lkml/20240620-mbly-olb-v3-0-5f29f8ca289c@bootlin.com/

On Tue May 7, 2024 at 11:48 PM CEST, Stephen Boyd wrote:
> I could see the MFD subsystem gaining support for creating child
> auxiliary devices for some compatible string node, and passing those
> devices a regmap. Maybe that would be preferable to having to pick a
> driver subsystem to put the platform driver in. Outside of making a
> general purpose framework, you could put the platform driver in
> drivers/mfd and have that populate the child devices like clk, reset,
> pinctrl, etc.

Having one of the driver be platform and spawn others reduces the amount
of boilerplate (no driver that only creates sub devices). That sounds
like a nice advantage; to be contrasted with having unrelated code in
subsystems (eg auxdev spawning code in drivers/clk/).

Thanks for your pieces of advice Stephen,

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2024-06-20 18:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 14:20 [PATCH v2 00/11] Add Mobileye EyeQ system controller support (clk, reset, pinctrl) Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 01/11] dt-bindings: clock: mobileye,eyeq5-clk: drop bindings Théo Lebrun
2024-05-03 15:57   ` Krzysztof Kozlowski
2024-05-03 16:05     ` Krzysztof Kozlowski
2024-05-07 15:07       ` Théo Lebrun
2024-05-07 15:34         ` Krzysztof Kozlowski
2024-06-20 17:39           ` Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 02/11] dt-bindings: clock: mobileye,eyeq5-reset: " Théo Lebrun
2024-05-03 15:35   ` Rob Herring (Arm)
2024-05-03 14:20 ` [PATCH v2 03/11] dt-bindings: soc: mobileye: add EyeQ OLB system controller Théo Lebrun
2024-05-03 15:35   ` Rob Herring (Arm)
2024-05-07 12:51   ` Rob Herring
2024-06-20 17:41     ` Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 04/11] driver core: platform: Introduce platform_device_add_with_name() Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 05/11] mfd: Add cell device name Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 06/11] mfd: olb: Add support for Mobileye OLB system-controller Théo Lebrun
2024-05-31 11:05   ` Lee Jones
2024-06-20 17:48     ` Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 07/11] clk: divider: Introduce CLK_DIVIDER_EVEN_INTEGERS flag Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 08/11] clk: eyeq: add driver Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 09/11] reset: eyeq: add platform driver Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 10/11] pinctrl: eyeq5: " Théo Lebrun
2024-05-03 14:20 ` [PATCH v2 11/11] MIPS: mobileye: eyeq5: add OLB system-controller node Théo Lebrun
2024-05-04  2:34 ` [PATCH v2 00/11] Add Mobileye EyeQ system controller support (clk, reset, pinctrl) Stephen Boyd
2024-05-07 14:52   ` Théo Lebrun
2024-05-07 15:14     ` Théo Lebrun
2024-05-07 21:48     ` Stephen Boyd
2024-06-20 18:00       ` Théo Lebrun [this message]

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=D251HCFITAUR.2SM3S9Q75K4C7@bootlin.com \
    --to=theo.lebrun@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tawfik.bayouk@mobileye.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=vladimir.kondratiev@mobileye.com \
    /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).