From 059712b8c72b116f054d1cb0a4439f534ca74d5c Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 18 Feb 2022 18:34:12 -0600 Subject: Prevent waiting for the supercap when the EEPROM is not written --- recipes-bsp/multitech/mts-io/mts-io.mtcap.init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init index f8e611f..7b444a1 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init +++ b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init @@ -107,6 +107,10 @@ gettime() { echo ${BASH_REMATCH[1]} } wait_for_supercap() { + if ! [[ -f ${sysdir}/capability/supercap ]] ; then + # Driver not loaded, maybe EEPROM not set + return + fi supercap=$(mts-io-sysfs show capability/supercap 2>/dev/null) if ((supercap != 1)) ; then return -- cgit v1.2.3