btattach: Add auto attach/detach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux