summaryrefslogtreecommitdiffstats
path: root/recipes-test/ddt-runner/files/scripts/p4080ds/i2c
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 00:31:33 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 00:53:44 +0200
commitcd3411088f6bb4393d79c50b5f7eef3f11a83435 (patch)
treee1b44fd7c353d9018f489d03f3dea78bc876b94a /recipes-test/ddt-runner/files/scripts/p4080ds/i2c
downloadmeta-enea-cd3411088f6bb4393d79c50b5f7eef3f11a83435.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-test/ddt-runner/files/scripts/p4080ds/i2c')
-rwxr-xr-xrecipes-test/ddt-runner/files/scripts/p4080ds/i2c24
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-test/ddt-runner/files/scripts/p4080ds/i2c b/recipes-test/ddt-runner/files/scripts/p4080ds/i2c
new file mode 100755
index 0000000..5b312b9
--- /dev/null
+++ b/recipes-test/ddt-runner/files/scripts/p4080ds/i2c
@@ -0,0 +1,24 @@
1#!/bin/sh
2
3if I2C_ADAPTERS=$(i2cdetect -l |wc -l); then
4 echo "PASS: found $I2C_ADAPTERS i2c adapters"
5else
6 echo "FAIL: no i2c adapters found"
7 exit 1
8fi
9
10if [ -z "$adapters" ]; then
11 adapters=0
12fi
13
14while [ $adapters -lt $I2C_ADAPTERS ]
15do
16 i2cdetect -y $adapters
17 if [ $? -ne 0 ]; then
18 echo "FAIL: detect i2c adapter $adapters failed"
19 else
20 echo "PASS: detect i2c adapter $adapters success"
21 fi
22 adapters=`expr $adapters + 1`
23 sleep 1
24done