1 .. SPDX-License-Identifier: GPL-2.0 2 3 =============== 4 ADXL380 driver 5 =============== 6 7 This driver supports Analog Device's ADXL380/3 8 9 1. Supported devices 10 ==================== 11 12 * `ADXL380 <https://www.analog.com/ADXL380>`_ 13 * `ADXL382 <https://www.analog.com/ADXL382>`_ 14 15 The ADXL380/ADXL382 is a low noise density, lo 16 selectable measurement ranges. The ADXL380 sup 17 ranges, and the ADXL382 supports ±15 g, ±30 18 19 2. Device attributes 20 ==================== 21 22 Accelerometer measurements are always provided 23 24 Temperature data are also provided. This data 25 internal system temperature or to improve the 26 device via calibration. 27 28 Each IIO device, has a device folder under ``/ 29 where X is the IIO index of the device. Under 30 device files, depending on the characteristics 31 device in questions. These files are consisten 32 the IIO ABI documentation. 33 34 The following tables show the adxl380 related 35 specific device folder path ``/sys/bus/iio/dev 36 37 +--------------------------------------------- 38 | 3-Axis Accelerometer related device files 39 +--------------------------------------------- 40 | in_accel_scale 41 +--------------------------------------------- 42 | in_accel_filter_high_pass_3db_frequency 43 +--------------------------------------------- 44 | in_accel_filter_high_pass_3db_frequency_avai 45 +--------------------------------------------- 46 | in_accel_filter_low_pass_3db_frequency 47 +--------------------------------------------- 48 | in_accel_filter_low_pass_3db_frequency_avail 49 +--------------------------------------------- 50 | in_accel_x_calibbias 51 +--------------------------------------------- 52 | in_accel_x_raw 53 +--------------------------------------------- 54 | in_accel_y_calibbias 55 +--------------------------------------------- 56 | in_accel_y_raw 57 +--------------------------------------------- 58 | in_accel_z_calibbias 59 +--------------------------------------------- 60 | in_accel_z_raw 61 +--------------------------------------------- 62 63 +----------------------------------+---------- 64 | Temperature sensor related files | Descripti 65 +----------------------------------+---------- 66 | in_temp_raw | Raw tempe 67 +----------------------------------+---------- 68 | in_temp_offset | Offset fo 69 +----------------------------------+---------- 70 | in_temp_scale | Scale for 71 +----------------------------------+---------- 72 73 +------------------------------+-------------- 74 | Miscellaneous device files | Description 75 +------------------------------+-------------- 76 | name | Name of the I 77 +------------------------------+-------------- 78 | sampling_frequency | Currently sel 79 +------------------------------+-------------- 80 | sampling_frequency_available | Available sam 81 +------------------------------+-------------- 82 83 Channels processed values 84 ------------------------- 85 86 A channel value can be read from its _raw attr 87 raw value as reported by the devices. To get t 88 apply the following formula: 89 90 .. code-block:: bash 91 92 processed value = (_raw + _offset) * _ 93 94 Where _offset and _scale are device attributes 95 present, simply assume its value is 0. 96 97 The adis16475 driver offers data for 2 types o 98 the measurement units for the processed value, 99 framework: 100 101 +-------------------------------------+------- 102 | Channel type | Measur 103 +-------------------------------------+------- 104 | Acceleration on X, Y, and Z axis | Meters 105 +-------------------------------------+------- 106 | Temperature | Millid 107 +-------------------------------------+------- 108 109 Usage examples 110 -------------- 111 112 Show device name: 113 114 .. code-block:: bash 115 116 root:/sys/bus/iio/devices/iio:device0> 117 adxl382 118 119 Show accelerometer channels value: 120 121 .. code-block:: bash 122 123 root:/sys/bus/iio/devices/iio:device0> 124 -1771 125 root:/sys/bus/iio/devices/iio:device0> 126 282 127 root:/sys/bus/iio/devices/iio:device0> 128 -1523 129 root:/sys/bus/iio/devices/iio:device0> 130 0.004903325 131 132 - X-axis acceleration = in_accel_x_raw * in_ac 133 - Y-axis acceleration = in_accel_y_raw * in_ac 134 - Z-axis acceleration = in_accel_z_raw * in_ac 135 136 Set calibration offset for accelerometer chann 137 138 .. code-block:: bash 139 140 root:/sys/bus/iio/devices/iio:device0> 141 0 142 143 root:/sys/bus/iio/devices/iio:device0> 144 root:/sys/bus/iio/devices/iio:device0> 145 50 146 147 Set sampling frequency: 148 149 .. code-block:: bash 150 151 root:/sys/bus/iio/devices/iio:device0> 152 16000 153 root:/sys/bus/iio/devices/iio:device0> 154 16000 32000 64000 155 156 root:/sys/bus/iio/devices/iio:device0> 157 root:/sys/bus/iio/devices/iio:device0> 158 32000 159 160 Set low pass filter bandwidth for acceleromete 161 162 .. code-block:: bash 163 164 root:/sys/bus/iio/devices/iio:device0> 165 32000 166 root:/sys/bus/iio/devices/iio:device0> 167 32000 8000 4000 2000 168 169 root:/sys/bus/iio/devices/iio:device0> 170 root:/sys/bus/iio/devices/iio:device0> 171 2000 172 173 3. Device buffers 174 ================= 175 176 This driver supports IIO buffers. 177 178 All devices support retrieving the raw acceler 179 using buffers. 180 181 Usage examples 182 -------------- 183 184 Select channels for buffer read: 185 186 .. code-block:: bash 187 188 root:/sys/bus/iio/devices/iio:device0> 189 root:/sys/bus/iio/devices/iio:device0> 190 root:/sys/bus/iio/devices/iio:device0> 191 root:/sys/bus/iio/devices/iio:device0> 192 193 Set the number of samples to be stored in the 194 195 .. code-block:: bash 196 197 root:/sys/bus/iio/devices/iio:device0> 198 199 Enable buffer readings: 200 201 .. code-block:: bash 202 203 root:/sys/bus/iio/devices/iio:device0> 204 205 Obtain buffered data: 206 207 .. code-block:: bash 208 209 root:/sys/bus/iio/devices/iio:device0> 210 ... 211 002bc300 f7 e7 00 a8 fb c5 24 80 f7 212 002bc310 f7 f9 00 ab fb dc 24 80 f7 213 002bc320 f7 fb 00 bb fb d1 24 80 f7 214 002bc330 f7 c4 00 c6 fb a6 24 80 f7 215 002bc340 f7 b8 00 a3 fb e7 24 80 f7 216 002bc350 f7 b1 00 67 fb ee 24 80 f7 217 002bc360 f7 ab 00 7a fc 1b 24 80 f7 218 002bc370 f7 ce 00 a3 fc 02 24 80 f7 219 002bc380 f7 c3 00 93 fb d0 24 80 f7 220 002bc390 f7 bd 00 c0 fb 82 24 80 f8 221 002bc3a0 f7 d8 00 d3 fb b4 24 80 f8 222 002bc3b0 f7 eb 00 c8 fb 92 24 80 f7 223 002bc3c0 f7 fd 00 cb fb 94 24 80 f7 224 ... 225 226 See ``Documentation/iio/iio_devbuf.rst`` for m 227 data is structured. 228 229 4. IIO Interfacing Tools 230 ======================== 231 232 See ``Documentation/iio/iio_tools.rst`` for th 233 interfacing tools.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.