From 53f89ad74d8dc382d50e9901fed5f720449e4a2c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 18 Dec 2014 23:29:06 +0100 Subject: [PATCH] usb2514: skip gpio script on kernels that export GPIOs themselves --- recipes-bsp/sob-odu/files/gpio_usb2514 | 7 +++++++ recipes-bsp/sob-odu/usb2514_1.bb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/recipes-bsp/sob-odu/files/gpio_usb2514 b/recipes-bsp/sob-odu/files/gpio_usb2514 index baa245b..befde70 100644 --- a/recipes-bsp/sob-odu/files/gpio_usb2514 +++ b/recipes-bsp/sob-odu/files/gpio_usb2514 @@ -1,5 +1,12 @@ #!/bin/sh +# in more recent kernels the kernel is itself taking care of exporting +# the right GPIOs and setting their direction and level. We can detect +# this by checking for the below sysfs path +if [ -d /sys/devices/platform/sob-odu.0 ]; then + exit 0 +fi + cd /sys/class/gpio # !mdm1_pwr_ind diff --git a/recipes-bsp/sob-odu/usb2514_1.bb b/recipes-bsp/sob-odu/usb2514_1.bb index b06858b..e73366e 100644 --- a/recipes-bsp/sob-odu/usb2514_1.bb +++ b/recipes-bsp/sob-odu/usb2514_1.bb @@ -4,7 +4,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://${WORKDIR}/usb2514.c;beginline=1;endline=18;md5=3b8421a1c05d21add65cc20fccfa29cd" DEPENDS += "lmsensors-apps" -PR = "r1" +PR = "r2" SRC_URI = "file://usb2514.c \ file://gpio_usb2514 \