op_bluetooth_work: workaround BT freezes
authorUrja Rannikko <urjaman@gmail.com>
Sat, 24 Nov 2012 19:57:17 +0000 (21:57 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 24 Nov 2012 19:59:50 +0000 (21:59 +0200)
http://bugs.openpandora.org/index.php?do=details&task_id=304

recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_bluetooth_work.sh

index c41d4f7..98d3ad2 100644 (file)
@@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
-PR = "r124"
+PR = "r125"
 
 SRC_URI = " \
           file://op_paths.sh \
 
 SRC_URI = " \
           file://op_paths.sh \
index 7c0f2af..26c5e5c 100755 (executable)
@@ -12,6 +12,7 @@ if [ "$1" = "1" ]; then
                sleep 0.2
                echo out > /sys/class/gpio/gpio15/direction
        fi
                sleep 0.2
                echo out > /sys/class/gpio/gpio15/direction
        fi
+       echo 0 > /sys/devices/platform/omap_uart.0/sleep_timeout
        echo 1 > /sys/class/gpio/gpio15/value
        hciattach /dev/ttyO0 texasalt 3000000
        INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`"
        echo 1 > /sys/class/gpio/gpio15/value
        hciattach /dev/ttyO0 texasalt 3000000
        INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`"
@@ -26,6 +27,7 @@ elif [ "$1" = "0" ]; then
        killall hciattach
        echo 0 > /sys/class/gpio/gpio15/value
        echo 0 > '/sys/class/leds/pandora::bluetooth/brightness'
        killall hciattach
        echo 0 > /sys/class/gpio/gpio15/value
        echo 0 > '/sys/class/leds/pandora::bluetooth/brightness'
+       echo 10 > /sys/devices/platform/omap_uart.0/sleep_timeout
        exit 0
 else
        echo "invalid argument"
        exit 0
 else
        echo "invalid argument"