Commit 1209c77d authored by Fabien Lahoudere's avatar Fabien Lahoudere Committed by Enric Balletbo i Serra

test_cros_ec_accel_iio_abi: Add a condition for frequency attribute

Frequency sysfs attribute have been replaced by the
standard sampling_frequency after 5.4.0. We need to check
the version of running kernel to decide if we must check it.
Signed-off-by: default avatarFabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent b166983c
......@@ -288,6 +288,8 @@ class TestCrosEC(unittest.TestCase):
"sampling_frequency_available", "scale",
"scan_elements/", "trigger/"]
sysfs_check_attributes_exists( self, "/sys/bus/iio/devices", "cros-ec-accel", files, True)
if kernel_greater_than(5,4,0):
sysfs_check_attributes_exists( self, "/sys/bus/iio/devices", "cros-ec-accel", ["frequency"], True)
# This function validate accelerometer data by computing the magnitude.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment