Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/3] Hide WakeAllowed when the adapter cannot wake the host
@ 2026-07-25 20:18 Matthew Schwartz
  2026-07-25 20:18 ` [PATCH BlueZ 1/3] adapter: Add btd_adapter_may_wake() Matthew Schwartz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Matthew Schwartz @ 2026-07-25 20:18 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Matthew Schwartz

The WakeAllowed property is currently exposed on any device whose
profile supports wake configuration (HID/HoG), regardless of whether
the host controller is configured to wake the system. Clients may decide
whether to offer a "wake the system by this device" toggle based on the
presence of this property, and end up offering it on hardware where it
won't work.

This series gates the property's existence on the adapter's current
wakeup configuration, read from the power/wakeup attribute of the
closest USB ancestor in sysfs. That is the same attribute btusb
consults through device_may_wakeup() on the underlying USB device,
and hci_suspend_sync() skips wakeup configuration entirely when that
callback returns false. Only the USB case is handled, so controllers
on other buses keep the current behavior.

Matthew Schwartz (3):
  adapter: Add btd_adapter_may_wake()
  device: Hide WakeAllowed when adapter cannot wake
  doc: Mark WakeAllowed as optional

 doc/org.bluez.Device.rst |  7 ++--
 src/adapter.c            | 70 ++++++++++++++++++++++++++++++++++++++++
 src/adapter.h            |  1 +
 src/device.c             |  5 ++-
 4 files changed, 80 insertions(+), 3 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-07-25 21:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-25 20:18 [PATCH BlueZ 0/3] Hide WakeAllowed when the adapter cannot wake the host Matthew Schwartz
2026-07-25 20:18 ` [PATCH BlueZ 1/3] adapter: Add btd_adapter_may_wake() Matthew Schwartz
2026-07-25 21:19   ` Hide WakeAllowed when the adapter cannot wake the host bluez.test.bot
2026-07-25 20:18 ` [PATCH BlueZ 2/3] device: Hide WakeAllowed when adapter cannot wake Matthew Schwartz
2026-07-25 20:18 ` [PATCH BlueZ 3/3] doc: Mark WakeAllowed as optional Matthew Schwartz

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