summaryrefslogtreecommitdiffstats
path: root/meta-ti-extras/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ti-extras/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh')
-rwxr-xr-xmeta-ti-extras/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-ti-extras/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh b/meta-ti-extras/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh
new file mode 100755
index 00000000..222a010d
--- /dev/null
+++ b/meta-ti-extras/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh
@@ -0,0 +1,14 @@
1#!/bin/sh
2for eeprom in /sys/bus/i2c/devices/3-005*/eeprom ; do
3 PARTNUMBER=$(hexdump -e '8/1 "%c"' $eeprom -s 58 -n16)
4 case $PARTNUMBER in
5 "BB-BONE-LCD3-01.")
6 echo "Turning off backlight for LCD3 cape"
7 i2cset -f -y 1 0x24 0x07 0x00;;
8 "BB-BONE-LCD4"*)
9 echo "Turning off backlight for LCD4 cape"
10 i2cset -f -y 1 0x24 0x07 0x00;;
11 *)
12 echo "unknown cape: $PARTNUMBER";;
13 esac
14done