Re: [PATCH v2 00/11] Add Mobileye EyeQ system controller support (clk, reset, pinctrl)

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

 



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

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






[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux