NVDIMM Device and Persistent Memory development
 help / color / mirror / Atom feed
* [PATCH v5 00/10] Remove .notify callback in acpi_device_ops
@ 2023-06-16 16:50 Michal Wilczynski
  2023-06-16 16:50 ` [PATCH v5 01/10] acpi/bus: Introduce wrappers for ACPICA event handler install/remove Michal Wilczynski
                   ` (9 more replies)
  0 siblings, 10 replies; 36+ messages in thread
From: Michal Wilczynski @ 2023-06-16 16:50 UTC (permalink / raw)
  To: linux-acpi
  Cc: rafael, dan.j.williams, vishal.l.verma, lenb, dave.jiang,
	ira.weiny, rui.zhang, linux-kernel, nvdimm, Michal Wilczynski

*** IMPORTANT ***
This is part 1 - only drivers in acpi directory to ease up review
process. Rest of the drivers will be handled in separate patchsets.

Currently drivers support ACPI event handlers by defining .notify
callback in acpi_device_ops. This solution is suboptimal as event
handler installer installs intermediary function acpi_notify_device as a
handler in every driver. Also this approach requires extra variable
'flags' for specifying event types that the driver want to subscribe to.
Additionally this is a pre-work required to align acpi_driver with
platform_driver and eventually replace acpi_driver with platform_driver.

Remove .notify callback from the acpi_device_ops. Replace it with each
driver installing and removing it's event handlers.

v5:
 - rebased on top of Rafael changes [1], they're not merged yet
 - fixed rollback in multiple drivers so they don't leak resources on
   failure
 - made this part 1, meaning only drivers in acpi directory, rest of
   the drivers will be handled in separate patchsets to ease up review

v4:
 - added one commit for previously missed driver sony-laptop,
   refactored return statements, added NULL check for event installer
v3:
 - lkp still reported some failures for eeepc, fujitsu and
   toshiba_bluetooth, fix those
v2:
 - fix compilation errors for drivers

[1]: https://lore.kernel.org/linux-acpi/1847933.atdPhlSkOF@kreacher/

Michal Wilczynski (10):
  acpi/bus: Introduce wrappers for ACPICA event handler install/remove
  acpi/bus: Set driver_data to NULL every time .add() fails
  acpi/ac: Move handler installing logic to driver
  acpi/video: Move handler installing logic to driver
  acpi/battery: Move handler installing logic to driver
  acpi/hed: Move handler installing logic to driver
  acpi/nfit: Move acpi_nfit_notify() before acpi_nfit_add()
  acpi/nfit: Improve terminator line in acpi_nfit_ids
  acpi/nfit: Move handler installing logic to driver
  acpi/thermal: Move handler installing logic to driver

 drivers/acpi/ac.c         | 33 ++++++++++++++++++++++++---------
 drivers/acpi/acpi_video.c | 26 ++++++++++++++++++++++----
 drivers/acpi/battery.c    | 30 ++++++++++++++++++++++++------
 drivers/acpi/bus.c        | 30 +++++++++++++++++++++++++++++-
 drivers/acpi/hed.c        | 17 ++++++++++++++---
 drivers/acpi/nfit/core.c  | 32 ++++++++++++++++++++++----------
 drivers/acpi/thermal.c    | 28 ++++++++++++++++++++++------
 include/acpi/acpi_bus.h   |  6 ++++++
 8 files changed, 163 insertions(+), 39 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2023-06-30 17:27 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-16 16:50 [PATCH v5 00/10] Remove .notify callback in acpi_device_ops Michal Wilczynski
2023-06-16 16:50 ` [PATCH v5 01/10] acpi/bus: Introduce wrappers for ACPICA event handler install/remove Michal Wilczynski
2023-06-16 16:50 ` [PATCH v5 02/10] acpi/bus: Set driver_data to NULL every time .add() fails Michal Wilczynski
2023-06-16 16:50 ` [PATCH v5 03/10] acpi/ac: Move handler installing logic to driver Michal Wilczynski
2023-06-29 15:55   ` Rafael J. Wysocki
2023-06-30  9:39     ` Wilczynski, Michal
2023-06-30  9:41       ` Rafael J. Wysocki
2023-06-30  9:45         ` Rafael J. Wysocki
2023-06-16 16:50 ` [PATCH v5 04/10] acpi/video: " Michal Wilczynski
2023-06-29 15:58   ` Rafael J. Wysocki
2023-06-30  9:42     ` Wilczynski, Michal
2023-06-16 16:50 ` [PATCH v5 05/10] acpi/battery: " Michal Wilczynski
2023-06-29 16:05   ` Rafael J. Wysocki
2023-06-30  9:48     ` Wilczynski, Michal
2023-06-16 16:50 ` [PATCH v5 06/10] acpi/hed: " Michal Wilczynski
2023-06-16 16:50 ` [PATCH v5 07/10] acpi/nfit: Move acpi_nfit_notify() before acpi_nfit_add() Michal Wilczynski
2023-06-29 16:06   ` Rafael J. Wysocki
2023-06-30  9:48     ` Wilczynski, Michal
2023-06-30 10:52       ` Rafael J. Wysocki
2023-06-16 16:50 ` [PATCH v5 08/10] acpi/nfit: Improve terminator line in acpi_nfit_ids Michal Wilczynski
2023-06-29 16:14   ` Rafael J. Wysocki
2023-06-30  9:52     ` Wilczynski, Michal
2023-06-30 11:04       ` Rafael J. Wysocki
2023-06-30 11:13         ` Rafael J. Wysocki
2023-06-30 12:02           ` Wilczynski, Michal
2023-06-29 20:51   ` Dan Williams
2023-06-30 10:10     ` Wilczynski, Michal
2023-06-16 16:50 ` [PATCH v5 09/10] acpi/nfit: Move handler installing logic to driver Michal Wilczynski
2023-06-29 16:18   ` Rafael J. Wysocki
2023-06-30  9:55     ` Wilczynski, Michal
2023-06-30 11:00       ` Rafael J. Wysocki
2023-06-29 20:54   ` Dan Williams
2023-06-30 16:56     ` Wilczynski, Michal
2023-06-30 17:19       ` Dan Williams
2023-06-30 17:26         ` Wilczynski, Michal
2023-06-16 16:50 ` [PATCH v5 10/10] acpi/thermal: " Michal Wilczynski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox