diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/use-mainline-bsp/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/use-mainline-bsp/bluetooth-init index 094535f22..7cd706771 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/use-mainline-bsp/bluetooth-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/use-mainline-bsp/bluetooth-init @@ -14,24 +14,17 @@ #=============================================================================== # Bluetooth power GPIO -BT_EN_QCA_GPIO_NR="137" +BT_EN_QCA_GPIO_NR="gpio5 9" # set_gpio_value set_gpio_value() { - local SG_GPIONR="${1}" - local SG_GPIOVAL="${2}" - local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}" - - [ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export - printf out > "${SG_GPIOPATH}/direction" && sleep .2 - printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2 - [ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport + gpioset ${1}=${2} } # powercycle_gpio powercycle_gpio() { - set_gpio_value "${1}" 0 - set_gpio_value "${1}" 1 + gpioset ${1}=0 + gpioset ${1}=1 } error() { diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6qpsbc/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6qpsbc/bluetooth-init index d3816119d..04ae43ecf 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6qpsbc/bluetooth-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6qpsbc/bluetooth-init @@ -14,24 +14,17 @@ #=============================================================================== # Bluetooth power GPIO -BT_EN_QCA_GPIO_NR="244" +BT_EN_QCA_GPIO_NR="da9063-gpio 4" # set_gpio_value set_gpio_value() { - local SG_GPIONR="${1}" - local SG_GPIOVAL="${2}" - local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}" - - [ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export - printf out > "${SG_GPIOPATH}/direction" && sleep .2 - printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2 - [ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport + gpioset ${1}=${2} } # powercycle_gpio powercycle_gpio() { - set_gpio_value "${1}" 0 - set_gpio_value "${1}" 1 + gpioset ${1}=0 + gpioset ${1}=1 } error() { diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6sbc/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6sbc/bluetooth-init index 7085f8782..67699b5da 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6sbc/bluetooth-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6sbc/bluetooth-init @@ -14,24 +14,17 @@ #=============================================================================== # Bluetooth power GPIO -BT_PWR_GPIO_NR="244" +BT_PWR_GPIO_NR="da9063-gpio 4" # set_gpio_value set_gpio_value() { - local SG_GPIONR="${1}" - local SG_GPIOVAL="${2}" - local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}" - - [ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export - printf out > "${SG_GPIOPATH}/direction" && sleep .2 - printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2 - [ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport + gpioset ${1}=${2} } # powercycle_gpio powercycle_gpio() { - set_gpio_value "${1}" 0 - set_gpio_value "${1}" 1 + gpioset ${1}=0 + gpioset ${1}=1 } error() { diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6ul/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6ul/bluetooth-init index 27b1d11d0..21a499c18 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6ul/bluetooth-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5/ccimx6ul/bluetooth-init @@ -14,24 +14,17 @@ #=============================================================================== # Bluetooth power GPIO -BT_EN_QCA_GPIO_NR="137" +BT_EN_QCA_GPIO_NR="gpio5 9" # set_gpio_value set_gpio_value() { - local SG_GPIONR="${1}" - local SG_GPIOVAL="${2}" - local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}" - - [ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export - printf out > "${SG_GPIOPATH}/direction" && sleep .2 - printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2 - [ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport + gpioset ${1}=${2} } # powercycle_gpio powercycle_gpio() { - set_gpio_value "${1}" 0 - set_gpio_value "${1}" 1 + gpioset ${1}=0 + gpioset ${1}=1 } error() { @@ -50,7 +43,7 @@ bluetooth_init() { MOD_VERSION="$(($(cat /proc/device-tree/digi,hwid,hv 2>/dev/null | tr -d '\0' || true)))" if [ "${MOD_VERSION}" -lt "4" ]; then # Ignore the CTS flow control - BT_CTS_QCA_GPIO_NR="18" + BT_CTS_QCA_GPIO_NR="gpio1 18" set_gpio_value "${BT_CTS_QCA_GPIO_NR}" 0 # Reduce the rate to avoid the need for HW flow control