summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9eca3f)
raw | patch | inline | side by side (parent: a9eca3f)
author | Koen Kooi <koen@dominion.thruhere.net> | |
Fri, 18 May 2012 14:11:39 +0000 (16:11 +0200) | ||
committer | Denys Dmytriyenko <denys@ti.com> | |
Mon, 21 May 2012 20:53:36 +0000 (16:53 -0400) |
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>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
recipes-ti/beagleboard/beaglebone-capes.bb | patch | blob | history | |
recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh | [new file with mode: 0755] | patch | blob |
recipes-ti/beagleboard/beaglebone-capes/cape.service | patch | blob | history |
diff --git a/recipes-ti/beagleboard/beaglebone-capes.bb b/recipes-ti/beagleboard/beaglebone-capes.bb
index 88d4a1739db087f3e8c5caa1d6f55a43c00998c8..f12892476a6fecb87f46b9b50ea682c276af3d65 100644 (file)
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() {
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"
diff --git a/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh b/recipes-ti/beagleboard/beaglebone-capes/cape-stop.sh
--- /dev/null
@@ -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
diff --git a/recipes-ti/beagleboard/beaglebone-capes/cape.service b/recipes-ti/beagleboard/beaglebone-capes/cape.service
index 44a2a38bac7d8e08ada0d0d43394d3b9371198e8..ce0db719ecc422cc5c08ed40cee4fbf0e0ad78cf 100644 (file)
Description=Beaglebone cape support
[Service]
+Type=oneshot
+RemainAfterExit=yes
ExecStart=/usr/bin/cape.sh
+ExecStop=/usr/bin/cape-stop.sh
[Install]
WantedBy=basic.target