summaryrefslogtreecommitdiffstats
path: root/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh
blob: a08498d70ffc7b70047414adce49392b546d506a (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
for eeprom in /sys/bus/i2c/devices/3-005*/eeprom ; do
	PARTNUMBER=$(hexdump -e '8/1 "%c"' $eeprom -s 58 -n16)
	case $PARTNUMBER in
		"BB-BONE-LCD3-01.")
				echo "Turning off backlight for LCD3 cape"
				i2cset -f -y 1 0x24 0x07 0x00;;
		*)
				echo "unknown cape: $PARTNUMBER";;
	esac
done