From 9765192fbdf1b305a1f9d99e5a1d803773bf4aff Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Fri, 10 Jun 2016 16:55:48 +0200 Subject: [PATCH] bluez5-init: add support for qca6564 Add initial support for the qca6564 chip. https://jira.digi.com/browse/DEL-2611 Signed-off-by: Isaac Hermida --- .../bluez/bluez5-5.33/bluez-init | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.33/bluez-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.33/bluez-init index 8e42e5b26..37151123d 100755 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.33/bluez-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.33/bluez-init @@ -23,7 +23,22 @@ fi SCRIPTNAME="$(basename "${0}")" -bt_init() { +bt_init_qca6564() { + if hciattach -t120 ttyBt qca 3000000 flow 2>/dev/null; then + : # No-op + else + echo "${SCRIPTNAME}: FAILED (hciattach)" + exit + fi + if hciconfig hci0 up; then + echo "${SCRIPTNAME}: OK" + else + echo "${SCRIPTNAME}: FAILED (hciconfig)" + exit + fi +} + +bt_init_ar3k() { if grep -qs '\' /proc/device-tree/compatible; then BT_PWR_GPIO_NR="21" elif grep -qs '\' /proc/device-tree/compatible; then @@ -98,7 +113,13 @@ bt_init() { } # Check if this hardware does support Bluetooth -[ -d "/proc/device-tree/bluetooth" ] && bt_init +if [ -d "/proc/device-tree/bluetooth" ]; then + if grep -qs '\' /proc/device-tree/compatible; then + bt_init_qca6564 + else + bt_init_ar3k + fi +fi echo "Starting bluetooth services." start-stop-daemon -S --background --exec /usr/lib/bluez5/bluetooth/bluetoothd