linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btattach: Add auto attach/detach
@ 2015-09-15 14:00 Loic Poulain
  2015-09-16  9:15 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Loic Poulain @ 2015-09-15 14:00 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

I wonder if adding a dynamic attach/detach to btattach could be a good idea.

Since most HCI UART drivers power on/off the Bluetooth controller on 
proto/ldisc open/close.
It could be interesting to attach/detach the line discipline depending 
Bluetooth usage.

A way to do that could be to track rfkill events via the /dev/rfkill device.
I can propose two solutions:

- btattach monitors a specific rfkill node whose index is a passed as 
argument
and ldisc is attached/detached accordingly.

- An other solution could be to create a rfkill node from btattach so 
that if
something blocks/unblocks the node, HCI ldisc is detached/attached 
automatically.
Problem is that we can't create a rfkill node from user-space, but I 
think we can
easily add this support to the rfkill device driver.

On my laptop, the Thinkpad acpi driver exports a rfkill nodes which 
disconnects/reconnects
the USB embedded Bluetooth controller. This is what I would like to 
reproduce for UART here.

Regards,
Loic

-- 
Intel Open Source Technology Center
http://oss.intel.com/

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

end of thread, other threads:[~2015-09-17 13:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15 14:00 btattach: Add auto attach/detach Loic Poulain
2015-09-16  9:15 ` Marcel Holtmann
2015-09-17 10:25   ` Loic Poulain
2015-09-17 11:16     ` Marcel Holtmann
2015-09-17 13:53       ` Loic Poulain

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