On Wed, 2023-06-21 at 21:25 +0200, Andrew Lunn wrote: > > ACPI core does has notifiers that are used, but they don't work the same. > > If you look at patch 4, you'll see amdgpu registers and unregisters using > > both > > > > acpi_install_notify_handler() > > and > > acpi_remove_notify_handler() > > > > If we supported both ACPI notifications and non-ACPI notifications > > all consumers would have to have support to register and use both types. > > Why would you want to support ACPI notifications and non-ACPI > notifications? All you need is wbrf notification. > > The new wbrf.c should implement wbrf_install_notify_handler() and > wbrf_remove_notify_handler(). > > As to where to put wbrf.c? I guess either drivers/base/ or > drivers/wbrf/. Maybe ask GregKH? Not sure it should even be called WBRF at that point, but hey :) Honestly I'm not sure though we need this complexity right now? I mean, it'd be really easy to replace the calls in mac80211 with some other more generalised calls in the future? You need some really deep platform/hardware level knowledge and involvement to do this, so I don't think it's something that someone will come up with very easily for a DT-based platform... If we do something with a notifier chain in the future, we can just install one in the ACPI code too, and react indirectly rather than calling from wifi to the ACPI directly. johannes