1*caf0fb3bSMauro Carvalho ChehabWhat: /sys/bus/iio/devices/iio:deviceX/buffer/length 2*caf0fb3bSMauro Carvalho ChehabKernelVersion: 2.6.35 3*caf0fb3bSMauro Carvalho ChehabContact: linux-iio@vger.kernel.org 4*caf0fb3bSMauro Carvalho ChehabDescription: 5*caf0fb3bSMauro Carvalho Chehab Number of scans contained by the buffer. 6*caf0fb3bSMauro Carvalho Chehab 7*caf0fb3bSMauro Carvalho Chehab Since Kernel 5.11, multiple buffers are supported. 8*caf0fb3bSMauro Carvalho Chehab so, it is better to use, instead: 9*caf0fb3bSMauro Carvalho Chehab /sys/bus/iio/devices/iio:deviceX/bufferY/length 10*caf0fb3bSMauro Carvalho Chehab 11*caf0fb3bSMauro Carvalho ChehabWhat: /sys/bus/iio/devices/iio:deviceX/buffer/enable 12*caf0fb3bSMauro Carvalho ChehabKernelVersion: 2.6.35 13*caf0fb3bSMauro Carvalho ChehabContact: linux-iio@vger.kernel.org 14*caf0fb3bSMauro Carvalho ChehabDescription: 15*caf0fb3bSMauro Carvalho Chehab Actually start the buffer capture up. Will start trigger 16*caf0fb3bSMauro Carvalho Chehab if first device and appropriate. 17*caf0fb3bSMauro Carvalho Chehab 18*caf0fb3bSMauro Carvalho Chehab Since Kernel 5.11, multiple buffers are supported. 19*caf0fb3bSMauro Carvalho Chehab so, it is better to use, instead: 20*caf0fb3bSMauro Carvalho Chehab /sys/bus/iio/devices/iio:deviceX/bufferY/enable 21*caf0fb3bSMauro Carvalho Chehab 22*caf0fb3bSMauro Carvalho ChehabWhat: /sys/bus/iio/devices/iio:deviceX/scan_elements 23*caf0fb3bSMauro Carvalho ChehabKernelVersion: 2.6.37 24*caf0fb3bSMauro Carvalho ChehabContact: linux-iio@vger.kernel.org 25*caf0fb3bSMauro Carvalho ChehabDescription: 26*caf0fb3bSMauro Carvalho Chehab Directory containing interfaces for elements that will be 27*caf0fb3bSMauro Carvalho Chehab captured for a single triggered sample set in the buffer. 28*caf0fb3bSMauro Carvalho Chehab 29*caf0fb3bSMauro Carvalho Chehab Since kernel 5.11 the scan_elements attributes are merged into 30*caf0fb3bSMauro Carvalho Chehab the bufferY directory, to be configurable per buffer. 31*caf0fb3bSMauro Carvalho Chehab 32*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_accel_x_en 33*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_accel_y_en 34*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_accel_z_en 35*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_anglvel_x_en 36*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_anglvel_y_en 37*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_en 38*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_magn_x_en 39*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_magn_y_en 40*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_magn_z_en 41*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_magnetic_en 42*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_true_en 43*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_magnetic_tilt_comp_en 44*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_true_tilt_comp_en 45*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_timestamp_en 46*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_en 47*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_en 48*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY-voltageZ_en 49*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_i_en 50*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_q_en 51*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltage_i_en 52*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltage_q_en 53*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_incli_x_en 54*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_incli_y_en 55*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_pressureY_en 56*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_pressure_en 57*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en 58*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_proximity_en 59*caf0fb3bSMauro Carvalho ChehabKernelVersion: 2.6.37 60*caf0fb3bSMauro Carvalho ChehabContact: linux-iio@vger.kernel.org 61*caf0fb3bSMauro Carvalho ChehabDescription: 62*caf0fb3bSMauro Carvalho Chehab Scan element control for triggered data capture. 63*caf0fb3bSMauro Carvalho Chehab 64*caf0fb3bSMauro Carvalho Chehab Since kernel 5.11 the scan_elements attributes are merged into 65*caf0fb3bSMauro Carvalho Chehab the bufferY directory, to be configurable per buffer. 66*caf0fb3bSMauro Carvalho Chehab 67*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_accel_type 68*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_anglvel_type 69*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_magn_type 70*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_incli_type 71*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_type 72*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltage_type 73*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type 74*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_i_type 75*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_q_type 76*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltage_i_type 77*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltage_q_type 78*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_timestamp_type 79*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_pressureY_type 80*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_pressure_type 81*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type 82*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_proximity_type 83*caf0fb3bSMauro Carvalho ChehabKernelVersion: 2.6.37 84*caf0fb3bSMauro Carvalho ChehabContact: linux-iio@vger.kernel.org 85*caf0fb3bSMauro Carvalho ChehabDescription: 86*caf0fb3bSMauro Carvalho Chehab Description of the scan element data storage within the buffer 87*caf0fb3bSMauro Carvalho Chehab and hence the form in which it is read from user-space. 88*caf0fb3bSMauro Carvalho Chehab Form is [be|le]:[s|u]bits/storagebits[>>shift]. 89*caf0fb3bSMauro Carvalho Chehab be or le specifies big or little endian. s or u specifies if 90*caf0fb3bSMauro Carvalho Chehab signed (2's complement) or unsigned. bits is the number of bits 91*caf0fb3bSMauro Carvalho Chehab of data and storagebits is the space (after padding) that it 92*caf0fb3bSMauro Carvalho Chehab occupies in the buffer. shift if specified, is the shift that 93*caf0fb3bSMauro Carvalho Chehab needs to be applied prior to masking out unused bits. Some 94*caf0fb3bSMauro Carvalho Chehab devices put their data in the middle of the transferred elements 95*caf0fb3bSMauro Carvalho Chehab with additional information on both sides. Note that some 96*caf0fb3bSMauro Carvalho Chehab devices will have additional information in the unused bits 97*caf0fb3bSMauro Carvalho Chehab so to get a clean value, the bits value must be used to mask 98*caf0fb3bSMauro Carvalho Chehab the buffer output value appropriately. The storagebits value 99*caf0fb3bSMauro Carvalho Chehab also specifies the data alignment. So s48/64>>2 will be a 100*caf0fb3bSMauro Carvalho Chehab signed 48 bit integer stored in a 64 bit location aligned to 101*caf0fb3bSMauro Carvalho Chehab a 64 bit boundary. To obtain the clean value, shift right 2 102*caf0fb3bSMauro Carvalho Chehab and apply a mask to zero the top 16 bits of the result. 103*caf0fb3bSMauro Carvalho Chehab For other storage combinations this attribute will be extended 104*caf0fb3bSMauro Carvalho Chehab appropriately. 105*caf0fb3bSMauro Carvalho Chehab 106*caf0fb3bSMauro Carvalho Chehab Since kernel 5.11 the scan_elements attributes are merged into 107*caf0fb3bSMauro Carvalho Chehab the bufferY directory, to be configurable per buffer. 108*caf0fb3bSMauro Carvalho Chehab 109*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_index 110*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_index 111*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_i_index 112*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltageY_q_index 113*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltage_i_index 114*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_voltage_q_index 115*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_accel_x_index 116*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_accel_y_index 117*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_accel_z_index 118*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_anglvel_x_index 119*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_anglvel_y_index 120*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_index 121*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_magn_x_index 122*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_magn_y_index 123*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_magn_z_index 124*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_magnetic_index 125*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_true_index 126*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_magnetic_tilt_comp_index 127*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_from_north_true_tilt_comp_index 128*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_incli_x_index 129*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_incli_y_index 130*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_timestamp_index 131*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_pressureY_index 132*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_pressure_index 133*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index 134*caf0fb3bSMauro Carvalho ChehabWhat: /sys/.../iio:deviceX/scan_elements/in_proximity_index 135*caf0fb3bSMauro Carvalho ChehabKernelVersion: 2.6.37 136*caf0fb3bSMauro Carvalho ChehabDescription: 137*caf0fb3bSMauro Carvalho Chehab A single positive integer specifying the position of this 138*caf0fb3bSMauro Carvalho Chehab scan element in the buffer. Note these are not dependent on 139*caf0fb3bSMauro Carvalho Chehab what is enabled and may not be contiguous. Thus for user-space 140*caf0fb3bSMauro Carvalho Chehab to establish the full layout these must be used in conjunction 141*caf0fb3bSMauro Carvalho Chehab with all _en attributes to establish which channels are present, 142*caf0fb3bSMauro Carvalho Chehab and the relevant _type attributes to establish the data storage 143*caf0fb3bSMauro Carvalho Chehab format. 144*caf0fb3bSMauro Carvalho Chehab 145*caf0fb3bSMauro Carvalho Chehab Since kernel 5.11 the scan_elements attributes are merged into 146*caf0fb3bSMauro Carvalho Chehab the bufferY directory, to be configurable per buffer. 147*caf0fb3bSMauro Carvalho Chehab 148*caf0fb3bSMauro Carvalho ChehabWhat: /sys/bus/iio/devices/iio:deviceX/buffer/watermark 149*caf0fb3bSMauro Carvalho ChehabKernelVersion: 4.2 150*caf0fb3bSMauro Carvalho ChehabContact: linux-iio@vger.kernel.org 151*caf0fb3bSMauro Carvalho ChehabDescription: 152*caf0fb3bSMauro Carvalho Chehab A single positive integer specifying the maximum number of scan 153*caf0fb3bSMauro Carvalho Chehab elements to wait for. 154*caf0fb3bSMauro Carvalho Chehab 155*caf0fb3bSMauro Carvalho Chehab Poll will block until the watermark is reached. 156*caf0fb3bSMauro Carvalho Chehab 157*caf0fb3bSMauro Carvalho Chehab Blocking read will wait until the minimum between the requested 158*caf0fb3bSMauro Carvalho Chehab read amount or the low water mark is available. 159*caf0fb3bSMauro Carvalho Chehab 160*caf0fb3bSMauro Carvalho Chehab Non-blocking read will retrieve the available samples from the 161*caf0fb3bSMauro Carvalho Chehab buffer even if there are less samples then watermark level. This 162*caf0fb3bSMauro Carvalho Chehab allows the application to block on poll with a timeout and read 163*caf0fb3bSMauro Carvalho Chehab the available samples after the timeout expires and thus have a 164*caf0fb3bSMauro Carvalho Chehab maximum delay guarantee. 165*caf0fb3bSMauro Carvalho Chehab 166*caf0fb3bSMauro Carvalho Chehab Since Kernel 5.11, multiple buffers are supported. 167*caf0fb3bSMauro Carvalho Chehab so, it is better to use, instead: 168*caf0fb3bSMauro Carvalho Chehab /sys/bus/iio/devices/iio:deviceX/bufferY/watermark 169*caf0fb3bSMauro Carvalho Chehab 170*caf0fb3bSMauro Carvalho ChehabWhat: /sys/bus/iio/devices/iio:deviceX/buffer/data_available 171*caf0fb3bSMauro Carvalho ChehabKernelVersion: 4.16 172*caf0fb3bSMauro Carvalho ChehabContact: linux-iio@vger.kernel.org 173*caf0fb3bSMauro Carvalho ChehabDescription: 174*caf0fb3bSMauro Carvalho Chehab A read-only value indicating the bytes of data available in the 175*caf0fb3bSMauro Carvalho Chehab buffer. In the case of an output buffer, this indicates the 176*caf0fb3bSMauro Carvalho Chehab amount of empty space available to write data to. In the case of 177*caf0fb3bSMauro Carvalho Chehab an input buffer, this indicates the amount of data available for 178*caf0fb3bSMauro Carvalho Chehab reading. 179*caf0fb3bSMauro Carvalho Chehab 180*caf0fb3bSMauro Carvalho Chehab Since Kernel 5.11, multiple buffers are supported. 181*caf0fb3bSMauro Carvalho Chehab so, it is better to use, instead: 182*caf0fb3bSMauro Carvalho Chehab /sys/bus/iio/devices/iio:deviceX/bufferY/data_available 183