linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] serdev: Stop using device_driver callbacks
@ 2025-12-12  8:09 Uwe Kleine-König
  2025-12-12  8:09 ` [PATCH v1 1/4] serdev: Provide a bustype shutdown function Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2025-12-12  8:09 UTC (permalink / raw)
  To: Rob Herring, Greg Kroah-Hartman, Jiri Slaby, Yang Li,
	Marcel Holtmann, Luiz Augusto von Dentz, Maximilian Luz,
	Hans de Goede, Ilpo Järvinen
  Cc: linux-serial, linux-bluetooth, linux-arm-msm, platform-driver-x86

Hello,

the serdev subsystem currently doesn't provide a shutdown callback, thus
drivers that want being notified on shutdown have to implement the
respective callback in struct device_driver. This (and more)
functionality can be provided by a bus method as it already done for
.probe() and .remove().

The eventual goal is to remove .shutdown() (and .probe() and .remove())
from struct device_driver.

Note that the first patch introduces a warning when the three affected
drivers are registered (in driver_register() because `drv->bus->shutdown
&& drv->shutdown`). Patches #2 - #4 fix these warnings. So from a user
perspective it would be good to get the whole series in during a single
merge window---either by creating an immutable branch containing patch
#1 that is merged into the respective subsystems before applying the
following patches, or merging the complete series via a single tree.

At a later point in time the added check in
__serdev_device_driver_register() and the function
serdev_legacy_shutdown() can be dropped. I intend to cope for that in
the merge window that removes the callbacks from struct device_driver
because drivers that I might have missed to convert or that are rebased
over that change break silently as long as struct
device_driver::shutdown exists.

Best regards
Uwe

Uwe Kleine-König (4):
  serdev: Provide a bustype shutdown function
  Bluetooth: hci_aml: Migrate to serdev specific shutdown function
  Bluetooth: hci_qca: Migrate to serdev specific shutdown function
  platform/surface: Migrate to serdev specific shutdown function

 drivers/bluetooth/hci_aml.c                | 16 ++++++++--------
 drivers/bluetooth/hci_qca.c                |  5 ++---
 drivers/platform/surface/aggregator/core.c |  6 +++---
 drivers/tty/serdev/core.c                  | 21 +++++++++++++++++++++
 include/linux/serdev.h                     |  1 +
 5 files changed, 35 insertions(+), 14 deletions(-)


base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
-- 
2.47.3


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

end of thread, other threads:[~2025-12-12  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-12  8:09 [PATCH v1 0/4] serdev: Stop using device_driver callbacks Uwe Kleine-König
2025-12-12  8:09 ` [PATCH v1 1/4] serdev: Provide a bustype shutdown function Uwe Kleine-König
2025-12-12  8:44   ` serdev: Stop using device_driver callbacks bluez.test.bot
2025-12-12  8:09 ` [PATCH v1 2/4] Bluetooth: hci_aml: Migrate to serdev specific shutdown function Uwe Kleine-König
2025-12-12  8:09 ` [PATCH v1 3/4] Bluetooth: hci_qca: " Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).