From: Loic Poulain <loic.poulain@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: btattach: Add auto attach/detach
Date: Tue, 15 Sep 2015 16:00:01 +0200 [thread overview]
Message-ID: <55F82461.6000805@intel.com> (raw)
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/
next reply other threads:[~2015-09-15 14:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 14:00 Loic Poulain [this message]
2015-09-16 9:15 ` btattach: Add auto attach/detach Marcel Holtmann
2015-09-17 10:25 ` Loic Poulain
2015-09-17 11:16 ` Marcel Holtmann
2015-09-17 13:53 ` Loic Poulain
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=55F82461.6000805@intel.com \
--to=loic.poulain@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.