Re: [PATCH RFC] power: reset: restart-poweroff: convert to module
From: Sverdlin, Alexander
Date: Thu Feb 22 2024 - 02:55:50 EST
Hi Andrew!
On Wed, 2024-02-21 at 23:37 +0100, Andrew Lunn wrote:
> > The necessity of having a fake platform device for a generic, platform
> > independent functionality is not obvious.
> > Some platforms requre device tree modification for this, some would require
> > ACPI tables modification, while functionality may be useful even to
> > end-users without required expertise. Convert the platform driver to
> > a simple module.
> >
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxxxx>
> > ---
> > This RFC is merely to understand if this approach would be accepted.
> > Converting to "tristate" could follow or preceed this patch.
>
> So that is you use case here? Why do you want to be able to just load
> this driver, without using DT to indicate it is needed by the
> hardware?
Yes, the code is platform-independent now and can be re-used for deployments
which meant to be "always on". One could actually even use it with
off-the-shelf x86 hardware. But instantiating a platform device there would
be a hack. Why not just control this code in the kernel config?
--
Alexander Sverdlin
Siemens AG
www.siemens.com