linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BlueZ PATCH v4 0/5] device: Allow devices to be marked as wake capable
@ 2020-03-20  1:50 Abhishek Pandit-Subedi
  2020-03-20  1:50 ` [BlueZ PATCH v4 1/5] mgmt: Update docs for Add Device Abhishek Pandit-Subedi
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Abhishek Pandit-Subedi @ 2020-03-20  1:50 UTC (permalink / raw)
  To: luiz.dentz, marcel
  Cc: alainm, chromeos-bluetooth-upstreaming, linux-bluetooth,
	Abhishek Pandit-Subedi


Hi Luiz and Marcel,

Please do not merge this until the accompanying kernel change is
accepted. I am sending this series to show how I plan on using the
changes to the Add Device management operation.

Pending questions I have for this series:
* Do I need to distinguish whether the kernel supports the updated Add
  Device structure? (It will probably reject it if the size isn't
  correct)
* Can we allow HID devices to default to Wake Allowed? I think its
  preferable to allow newly paired HID devices to wake the system from
  sleep without any additional changes.

--

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.

In order to set this flag, Bluez must call the Add Device management
operation with the DEVICE_FLAG_WAKEABLE flag mask and value set. This
call can be made multiple times with the same address (the kernel will
add the device the first time but only update the action or flags on
subsequent calls).

This change was tested with appropriate kernel changes on v4.19
(verified that HID devices were being marked as wake capable in the
kernel).

Thanks
Abhishek

Changes in v4:
* Newly added support in Add Device for flags
* 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 (5):
  mgmt: Update docs for Add Device
  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 ++
 doc/mgmt-api.txt        |  12 ++++
 lib/mgmt.h              |   3 +
 profiles/input/device.c |   1 +
 profiles/input/hog.c    |   1 +
 src/adapter.c           | 112 +++++++++++++----------------------
 src/adapter.h           |   1 +
 src/device.c            | 125 ++++++++++++++++++++++++++++++++++++++++
 src/device.h            |   8 +++
 10 files changed, 197 insertions(+), 72 deletions(-)

-- 
2.25.1.696.g5e7596f4ac-goog


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

end of thread, other threads:[~2020-03-25 21:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20  1:50 [BlueZ PATCH v4 0/5] device: Allow devices to be marked as wake capable Abhishek Pandit-Subedi
2020-03-20  1:50 ` [BlueZ PATCH v4 1/5] mgmt: Update docs for Add Device Abhishek Pandit-Subedi
2020-03-25 19:57   ` Luiz Augusto von Dentz
2020-03-25 21:25   ` Marcel Holtmann
2020-03-25 21:49     ` Abhishek Pandit-Subedi
2020-03-20  1:50 ` [BlueZ PATCH v4 2/5] device: Support marking a device with wake allowed Abhishek Pandit-Subedi
2020-03-25 19:54   ` Luiz Augusto von Dentz
2020-03-25 20:20     ` Abhishek Pandit-Subedi
2020-03-20  1:50 ` [BlueZ PATCH v4 3/5] client: Display wake allowed property with info Abhishek Pandit-Subedi
2020-03-20  1:50 ` [BlueZ PATCH v4 4/5] doc/device-api: Add WakeAllowed Abhishek Pandit-Subedi
2020-03-20  1:50 ` [BlueZ PATCH v4 5/5] input: Make HID devices support wake Abhishek Pandit-Subedi

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).