Commit Graph

413406 Commits

Author SHA1 Message Date
Jonathan Cameron
cb4417f9db iio:dac:mcp4725 drop specification of scan type as unused in this driver.
IIO_ST is going away as it is a pain to maintain so the simplest path with
this driver is to not specify the unused scan type.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:08:19 +00:00
Jonathan Cameron
5247362453 iio:dac:max517 drop specification of scan type as unused in this driver.
IIO_ST is going away as it is a pain to maintain so the simplest path with
this driver is to not specify the unused scan type.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:07:37 +00:00
Jonathan Cameron
cb9d90f1e3 iio:dac:ad5791 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:06:57 +00:00
Jonathan Cameron
560101de92 iio:dac:ad5764 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:05:53 +00:00
Jonathan Cameron
64665dd373 iio:dac:ad5755 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:04:47 +00:00
Jonathan Cameron
44ba1593ac iio:dac:ad5686 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:03:52 +00:00
Jonathan Cameron
4974600bbf iio:dac:ad5624r replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:02:46 +00:00
Jonathan Cameron
73d3a77583 iio:dac:ad5504 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:01:58 +00:00
Jonathan Cameron
3d42e148e3 iio:dac:ad5449 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:00:46 +00:00
Jonathan Cameron
e3019c21de iio:dac:ad5446 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 21:00:09 +00:00
Jonathan Cameron
49f8289795 iio:dac:ad5421 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 20:59:39 +00:00
Jonathan Cameron
da9b1a2170 iio:dac:ad5380 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 20:58:34 +00:00
Jonathan Cameron
c865b537e9 iio:dac:ad5360 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 20:57:31 +00:00
Jonathan Cameron
81d49bc622 iio:dac:ad5064 replaces IIO_ST macro with explicit entries to struct scan_type
IIO_ST is going away as it is a pain to maintain.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 20:56:33 +00:00
Jonathan Cameron
e5687979eb iio🔍mag3110 replaces IIO_ST macro with explicit entries to struct scan_type
The IIO_ST macro no longer covers all the elements of struct scan_type
and has this has lead to some bugs being introduced.

The drivers are easier to follow with this structure being directly
filled so that is now preferred.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 20:55:50 +00:00
Jonathan Cameron
7d7feae706 iio:accel:bma180 replaces IIO_ST macro with explicit entries to struct scan_type
The IIO_ST macro no longer covers all the elements of struct scan_type
and has this has lead to some bugs being introduced.

The drivers are easier to follow with this structure being directly
filled so that is now preferred.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17 20:55:01 +00:00
Lars-Peter Clausen
cb955852a4 iio: Remove support for the legacy event config interface
Now that all drivers have been converted to the new event config interface we
can remove for the legacy event config interface. Also drop the '_new' suffix
for the event config interface callbacks, since those are the only callbacks
now.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-08 13:13:52 +00:00
Lars-Peter Clausen
bb7f9d90a5 iio:cm36651: Convert to new event config interface
Switch the cm36651 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-08 13:11:09 +00:00
Alexandre Belloni
c8231a9af8 iio: mxs-lradc: compute temperature from channel 8 and 9
The mxs LRADC is able to read an internal die temperature sensor. The
temperature has to be calculated from the value read on channel 8 and channel 9.
To be able to expose the result to hwmon, implement iio channel 8 as
(channel 9 - channel 8). Then, implement IIO_CHAN_INFO_SCALE and
IIO_CHAN_INFO_OFFSET so that it can be processed by hwmon through the in kernel
provider/consumer mechanism.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-07 10:38:48 +00:00
Srinivas Pandruvada
098d3beccf iio: hid-sensors: Added Inclinometer 3D
Added usage id processing for Inclinometer 3D. This uses IIO
interfaces for triggered buffer to present data to user
mode.This uses HID sensor framework for registering callback
events from the sensor hub.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:31:59 +00:00
Harald Geyer
091a121b04 iio: Add new driver dht11
This driver handles DHT11 and DHT22 sensors.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:30 +00:00
Harald Geyer
ac216aa290 iio: Add support for humidity sensors
There are already humidity sensors in the hwmon subsystem,
so we use their unit (milli percent) here as well.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:29 +00:00
Lars-Peter Clausen
6f93910eba staging:iio:ad9834: Mark transfer buffers as __b16
Fixes the following warnings from sparse:
	drivers/staging/iio/frequency/ad9834.c:45:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c:45:26:    expected unsigned short [unsigned] [short] <noident>
	drivers/staging/iio/frequency/ad9834.c:45:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9834.c:47:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c:47:26:    expected unsigned short [unsigned] [short] <noident>
	drivers/staging/iio/frequency/ad9834.c:47:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9834.c:59:18: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c:59:18:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9834.c:59:18:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9834.c💯26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c💯26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9834.c💯26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9834.c:108:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c:108:26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9834.c:108:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9834.c:122:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c:122:26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9834.c:122:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9834.c:131:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c:131:26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9834.c:131:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9834.c:194:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c:194:26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9834.c:194:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9834.c:387:18: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9834.c:387:18:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9834.c:387:18:    got restricted __be16 [usertype] <noident>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:29 +00:00
Lars-Peter Clausen
2a0c293e48 staging:iio:ad9832: Mark transfer buffers as __be16
Fixes the following warnings from sparse:
	drivers/staging/iio/frequency/ad9832.c:43:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:43:26:    expected unsigned short [unsigned] [short] <noident>
	drivers/staging/iio/frequency/ad9832.c:43:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:46:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:46:26:    expected unsigned short [unsigned] [short] <noident>
	drivers/staging/iio/frequency/ad9832.c:46:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:49:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:49:26:    expected unsigned short [unsigned] [short] <noident>
	drivers/staging/iio/frequency/ad9832.c:49:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:52:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:52:26:    expected unsigned short [unsigned] [short] <noident>
	drivers/staging/iio/frequency/ad9832.c:52:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:65:27: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:65:27:    expected unsigned short [unsigned] [short] <noident>
	drivers/staging/iio/frequency/ad9832.c:65:27:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:68:27: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:68:27:    expected unsigned short [unsigned] [short] <noident>
	drivers/staging/iio/frequency/ad9832.c:68:27:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:107:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:107:26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9832.c:107:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:120:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:120:26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9832.c:120:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:133:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:133:26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9832.c:133:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:144:26: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:144:26:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9832.c:144:26:    got restricted __be16 [usertype] <noident>
	drivers/staging/iio/frequency/ad9832.c:277:18: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/frequency/ad9832.c:277:18:    expected unsigned short [unsigned] data
	drivers/staging/iio/frequency/ad9832.c:277:18:    got restricted __be16 [usertype] <noident>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:29 +00:00
Axel Lin
f59c2576c1 iio:trigger: Convert to use ATTRIBUTE_GROUPS
Use new ATTRIBUTE_GROUPS macro to declare attribute groups.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:29 +00:00
Lars-Peter Clausen
ee551a1000 iio: Add support for blocking IO on buffers
Currently the IIO buffer interface only allows non-blocking reads. This patch
adds support for blocking IO. In blocking mode the thread will go to sleep if no
data is available and will wait for the buffer implementation to signal that new
data is available by waking up the buffers waitqueue.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:29 +00:00
Lars-Peter Clausen
355c1a14d4 iio: kfifo_buf: Implement data_available() callback
This patch implements the data_available() callback for the kfifo buffer instead
of using the stufftoread flag. The kfifo used by the buffer already knows
whether it is empty or not based on the position of its read and write pointer.
Using this makes it a lot easier to tell whether data is available or not and it
is not necessary to take special measures to ensure that no race conditions
between reading and writing from the buffer occur.

Note, that we still have to take the buffers lock to protect against concurrent
resizeing of the kfifo.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:28 +00:00
Lars-Peter Clausen
647cc7b9be iio: Add data_available callback for buffers
This patch adds a new data_available() callback to the iio_buffer_access_funcs
struct. The callback is used to indicate whether data is available in the buffer
for reading. It is meant to replace the stufftoread flag from the iio_buffer
struct. The reasoning for this is that the buffer implementation usually can
determine whether data is available rather easily based on its state, on the
other hand it can be rather tricky to update the stufftoread flag in a race free
way.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:28 +00:00
Lars-Peter Clausen
112b0b79b2 staging:iio:ad7746: Do not store the transfer buffer on the stack
Some I2C controllers might not be able to handle transfer buffers that are
stored on stack.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:28 +00:00
Lars-Peter Clausen
d4adb07c7a staging:iio:ad7746: Mark transfer buffer as __be32
Fixes the following warnings from sparse:
	drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
	drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
	drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
	drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
	drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32
	drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:28 +00:00
Lars-Peter Clausen
93dbad639d staging:iio:ad7280a: Do not store transfer buffer on the stack
Some I2C controllers may not be able to handle transfer buffers that are placed
on the stack.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:27 +00:00
Lars-Peter Clausen
b39c47d193 staging:iio:ad7280a: Mark transfer buffer as __be32
Fixes the following warnings from sparse:
	drivers/staging/iio/adc/ad7280a.c:194:35: warning: incorrect type in initializer (different base types)
	drivers/staging/iio/adc/ad7280a.c:194:35:    expected unsigned int [unsigned] tx_buf
	drivers/staging/iio/adc/ad7280a.c:194:35:    got restricted __be32 [usertype] <noident>
	drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
	drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
	drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
	drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
	drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
	drivers/staging/iio/adc/ad7280a.c:207:16: warning: cast to restricted __be32
	drivers/staging/iio/adc/ad7280a.c:219:13: warning: incorrect type in assignment (different base types)
	drivers/staging/iio/adc/ad7280a.c:219:13:    expected unsigned int [unsigned] [assigned] reg
	drivers/staging/iio/adc/ad7280a.c:219:13:    got restricted __be32 [usertype] <noident>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:27 +00:00
Lars-Peter Clausen
91f197e0c0 iio:vcnl4000: Mark transfer buffer as __be16
Fixes the following warnings from sparse:
	drivers/iio/light/vcnl4000.c:88:16: warning: cast to restricted __be16
	drivers/iio/light/vcnl4000.c:88:16: warning: cast to restricted __be16
	drivers/iio/light/vcnl4000.c:88:16: warning: cast to restricted __be16
	drivers/iio/light/vcnl4000.c:88:16: warning: cast to restricted __be16

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:27 +00:00
Lars-Peter Clausen
54e018da31 iio:ad7266: Mark transfer buffer as __be16
Fixes the following warnings from sparse:
	drivers/iio/adc/ad7266.c:140:16: warning: cast to restricted __be16
	drivers/iio/adc/ad7266.c:140:16: warning: cast to restricted __be16
	drivers/iio/adc/ad7266.c:140:16: warning: cast to restricted __be16
	drivers/iio/adc/ad7266.c:140:16: warning: cast to restricted __be16

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:27 +00:00
Lars-Peter Clausen
791bb52a0c iio:ad5791: Do not store transfer buffers on the stack
Some SPI controllers may not be able to handle transfer buffers that are placed
on the stack.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:26 +00:00
Lars-Peter Clausen
ae8bb9b101 iio:ad5791: Mark transfer buffers as __be32
Fixes the following warnings from sparse:
	drivers/iio/dac/ad5791.c:114:18: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5791.c:114:18:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5791.c:114:18:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5791.c:142:21: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5791.c:142:21:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5791.c:142:21:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5791.c:144:21: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5791.c:144:21:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5791.c:144:21:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:26 +00:00
Lars-Peter Clausen
edc05f2614 iio:ad5755: Mark transfer buffer as __be32
Fixes the following warnings from sparse:
	drivers/iio/dac/ad5755.c:117:25: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5755.c:117:25:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5755.c:117:25:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5755.c:171:25: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5755.c:171:25:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5755.c:171:25:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5755.c:172:25: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5755.c:172:25:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5755.c:172:25:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5755.c:176:23: warning: cast to restricted __be32

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:26 +00:00
Lars-Peter Clausen
cf87534b6f iio:ad5686: Mark transfer buffer as __be32
Fixes the following warnings from sparse:
	drivers/iio/dac/ad5686.c💯25: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5686.c💯25:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5686.c💯25:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5686.c:122:25: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5686.c:122:25:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5686.c:122:25:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5686.c:124:25: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5686.c:124:25:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5686.c:124:25:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5686.c:130:16: warning: cast to restricted __be32

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:26 +00:00
Lars-Peter Clausen
8ef411b78b iio:ad5421: Mark transfer buffer as __be32
Fixes the following warnings from sparse:
	drivers/iio/dac/ad5421.c:134:25: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5421.c:134:25:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5421.c:134:25:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5421.c:168:25: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5421.c:168:25:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5421.c:168:25:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32
	drivers/iio/dac/ad5421.c:172:23: warning: cast to restricted __be32

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:25 +00:00
Lars-Peter Clausen
0dbe59c7a7 iio:ad5504: Do not store transfer buffers on the stack
Some SPI controllers may not be able to handle transfer buffers that are placed
on the stack.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:25 +00:00
Lars-Peter Clausen
61c358e3bc iio:ad5504: Mark transfer buffers as __be16
Fixes the following warnings from sparse:
	drivers/iio/dac/ad5504.c:71:19: warning: incorrect type in initializer (different base types)
	drivers/iio/dac/ad5504.c:71:19:    expected unsigned short [unsigned] [usertype] tmp
	drivers/iio/dac/ad5504.c:71:19:    got restricted __be16 [usertype] <noident>
	drivers/iio/dac/ad5504.c:80:19: warning: incorrect type in initializer (different base types)
	drivers/iio/dac/ad5504.c:80:19:    expected unsigned short [unsigned] [usertype] tmp
	drivers/iio/dac/ad5504.c:80:19:    got restricted __be16 [usertype] <noident>
	drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
	drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
	drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
	drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03 20:22:25 +00:00
Jingoo Han
c3a09c18ed vme: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 11:15:58 -08:00
Martyn Welch
d7729f0fc4 VME: Rename vme_slot_get to avoid confusion with reference counting
Traditionally the "get" functions increment the reference count of the
object that is returned, which does not happen with vme_slot_get. The
function vme_slot_get returns the physical VME slot associated with a
particular struct vme_dev. Rename vme_slot_num to avoid any confusion.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 11:15:58 -08:00
Martyn Welch
978f47d643 VME: Provide access to VME bus enumeration and fix vme_user match function
The match function for vme_user is completely wrong. It will blindly bind
against the first VME slot on each bus (at this point that would be just the
first bus as the driver can only handle one bus).

The original intention (before some major subsystem changes) was that the
driver bind against the slot to which the bridge was attached in the VME
system and to the bus(es) provided via the "bus" module parameter.

To do this cleanly (i.e. without poking arround in the subsystems internal
stuctures) a functionality has been added to provide access to the bus
enumeration.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 11:15:58 -08:00
Wei Yongjun
49cf10c67b staging: dwc2: fix sparse non static symbol warning
Fixes the following sparse warning:

drivers/staging/dwc2/core.c:2672:6: warning:
 symbol 'dwc2_set_param_uframe_sched' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 09:35:18 -08:00
H Hartley Sweeten
d128161569 staging: comedi: ni_atmio16d: remove an unnecessary printk
This blank line printk is not necessary. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 09:20:23 -08:00
H Hartley Sweeten
ec9b2f4f4f staging: comedi: ni_atmio16d: tidy up the irq support in atmio16d_attach()
Tidy up the code that does the request_irq().

Only hookup the commad support if the irq was sucessfully requested.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 09:20:23 -08:00
H Hartley Sweeten
d4bdba2f60 staging: comedi: ni_atmio16d: remove printk() noise in atmio16d_ai_insn_read()
These printk messages are just added noise. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 09:20:23 -08:00
H Hartley Sweeten
2f4a269b27 staging: comedi: ni_pcimio: convert printk() to dev_dbg()
Convert this printk messages to a dev_dbg().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 09:20:23 -08:00
H Hartley Sweeten
9cc2bafb61 staging: comedi: ni_tio: remove commented out printk message
This printk message is just added noise. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 09:20:23 -08:00