| #! /bin/sh |
| # Copyright 2017 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # Gather multi axis attributes. |
| for attr in calibbias calibscale; do |
| for path in /sys/bus/iio/devices/iio:device*/*${attr}; do |
| printf '%s: ' "${path}" |
| cat "${path}" |
| done |
| done |
| |
| # Gather per device attributes. |
| for attr in sampling_frequency sampling_frequency_available name location scale; do |
| for path in /sys/bus/iio/devices/iio:device*/${attr}; do |
| printf '%s: ' "${path}" |
| cat "${path}" |
| done |
| done |
| exit 0 |