Skip to content

iio: Fix iio_fixup_sampling_frequency() picking an unsupported sampling_frequency

Some iio drivers only accept sampling_frequency values listed in sampling_frequency_available and will reject any other values with an EINVAL error.

This causes iio_fixup_sampling_frequency() to fail to fixup the sampling rate making screen-rotation really really slow on e.g. devices where the st_accel driver is used.

Add support for parsing sampling_frequency_available and pick a value from there to fix this.

Merge request reports