summaryrefslogtreecommitdiffstats
path: root/recipes-ti/beagleboard
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-05-18 16:11:39 +0200
committerDenys Dmytriyenko <denys@ti.com>2012-05-21 16:53:36 -0400
commit185d6216110354cca80f27b76d78a46336dadfc1 (patch)
tree005fc668cc1c6293e0971408647f32dc89889823 /recipes-ti/beagleboard
parenta9eca3f6f9258cba5f30b9e9bbb0e31bc5da0d77 (diff)
downloadmeta-ti-185d6216110354cca80f27b76d78a46336dadfc1.tar.gz
beaglebone-capes: add a powerdown script as well
The current powerdown script disables the PMIC backlight Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-ti/beagleboard')
-rw-r--r--recipes-ti/beagleboard/beaglebone-capes.bb5
-rwxr-xr-xrecipes-ti/beagleboard/beaglebone-capes/cape-stop.sh11
-rw-r--r--recipes-ti/beagleboard/beaglebone-capes/cape.service3
3 files changed, 18 insertions, 1 deletions
diff --git a/recipes-ti/beagleboard/beaglebone-capes.bb b/recipes-ti/beagleboard/beaglebone-capes.bb
index 88d4a173..f1289247 100644
--- a/recipes-ti/beagleboard/beaglebone-capes.bb
+++ b/recipes-ti/beagleboard/beaglebone-capes.bb
@@ -3,10 +3,13 @@ DESCRIPTION = "Userspace setup for beaglebone capes"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" 4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
5 5
6PR = "r1"
7
6inherit allarch 8inherit allarch
7 9
8SRC_URI = "file://cape.service \ 10SRC_URI = "file://cape.service \
9 file://cape.sh \ 11 file://cape.sh \
12 file://cape-stop.sh \
10 " 13 "
11 14
12do_install() { 15do_install() {
@@ -17,7 +20,7 @@ do_install() {
17 ln -sf ../cape.service ${D}${base_libdir}/systemd/system/basic.target.wants/ 20 ln -sf ../cape.service ${D}${base_libdir}/systemd/system/basic.target.wants/
18 21
19 install -d ${D}${bindir} 22 install -d ${D}${bindir}
20 install -m 0755 ${WORKDIR}/cape.sh ${D}${bindir} 23 install -m 0755 ${WORKDIR}/cape*.sh ${D}${bindir}
21} 24}
22 25
23FILES_${PN} += "${base_libdir}/systemd/system" 26FILES_${PN} += "${base_libdir}/systemd/system"
diff --git a/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh b/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh
new file mode 100755
index 00000000..a08498d7
--- /dev/null
+++ b/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh
@@ -0,0 +1,11 @@
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 *)
9 echo "unknown cape: $PARTNUMBER";;
10 esac
11done
diff --git a/recipes-ti/beagleboard/beaglebone-capes/cape.service b/recipes-ti/beagleboard/beaglebone-capes/cape.service
index 44a2a38b..ce0db719 100644
--- a/recipes-ti/beagleboard/beaglebone-capes/cape.service
+++ b/recipes-ti/beagleboard/beaglebone-capes/cape.service
@@ -2,7 +2,10 @@
2Description=Beaglebone cape support 2Description=Beaglebone cape support
3 3
4[Service] 4[Service]
5Type=oneshot
6RemainAfterExit=yes
5ExecStart=/usr/bin/cape.sh 7ExecStart=/usr/bin/cape.sh
8ExecStop=/usr/bin/cape-stop.sh
6 9
7[Install] 10[Install]
8WantedBy=basic.target 11WantedBy=basic.target