]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: ad7192: implement IIO_CHAN_INFO_SAMP_FREQ
authorEva Rachel Retuya <eraretuya@gmail.com>
Wed, 5 Oct 2016 03:06:21 +0000 (11:06 +0800)
committerJonathan Cameron <jic23@kernel.org>
Tue, 11 Oct 2016 18:39:38 +0000 (19:39 +0100)
commit166109d787fb0a86873f9f82669c1b9f904a64e3
treeb26170ad93cee5acc8401bc43909f6e539899aea
parentba96f5ab989006a9b7b2c70dbd9f61a799d11ae2
staging: iio: ad7192: implement IIO_CHAN_INFO_SAMP_FREQ

This driver predates the availability of IIO_CHAN_INFO_SAMP_FREQ
attribute wherein usage has some advantages like it can be accessed by
in-kernel consumers as well as reduces the code size.

Therefore, use IIO_CHAN_INFO_SAMP_FREQ to implement the
sampling_frequency attribute instead of using IIO_DEV_ATTR_SAMP_FREQ()
macro.

Move code from the functions associated with IIO_DEV_ATTR_SAMP_FREQ()
into respective read and write hooks with the mask set to
IIO_CHAN_INFO_SAMP_FREQ.

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7192.c
include/linux/iio/adc/ad_sigma_delta.h