lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 20 Jun 2024 20:00:46 +0200
From: Théo Lebrun <theo.lebrun@...tlin.com>
To: "Stephen Boyd" <sboyd@...nel.org>, "Conor Dooley" <conor+dt@...nel.org>,
 "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>, "Krzysztof Kozlowski"
 <krzysztof.kozlowski+dt@...aro.org>, "Lee Jones" <lee@...nel.org>, "Linus
 Walleij" <linus.walleij@...aro.org>, "Michael Turquette"
 <mturquette@...libre.com>, "Philipp Zabel" <p.zabel@...gutronix.de>,
 "Rafael J. Wysocki" <rafael@...nel.org>, "Rob Herring" <robh@...nel.org>,
 "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>
Cc: <linux-mips@...r.kernel.org>, <devicetree@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, <linux-clk@...r.kernel.org>,
 <linux-gpio@...r.kernel.org>, "Vladimir Kondratiev"
 <vladimir.kondratiev@...ileye.com>, "Gregory CLEMENT"
 <gregory.clement@...tlin.com>, "Thomas Petazzoni"
 <thomas.petazzoni@...tlin.com>, "Tawfik Bayouk"
 <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH v2 00/11] Add Mobileye EyeQ system controller support
 (clk, reset, pinctrl)

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ