-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABAgAGBQJP/x5IAAoJEFSFNJnE9BaI4a8QALxYb9a+CU248/fz987hxA6d
Ajqw2uo0sUUkeap03yjlJRCDvlyhnbinytJx/RJANRqhF4+p5Y9gMmudupnkQFlD
qTEo3odQ7RvjcK6HURz8OKnwGMoiXpZkmcIuFyg3spIe33DonycB/O2AAvAb69LJ
pQZoCTRNRJEK0PFbcum1vX9pNhfvnSFCVOXywBaEhZhBE03vqlgMjhnGbaoT9qLL
ItjFCZd22JarpDZkY01PTtAVU2J6WPIvwoh585EjF1aZYV/YUrDfyqM6yAUqP01y
YcnvMe0imwKwhubq9lfT9zphXWD4rzV/Ajr/uD0qMXmzAufBia3R74nIQ26XTlTm
KY5dEcCTy4TJrQPxmdl2hJvWvyJ2mnJQGyfnCHpTnCWyj2jCRzXAleTbCt0QFYOB
5tgJg8QCO3M/ZNBe+D9I5KO3JtDLMiBboeVVxPrWEVT4XyO3vQOxgzVirvXoSJID
c64EXJFIi9PRlEXyCBB8xAyH8BS5wuAJbYdXrOzovU9nBwj18tWWY4M7NOb1bSry
1RiLzw0mulYj59UeuyXqe2ydCOWyNw8S8XnGVgQB5Nw7WeUL4OilrwYixDiLW5qS
ZBHgu0L37FPW1AT57lnifqAz6uGIKERqQsbJzBWz4E39uU8DXLBMLDRNiLlLeH3Z
z3mtd7bNn8ow04rBVd9F
=5L5b
-----END PGP SIGNATURE-----
Merge tag 'togreg-3.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
IIO: One new driver and a couple of nice cleanups.
It is possible that on one of the error paths we are going to try to free
'rxbuf', even though it has not been allocated yet, which cause the following
warning:
drivers/staging/iio/adc/max1363_ring.c: In function 'max1363_trigger_handler':
drivers/staging/iio/adc/max1363_ring.c:87:7: warning: 'rxbuf' may be used
uninitialized in this function
Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Add iio channel type and modifiers for Correlated Color Temperature (CCT)
and RGBC (red/green/blue/clear) data.
Add CCT and RGBC descriptions to documentation.
Changes:
Revised/condensed RGBC descriptions.
Merge and trivial fix done by Jonathan Cameron.
Signed-off-by: Jon Brenner <jbrenner@taosinc.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Nothing terribly interesting in this one.
8 July 2012
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABAgAGBQJP+d34AAoJEFSFNJnE9BaIJtMQAI3LR9H/WW00adqHZuRf1bZe
+24h/yrrLuWx3KxyzHDh+AQwhFdRMUaWSme4K8wn9p4K0qVQXmY2XWE1pPk5OzdC
LnXVl+QT8Ij+hz02Gl2GEiraAvSWVgR8jxZBfRBQtpfrsDFgyaDaq0+MlfT8W7O+
5sF/OcraYqeaE+jx3Y1kZwgcpo4b2zd4R70HCJNxLCGEV9xC7tMDeCs7PzOwgM1B
65/hw7EAFvDaq+xzpV+W0fmvbSnWhoYtSHSYPg5gZB0N38gYWay5fOJv3TB+4TWM
vDxbWVfFx+qFFyOhCWXnezhnlIpt/+HLiJo/9WHma8Nonao6Dly++nYeHizVbeMc
yk/fR7DuNKRjw5EbwNj+i9mIBnjtREGI8JSVqc9QQxuIvvXIh52Fmf0nXlFt1P/a
yjzj1kycmWJ4P3Mll2xXlnOqE0VpHp645rbdfOz2Ix8q0LlByeRN736mlfpSrv1l
vP9QZecufpeUvIM5z7kS/RWFZAC8wYIJVQkFHm56LrKXTec/OS7TO9g/nx8rGlzu
eP5XfPpwUUw4BXQSRHZBY3rFhrF+p3mx5WFlQeCie/eDPgGJ1yHoCZUCc7tMRLwR
So+7SRIoJYF6OWRkyZQE1VjiMpuHrmFG5WIKv9WuzSzyZloRZYyAD6yx4dJAz9z2
CwzEn+/tbrwu8+8hdZSb
=ihIe
-----END PGP SIGNATURE-----
Merge tag 'togreg_8_7_2012' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Mixed back of updates and trivial examples fixes.
Nothing terribly interesting in this one.
8 July 2012
Only one of the channels of the ade7758 may be sampled at a time. Use the new
validate_scan_mask callback and the iio_validate_scan_mask_onehot function to
implement this restriction. Previously this was implemented using
available_scan_masks, but this requires a individual scan mask for each channel.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Only one of the channels of the ad7793 may be sampled at a time. Use the new
validate_scan_mask callback and the iio_validate_scan_mask_onehot function to
implement this restriction. Previously this was implemented using
available_scan_masks, but this requires a individual scan mask for each channel.
Also the previous code was adding the scan index of the timestamp channel to
each available scan mask, this is not required though since the timestamp
channel is not restricted by the available scan masks and can be enabled or
disabled independently. So the new code does not have to take care of this.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Only one of the channels of the ad7192 may be sampled at a time. Use the new
validate_scan_mask callback and the iio_validate_scan_mask_onehot function to
implement this restriction. Previously this was implemented using
available_scan_masks, but this requires a individual scan mask for each channel.
Also the previous code was adding the scan index of the timestamp channel to
each available scan mask, this is not required though since the timestamp
channel is not restricted by the available scan masks and can be enabled or
disabled independently. So the new code does not have to take care of this.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The interrupt handler should only ever return one of the three irqreturn_t
constants and not an error code. Also make sure to always call
iio_trigger_notify_done before leaving the trigger handler.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The driver assumes that in 13bit mode the 16bit value has
to be shifted to the right by 3 bits. This is not true, in
both 16bit and 13bit mode the MSB is at the same position.
Currently the driver returns a temperature of 194 degrees
Celsius in 13bit mode and 24 degrees Celsius in 16bit mode.
Fix this by using the same algorithm for 16bit and 13bit
mode and by just masking out the lower three bits in 13bit
mode.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Otherwise a write to the resolution entry never returns.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Since commit 1c6c69525b ("genirq: Reject bogus threaded irq requests") threaded
IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise
the request will fail. This patch adds the IRQF_ONESHOT to IIO drivers where it
is missing.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The adt7410 expects information about an irq in platform_data.
The driver can work without an irq, so make platform_data optional
by specifying a dummy platform_data if the device has none.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
In 13bit mode the lower three bits of the adc value contain
flags. The driver does not use these flags at all, so make 16bit
mode the default.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
maybe iio_modifier_names and iio_chan_type_name_spec should be
exported from industrialio-core instead?
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reduces code and makes this channel available within the kernel.
Note that it is not added to the buffer, thus maintaining the
previous functionality of this driver.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
There is no reason for userspace to do this, so lets
drop this abi.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
There is no reason for userspace to do this, so lets
drop this abi.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
There is no reason why userspace should want to do this manually.
Hence, lets drop this abi.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
These were originally introduced when the plan was to have parallel
IIO cores in and out of staging with a slow move between them.
Now we have reached the point where the whole core has moved,
they need clearing up!
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
These are supported by raw_read but not actually there.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Will result in the correct scale value for the x axis.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
The code expects the scan index to match the offset of the channel into the
channel array. For the "shorted" the offset is 3, but the scan index is set to
2. Also the scan index 2 is already taken by the previous channel. As a result
the "shorted" channel will appear to be selected if the previous channel is
selected and vice versa and it is not possible to sample the "shorted" channel
in buffered mode.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
iio_utils.h:367:10: warning: ‘iioutils_break_up_name’ is static but used in inline function ‘build_channel_array’ which is not static [enabled by default]
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drop extra argument, move cast
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
accessing first and last channel fails:
fakedata[0] is never accessed, out-of-bound access for last channel
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use to_iio_trigger(dev) instead of dev_get_drvdata(dev). Both will return the
trigger which belongs to the device, but the the first on is a bit more
lightweight. Also this will eventually free up the drvdata pointer of the device
for driver specific data.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>