Re: BT led trigger
From: Michal Simek <monstr@monstr.eu>
Date: 2017-05-31 17:57:45
Hi Marcel, +linux-bluetooth, On 31.5.2017 19:34, Marcel Holtmann wrote:
Hi Michal,quoted
I have found your name in connection to net/bluetooth/leds.c trigger. I understand that this trigger will show status of hci controller and this is just working fine. I have tested it without any issue. I am curious if we could use this trigger to handle also gpio signal which is enabling BT. I am using ti chip where we have bt_en connected to gpio. I have seen that people are handling this from userspace by exporting gpio and writing values there but it looks pretty bad to me. Have you ever tried to use bt led trigger also for handling gpio enable signals? Or is there any other nice way how to handle it?that is the wrong approach. See how hci_intel.c, hci_bcm.c, hci_nokia.c and others are dealing with the GPIO pins in the background. There is no need for any user space hacks anymore.
I use TI wl1831 over uart with flow control which is using hci_ll.c. I understand handling when you have specific driver that you need to handle it. But if this is just over uart where from simply running "hciattach -n /dev/ttyS1 texas" I can detect this chip.
Also please use linux-bluetooth@vger.kernel.org for these kinds of questions.
Sorry about it now. Fixed now. Also I have seen that in bluez that hciattach is deprecated tool. https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=b1eb2c4c And there are new tools which should replace them https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=301904d6 Should I use btattach instead? Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs
Attachments
- signature.asc [application/pgp-signature] 198 bytes