]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: cdc: ad7152: Implement IIO_CHAN_INFO_SAMP_FREQ attribute
authorsayli karnik <karniksayli1995@gmail.com>
Mon, 10 Oct 2016 15:39:17 +0000 (21:09 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:28:01 +0000 (19:28 +0100)
commit0f1552d227193cc02abe020d211ed371e6151e19
treea247d2f53a150287c81f20d3a60ed1bdcb2a3c70
parentab0ce644ea63630072ce0fc94cff47f9b4cc74fd
staging: iio: cdc: ad7152: Implement IIO_CHAN_INFO_SAMP_FREQ attribute

Attributes that were once privately defined become standard with time
and hence a special global define is used. Hence update driver ad7152 to use
IIO_CHAN_INFO_SAMP_FREQ which is a global define instead of
IIO_DEV_ATTR_SAMP_FREQ.
Move functionality from IIO_DEV_ATTR_SAMP_FREQ attribute into
IIO_CHAN_INFO_SAMP_FREQ to implement the sampling_frequency attribute.
Modify ad7152_read_raw() and ad7152_write_raw() to allow reading and
writing the element as well. Also add a lock in the driver's private
data.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/cdc/ad7152.c