Messages in this thread | | | Subject | Re: [PATCH RFC 2/2] soc: Add a basic ACPI generic driver | From | John Garry <> | Date | Wed, 29 Jan 2020 10:27:30 +0000 |
| |
>> >>> Any reasons for not putting it into drivers/acpi/pptt.c specifically? >>> . >> >> I don't think so. >> >> One thing is that the code does a one-time scan of the PPTT to find all >> processor package nodes with ID structures to register the soc devices - >> so we would need some new call from from acpi_init() for that. >
Hi Rafael,
> Or an extra initcall or similar. [Calls from acpi_init() are basically > for things that need to be strictly ordered in a specific way for some > reason.]> > Why would that be a problem?
I don't see a problem if we want to use a soc driver, but that is starting to look unlikely.
Alternatively, if we want to create some folder under /sys/firmware/acpi, any restriction comes from the folder location.
For a folder like /sys/firmware/acpi/pptt, we need to ensure acpi_kobj is initialized; acpi_kobj is set from subsys_init(acpi_init), so module_init() for pptt module would suffice.
However if we wanted to make pptt folder a sub-folder from those created in acpi_sysfs_init() - then we would need to make that parent folder kobj non-static. Again, module_init() would suffice.
Thanks, John
| |