Koen Kooi : beaglebone-capes: add a powerdown script as well
Module: meta-ti Branch: master Commit: 185d6216110354cca80f27b76d78a46336dadfc1 URL: http://arago-project.org/git/meta-ti.git?a=commit;h=185d6216110354cca80f27b76d78a46336dadfc1
Author: Koen Kooi <[email protected]> Date: Fri May 18 16:11:39 2012 +0200
beaglebone-capes: add a powerdown script as well
The current powerdown script disables the PMIC backlight
Signed-off-by Koen Kooi <[email protected]>
Signed-off-by Denys Dmytriyenko <[email protected]>
---
recipes-ti/beagleboard/beaglebone-capes.bb | 5 ++++- .../beagleboard/beaglebone-capes/cape-stop.sh | 11 +++++++++++ .../beagleboard/beaglebone-capes/cape.service | 3 +++ 3 files changed, 18 insertions(+), 1 deletions(-)
recipes-ti/beagleboard/beaglebone-capes.bb +4 -1
@@ -3,10 +3,13 @@ DESCRIPTION = "Userspace setup for beaglebone capes" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" +PR = "r1" + inherit allarch SRC_URI = "file://cape.service \ file://cape.sh \ + file://cape-stop.sh \ " do_install() {
@@ -17,7 +20,7 @@ do_install() { ln -sf ../cape.service ${D}${base_libdir}/systemd/system/basic.target.wants/ install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/cape.sh ${D}${bindir} + install -m 0755 ${WORKDIR}/cape*.sh ${D}${bindir} } FILES_${PN} += "${base_libdir}/systemd/system"
recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh new file +11 -0
@@ -0,0 +1,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
recipes-ti/beagleboard/beaglebone-capes/cape.service +3 -0
@@ -2,7 +2,10 @@ Description=Beaglebone cape support [Service] +Type=oneshot +RemainAfterExit=yes ExecStart=/usr/bin/cape.sh +ExecStop=/usr/bin/cape-stop.sh [Install] WantedBy=basic.target