Skip to content

Bluetooth: hci_bcm: Add wake-up and PM runtime support

Frederic Danis linux-bluetooth 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 1 replyIn review
  2. v45 patches 3 repliesSuperseded
  3. v33 patches 7 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches10 repliesSuperseded
v12 patches3 repliesSuperseded

Changes in v5 from the cover letter

- Add bt_warn to to unify Bluetooth traces in BT_WARN
- Change bcm_suspend_device/bcm_resume_device prototype to be usable directly in SET_RUNTIME_PM_OPS. This allows to remove bcm_runtime_suspend/bcm_runtime_resume which just call bcm_suspend_device/bcm_resume_device.
- Update commit message and add comment in hci_uart_tty_receive to explain why spin_lock is not requested

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Bluetooth: Add BT_WARN and bt_dev_warn logging macrosinclude/net/bluetooth/bluetooth.h net/bluetooth/lib.c+21 -00 replies
2/5Bluetooth: hci_bcm: Fix IRQ polarity for T100drivers/bluetooth/hci_bcm.c+25 -00 replies
3/5Bluetooth: hci_bcm: Prepare PM runtime supportdrivers/bluetooth/hci_bcm.c+60 -280 replies
4/5Bluetooth: Remove useless rx_lock spinlockdrivers/bluetooth/hci_ldisc.c drivers/bluetooth/hci_uart.h+3 -60 replies
5/5Bluetooth: hci_bcm: Add suspend/resume runtime PM functionsdrivers/bluetooth/hci_bcm.c+56 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/5] Bluetooth: hci_bcm: Add wake-up and PM runtime support

Add wake-up capabilities by retrieveing interruption used by BCM device in ACPI table.
Add PM runtime support.

v4->v5:
- Add bt_warn to to unify Bluetooth traces in BT_WARN
- Change bcm_suspend_device/bcm_resume_device prototype to be usable directly in SET_RUNTIME_PM_OPS. This allows to remove bcm_runtime_suspend/bcm_runtime_resume which just call bcm_suspend_device/bcm_resume_device.
- Update commit message and add comment in hci_uart_tty_receive to explain why spin_lock is not requested

v3->v4:
- Add new BT_WARN and bt_dev_warn logging macros
- Use bt_dev_warn for T100 irq polarity fix
- Rename __bcm_suspend to bcm_suspend_device,
and __bcm_resume to bcm_resume_device
- Remove useless rx_lock spinlock. It is only used in hci_uart_tty_receive() which is the receive_buf ldisc callback. This is already protected by flush_to_ldisc() in drivers/tty/tty_buffer.c.
This allows to use mutex in bcm_recv() and call pm_runtime_* directly
- Remove pm_work Work queue which is now useless
- Delay auto-suspend only when reception of a packet is completed

v2->v3:
- Use DMI_EXACT_MATCH instead of DMI_MATCH
- Fix IRQ polarity for T100TA in driver_data of dmi_system_id struct
- Use dmi_first_match() instead of dmi_check_system()

v1->v2:
- Split 1st patch between general wake-up capability and T100TA IRQ fix
- Replace multiple "if ... else if" by switch in bcm_resource()
- Move code to limit number of #ifdef
- Use DMI info to restrict IRQ to T100TA
- Split 2nd patch to prepare PM runtime support in separated patch
- Tested with and without CONFIG_PM_SLEEP and CONFIG_PM.

Frederic Danis (5):
Bluetooth: Add BT_WARN and bt_dev_warn logging macros
Bluetooth: hci_bcm: Fix IRQ polarity for T100
Bluetooth: hci_bcm: Prepare PM runtime support
Bluetooth: Remove useless rx_lock spinlock
Bluetooth: hci_bcm: Add suspend/resume runtime PM functions

 drivers/bluetooth/hci_bcm.c       | 171 +++++++++++++++++++++++++++++++-------
 drivers/bluetooth/hci_ldisc.c     |   8 +-
 drivers/bluetooth/hci_uart.h      |   1 -
 include/net/bluetooth/bluetooth.h |   5 ++
 net/bluetooth/lib.c               |  16 ++++
 5 files changed, 164 insertions(+), 37 deletions(-)
Signature · 1 line
1.9.1