From afd90c127f93cb575903c839920192fa8e0e095e Mon Sep 17 00:00:00 2001 From: Huzefa Kankroliwala Date: Wed, 6 Mar 2013 06:44:22 -0800 Subject: [PATCH] bigcore: Give more time for iio device detection Currently android framework checks if /sys/bus/iio/devices node is created and sets sensor property based on it. The check is performed in a for loop of ~1 sec. Looks like for i2c based sensors it is taking more time for the node to be created and hence setting of property fails. Increase the loop time to ~5 sec max which gives enough time for the node to be detected. Issue: AXIA-2039 Change-Id: I1b33eae948482e9e6835918d61357cd6ba3d7b2b Signed-off-by: Huzefa Kankroliwala --- bigcore/libsensors/BoardConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigcore/libsensors/BoardConfig.cpp b/bigcore/libsensors/BoardConfig.cpp index e110b5f..5e92105 100644 --- a/bigcore/libsensors/BoardConfig.cpp +++ b/bigcore/libsensors/BoardConfig.cpp @@ -59,7 +59,7 @@ int BoardConfig::sensorListSize() } } - for (int i=0; i<50; i++) { + for (int i=0; i<250; i++) { num_files = 0; if ((dp = opendir("/sys/bus/iio/devices")) == NULL){ usleep(20000); -- 2.11.0