Hide WakeAllowed when the adapter cannot wake the host
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | adapter: Add btd_adapter_may_wake()src/ src/ | +71 | 2 replies | |
| 2/3 | device: Hide WakeAllowed when adapter cannot wakesrc/ | +4 | 0 replies | |
| 3/3 | doc: Mark WakeAllowed as optionaldoc/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH BlueZ 0/3] Hide WakeAllowed when the adapter cannot wake the host
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(-)
Signature · 1 line
2.55.0