Message ID | cover.1747175187.git.Jonathan.Santos@analog.com |
---|---|
Headers | show |
Series | iio: adc: ad7768-1: Add features, improvements, and fixes | expand |
On Thu, May 15, 2025 at 06:13:43PM -0300, Jonathan Santos wrote: > When the device is configured to decimation x8, only possible in the > sinc5 filter, output data is reduced to 16-bits in order to support > 1 MHz of sampling frequency due to clock limitation. > > Use multiple scan types feature to enable the driver to switch > scan type at runtime, making it possible to support both 24-bit and > 16-bit resolution. ... > +static int ad7768_get_current_scan_type(const struct iio_dev *indio_dev, > + const struct iio_chan_spec *chan) > +{ > + struct ad7768_state *st = iio_priv(indio_dev); > + > + return st->dec_rate == 8 ? AD7768_SCAN_TYPE_HIGH_SPEED : > + AD7768_SCAN_TYPE_NORMAL; Besides issues with the indentation, the logical split seems to me better: return st->dec_rate == 8 ? AD7768_SCAN_TYPE_HIGH_SPEED : AD7768_SCAN_TYPE_NORMAL; > +} But no need to resend just for this. Perhaps Jonathan can update.