1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-06-11 05:16:20 +00:00

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>
This commit is contained in:
Koen Kooi
2012-05-18 16:11:39 +02:00
committed by Denys Dmytriyenko
parent a9eca3f6f9
commit 185d621611
3 changed files with 18 additions and 1 deletions
+4 -1
View File
@@ -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"
+11
View File
@@ -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
@@ -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