udev: enable external RTC as wakeup source

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
This commit is contained in:
Mike Engel 2022-11-11 18:34:31 +01:00
parent cf6b49096c
commit 81faeb3a05
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# Enable external RTC as a wakeup source
SUBSYSTEM=="platform", KERNEL=="5c009000.i2c", ACTION=="add", ATTRS{power/wakeup}=="disabled", RUN+="/bin/sh -c 'echo enabled > /sys/devices/platform/soc/5c009000.i2c/power/wakeup'"
SUBSYSTEM=="platform", KERNEL=="40013000.i2c", ACTION=="add", ATTRS{power/wakeup}=="disabled", RUN+="/bin/sh -c 'echo enabled > /sys/devices/platform/soc/40013000.i2c/power/wakeup'"

View File

@ -7,6 +7,9 @@ SRC_URI += " \
file://81-spi-spidev.rules \ file://81-spi-spidev.rules \
file://blacklist.conf \ file://blacklist.conf \
" "
SRC_URI:append:ccmp1 = " \
file://99-ext-rtc-wakeup.rules \
"
do_install:append() { do_install:append() {
@ -49,6 +52,10 @@ do_install:append() {
fi fi
} }
do_install:append:ccmp1() {
install -m 0644 ${WORKDIR}/99-ext-rtc-wakup.rules ${D}${sysconfdir}/udev/rules.d/
}
FILES:${PN}:append = " ${sysconfdir}/modprobe.d" FILES:${PN}:append = " ${sysconfdir}/modprobe.d"
FILES:${PN}:append = " /mnt" FILES:${PN}:append = " /mnt"