From: Michal Wilczynski <michal.wilczynski@intel.com>
To: linux-acpi@vger.kernel.org
Cc: rafael@kernel.org, dan.j.williams@intel.com,
vishal.l.verma@intel.com, lenb@kernel.org, dave.jiang@intel.com,
ira.weiny@intel.com, rui.zhang@intel.com,
linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev,
Michal Wilczynski <michal.wilczynski@intel.com>
Subject: [PATCH v6 0/9] Remove .notify callback in acpi_device_ops
Date: Fri, 30 Jun 2023 21:33:35 +0300 [thread overview]
Message-ID: <20230630183344.891077-1-michal.wilczynski@intel.com> (raw)
*** 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.
This is part 1 - only drivers in acpi directory to ease up review
process.
v6:
- fixed unnecessary RCT in all drivers, as it's not a purpose of
this patch series
- changed error label names to simplify them
- dropped commit that remove a comma
- squashed commit moving code for nfit
- improved nfit driver to use devm instead of .remove()
- re-based as Rafael changes [1] are merged already
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 (9):
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 handler installing logic to driver
acpi/nfit: Remove unnecessary .remove callback
acpi/thermal: Move handler installing logic to driver
drivers/acpi/ac.c | 29 ++++++++++++++++++-------
drivers/acpi/acpi_video.c | 22 ++++++++++++++++---
drivers/acpi/battery.c | 26 +++++++++++++++++-----
drivers/acpi/bus.c | 30 +++++++++++++++++++++++++-
drivers/acpi/hed.c | 17 ++++++++++++---
drivers/acpi/nfit/core.c | 45 +++++++++++++++++++++++++++------------
drivers/acpi/thermal.c | 25 +++++++++++++++++-----
include/acpi/acpi_bus.h | 6 ++++++
8 files changed, 161 insertions(+), 39 deletions(-)
--
2.41.0
next reply other threads:[~2023-06-30 18:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 18:33 Michal Wilczynski [this message]
2023-06-30 18:33 ` [PATCH v6 1/9] acpi/bus: Introduce wrappers for ACPICA event handler install/remove Michal Wilczynski
2023-06-30 18:33 ` [PATCH v6 2/9] acpi/bus: Set driver_data to NULL every time .add() fails Michal Wilczynski
2023-06-30 18:33 ` [PATCH v6 3/9] acpi/ac: Move handler installing logic to driver Michal Wilczynski
2023-06-30 18:33 ` [PATCH v6 4/9] acpi/video: " Michal Wilczynski
2023-06-30 18:33 ` [PATCH v6 5/9] acpi/battery: " Michal Wilczynski
2023-06-30 18:33 ` [PATCH v6 6/9] acpi/hed: " Michal Wilczynski
2023-06-30 18:33 ` [PATCH v6 7/9] acpi/nfit: " Michal Wilczynski
2023-06-30 20:47 ` kernel test robot
2023-06-30 18:33 ` [PATCH v6 8/9] acpi/nfit: Remove unnecessary .remove callback Michal Wilczynski
2023-06-30 18:33 ` [PATCH v6 9/9] acpi/thermal: Move handler installing logic to driver Michal Wilczynski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230630183344.891077-1-michal.wilczynski@intel.com \
--to=michal.wilczynski@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®