[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <36970a28-44e7-4e54-b22b-fc7524bd2a08@linaro.org>
Date: Thu, 10 Jul 2025 12:54:20 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: William McVicker <willmcvicker@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Lorenzo Pieralisi <lorenzo.pieralisi@...aro.org>,
Hans de Goede <hansg@...nel.org>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>, Rob Herring
<robh@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
John Stultz <jstultz@...gle.com>, Stephen Boyd <sboyd@...nel.org>,
Saravana Kannan <saravanak@...gle.com>,
Linux-Arch <linux-arch@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE"
<devicetree@...r.kernel.org>
Subject: Re: [PATCH RFC] timer: of: Create a platform_device before the
framework is initialized
On 08/07/2025 18:10, Arnd Bergmann wrote:
[ ... ]
> The way I had expected this to work was that TIMER_OF_DECLARE_PDEV()
> always registers the platform_driver and just skips the
> section magic when it's in a loadable module.
Yes it would be a nice change, but it seems to be not possible for the
early + builtin + module combination we have AFAICS.
What about to have two macros:
/*
* Declares module_platform_driver
* Assigns __driver.driver.of_match_table = __of_match
* Assigns __driver.driver.name = __name
*/
TIMER_OF_DECLARE_PLATFORM_DRIVER(__name, __driver, __of_match)
/*
* Does the same as the above but if MODULE is not set then then we
* end up with timer-probe() instead of builtin_platform_driver
*/
TIMER_OF_DECLARE_EARLY_PLATFORM_DRIVER(__name, __driver, __of_match)
So when someone is converting a driver into a module, it can change the
driver to use these macros instead.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists