From: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
To: luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org
Cc: alainm@chromium.org, marcel@holtmann.org,
chromeos-bluetooth-upstreaming@chromium.org,
Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Subject: [BlueZ PATCH v5 0/6] device: Allow devices to be marked as wake capable
Date: Mon, 22 Jun 2020 16:40:45 -0700 [thread overview]
Message-ID: <20200622234051.206800-1-abhishekpandit@chromium.org> (raw)
Hi Luiz,
This change accompanies a change in the kernel to allow marking devices
as wakeable so they can wake the system from suspend. Currently, only
HID devices support this and will be configured to allow this setting to
be changed via the WakeAllowed property.
Accompanying kernel change: https://patchwork.kernel.org/patch/11609999/
In order to set this flag, Bluez must call Set Device Flags with the
Remote Wakeup bit set. This change was tested with the accompanying
kernel changes on v5.4 with both manual tests and automated tests.
Here's the tests that I ran manually:
- Pair new HID device and confirm it has Wake Allowed to True
(default). Verify device can be woken from suspend with device.
- Restart bluetoothd, confirm Device Flags Changed event after Add
Device has no Remote Wakeup flag and Set Device Flags is called
afterwards to restore it. Verify wake from suspend still works.
- Disable Wake allowed via dbus and confirm wake from suspend no
longer works.
- Restart bluetoothd and confirm Wake Allowed is still false. Verify
wake from suspend does not work.
Thanks
Abhishek
Changes in v5:
- Use device_flags mgmt op
* Decode device flags
* Refactor to use set_wake_flags and respond to device flags changed
* Add wake_override so we can keep track of user/profile configuration
vs what is currently active
* Only call device_set_wake_support
Changes in v4:
* Renamed wake_capable to wake_allowed
* Removed set_wake_capable mgmt op and updated add_device to accept
flags to set whether a device is wakeable
* Refactored adapter_whitelist_add and adapter_auto_connect_add to call
adapter_add_device
* Renamed WakeCapable to WakeAllowed
* Renamed WakeCapable to WakeAllowed
* Renamed device_set_profile_wake_support to just
device_set_wake_support
Changes in v3:
* Added profile_wake_support and made wake_capable dependent on it
* Added documentation for WakeCapable
* Mark HID device to support wake from suspend
Changes in v2:
* Added dbus api "WakeCapable" to set value
* Update device_set_wake_capable to be called by
adapter_set_wake_capable_complete so we can emit property changed
* Newly added to show whether device is wake capable
* Removed automatically setting wake capable for HID devices
Abhishek Pandit-Subedi (6):
mgmt: Add mgmt op and events for device flags
monitor: Decode device flags mgmt ops and event
device: Support marking a device with wake allowed
client: Display wake allowed property with info
doc/device-api: Add WakeAllowed
input: Make HID devices support wake
client/main.c | 1 +
doc/device-api.txt | 5 ++
lib/mgmt.h | 33 +++++++
monitor/packet.c | 68 +++++++++++++++
profiles/input/device.c | 1 +
profiles/input/hog.c | 1 +
src/adapter.c | 98 +++++++++++++++++++++
src/adapter.h | 3 +-
src/device.c | 184 ++++++++++++++++++++++++++++++++++++++++
src/device.h | 9 ++
10 files changed, 402 insertions(+), 1 deletion(-)
--
2.27.0.111.gc72c7da667-goog
next reply other threads:[~2020-06-22 23:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 23:40 Abhishek Pandit-Subedi [this message]
2020-06-22 23:40 ` [BlueZ PATCH v5 1/6] mgmt: Add mgmt op and events for device flags Abhishek Pandit-Subedi
2020-06-22 23:49 ` device: Allow devices to be marked as wake capable bluez.test.bot
2020-06-22 23:40 ` [BlueZ PATCH v5 2/6] monitor: Decode device flags mgmt ops and event Abhishek Pandit-Subedi
2020-06-22 23:47 ` [BlueZ,v5,2/6] " bluez.test.bot
2020-06-22 23:40 ` [BlueZ PATCH v5 3/6] device: Support marking a device with wake allowed Abhishek Pandit-Subedi
2020-06-22 23:47 ` [BlueZ,v5,3/6] " bluez.test.bot
2020-06-23 0:10 ` [BlueZ PATCH v5 3/6] " Luiz Augusto von Dentz
2020-06-24 3:53 ` Abhishek Pandit-Subedi
2020-06-22 23:40 ` [BlueZ PATCH v5 4/6] client: Display wake allowed property with info Abhishek Pandit-Subedi
2020-06-22 23:40 ` [BlueZ PATCH v5 5/6] doc/device-api: Add WakeAllowed Abhishek Pandit-Subedi
2020-06-22 23:40 ` [BlueZ PATCH v5 6/6] input: Make HID devices support wake Abhishek Pandit-Subedi
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=20200622234051.206800-1-abhishekpandit@chromium.org \
--to=abhishekpandit@chromium.org \
--cc=alainm@chromium.org \
--cc=chromeos-bluetooth-upstreaming@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
/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;
as well as URLs for NNTP newsgroup(s).