openwrt/staging/blogic.git
11 years agohwmon: Move the IIO client driver for hwmon out of staging
Jonathan Cameron [Wed, 20 Mar 2013 22:21:00 +0000 (22:21 +0000)]
hwmon: Move the IIO client driver for hwmon out of staging

This driver uses channel maps, defined either through device tree
or platform data, to create a hwmon driver which acts as a client
for the underlying IIO device channels.  Thus a general purpose
IIO adc driver can be used to provide hardware monitoring using a subset
of its channels.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
--
 The only non move changes here concern the description and changes to the
 dependencies to IIO explicit and hwmon implicit.

 I'm proposing moving this into hwmon on the basis of placing drivers
 based on what they provide rather than what their underlying hardware
 is.

 drivers/hwmon/Kconfig           |   9 ++
 drivers/hwmon/Makefile          |   1 +
 drivers/hwmon/iio_hwmon.c       | 196 ++++++++++++++++++++++++++++++++++++++++
 drivers/staging/iio/Kconfig     |   8 --
 drivers/staging/iio/Makefile    |   2 -
 drivers/staging/iio/iio_hwmon.c | 196 ----------------------------------------
 6 files changed, 206 insertions(+), 206 deletions(-)

11 years agostaging/iio: iio_hwmon: Use device tree node name for hwmon name attribute
Guenter Roeck [Wed, 20 Mar 2013 15:52:00 +0000 (15:52 +0000)]
staging/iio: iio_hwmon: Use device tree node name for hwmon name attribute

So far, all instances of iio_hwmon set their hwmon name attribute
to "iio_hwmon", which is not very descriptive. Set it to the device tree
node name if available, and only revert to iio_hwmon otherwise.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: Add dt support for turning on the phy in exynos-adc
Doug Anderson [Wed, 13 Mar 2013 20:40:00 +0000 (20:40 +0000)]
iio: adc: Add dt support for turning on the phy in exynos-adc

Without this change the exynos adc controller needed to have its phy
enabled in some out-of-driver C code.  Add support for specifying the
phy enable register by listing it in the reg list.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:adc:ad7923: Add support for the ad7904/ad7914/ad7924
Lars-Peter Clausen [Mon, 4 Mar 2013 19:30:00 +0000 (19:30 +0000)]
iio:adc:ad7923: Add support for the ad7904/ad7914/ad7924

The ad7924 is software compatible with the ad7923. The ad7904 and ad7914 are the
8 and 10 bit version of the ad7924.

While we are at it also drop the "with temperature sensor" from the Kconfig
entry, since the chips do not have a temperature sensor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Patrick Vasseur <patrick.vasseur@c-s.fr>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:ad7923: Implement scale reporting
Lars-Peter Clausen [Mon, 4 Mar 2013 19:30:00 +0000 (19:30 +0000)]
iio:ad7923: Implement scale reporting

The driver already claims to support scale reporting in its channel spec, but
doesn't actually implement this yet. This patch uses the regulator API to get
the reference voltage and calculates the scale based on that. The patch also
moves the global configuration bits into a field in the ad7923_state struct,
since depending on the RANGE bit, the range goes either from 0 to VREF or from 0
to 2 * VREF. So we need to know the setting of the RANGE bit when calculating
the scale.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Patrick Vasseur <patrick.vasseur@c-s.fr>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:ad7923: Return error if we didn't get the expected result
Lars-Peter Clausen [Mon, 4 Mar 2013 19:30:00 +0000 (19:30 +0000)]
iio:ad7923: Return error if we didn't get the expected result

Instead of leaving 'val' uninitialized return an error if the result's address
did not match that of the channel we were trying to read.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Patrick Vasseur <patrick.vasseur@c-s.fr>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agousing kfifo_in_spinlocked instead of separate code.
Ge Gao [Mon, 4 Mar 2013 23:27:00 +0000 (23:27 +0000)]
using kfifo_in_spinlocked instead of separate code.

Signed-off-by: Ge Gao <ggao@invensense.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: Kconfig: exynos_adc depends on CONFIG_OF
Naveen Krishna Chatradhi [Fri, 15 Mar 2013 16:23:00 +0000 (16:23 +0000)]
iio: adc: Kconfig: exynos_adc depends on CONFIG_OF

As the exynos_adc driver only supports device tree registration.
Making driver depend on CONFIG_OF solves possible errors during probe.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: events: Make iio_push_event() IRQ context save
Lars-Peter Clausen [Thu, 7 Mar 2013 19:53:00 +0000 (19:53 +0000)]
iio: events: Make iio_push_event() IRQ context save

Currently it is not save to call iio_push_event() from hard IRQ context since
the IIO event code uses spin_lock()/spin_unlock() and it is not save to mix
calls to spin_lock()/spin_unlock() from different contexts on the same lock.
E.g. if the lock is being held in iio_event_chrdev_read() and an interrupts
kicks in and the interrupt handler calls iio_push_event() we end uo with a
deadlock.

This patch updates iio_push_event() to use spin_lock_irqsave()/
spin_unlock_irqstrestore(), since it can be called from both IRQ and non-IRQ
context. All other other users of the lock, which are always run in non-IRQ
context, are updated to spin_lock_irq()/spin_unlock_irq().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:core drop info_mask from struct iio_info
Jonathan Cameron [Wed, 27 Feb 2013 19:43:52 +0000 (19:43 +0000)]
iio:core drop info_mask from struct iio_info

This has been replaced by the pair of masks info_mask_separate
and info_mask_shared_by_type.  Other variants may follow.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:adc:lpc32xx move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Mon, 4 Mar 2013 21:10:17 +0000 (21:10 +0000)]
staging:iio:adc:lpc32xx move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Roland Stigge <stigge@antcom.de>

11 years agostaging:iio:adc:mxs move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Mon, 4 Mar 2013 21:08:17 +0000 (21:08 +0000)]
staging:iio:adc:mxs move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Marek Vasut <marex@denx.de>
11 years agostaging:iio:adc:spear move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Mon, 4 Mar 2013 21:06:04 +0000 (21:06 +0000)]
staging:iio:adc:spear move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Stefan Roese <sr@denx.de>
11 years agoiio:adc:ad7923 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Sun, 3 Mar 2013 12:26:47 +0000 (12:26 +0000)]
iio:adc:ad7923 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
cc: Patrick Vasseur <patrick.vasseur@c-s.fr>
cc: Christophe Leroy <christophe.leroy@c-s.fr>

11 years agoiio:adc:exynos move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Sun, 3 Mar 2013 12:25:30 +0000 (12:25 +0000)]
iio:adc:exynos move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
11 years agostaging:iio:resolver:ad2s90 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:41:51 +0000 (19:41 +0000)]
staging:iio:resolver:ad2s90 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
11 years agostaging:iio:resolver:ad2s1210 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:41:30 +0000 (19:41 +0000)]
staging:iio:resolver:ad2s1210 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
11 years agostaging:iio:resolver:ad2s1200 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:41:20 +0000 (19:41 +0000)]
staging:iio:resolver:ad2s1200 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
11 years agostaging:iio:meter:ade7758 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:41:09 +0000 (19:41 +0000)]
staging:iio:meter:ade7758 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:magnetometer:hmc5843 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:40:58 +0000 (19:40 +0000)]
staging:iio:magnetometer:hmc5843 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Shubhrajyoti D <shubhrajyoti@ti.com>

11 years agostaging:iio:mag:ak8975 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:40:48 +0000 (19:40 +0000)]
staging:iio:mag:ak8975 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Andrew Chew <achew@nvidia.com>

11 years agostaging:iio:light:tsl2x7x move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:40:11 +0000 (19:40 +0000)]
staging:iio:light:tsl2x7x move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Jon Brenner <jon.brenner@ams.com>

11 years agostaging:iio:light:isl29028 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:39:52 +0000 (19:39 +0000)]
staging:iio:light:isl29028 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
11 years agostaging:iio:light:isl29018 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:39:40 +0000 (19:39 +0000)]
staging:iio:light:isl29018 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Rhyland Klein <rklein@nvidia.com>
11 years agostaging:iio:impedance:ad5933 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:39:28 +0000 (19:39 +0000)]
staging:iio:impedance:ad5933 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:gyro:adis16130 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:39:04 +0000 (19:39 +0000)]
staging:iio:gyro:adis16130 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:gyro:adis16060 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:38:43 +0000 (19:38 +0000)]
staging:iio:gyro:adis16060 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:cdc:ad7746 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:38:26 +0000 (19:38 +0000)]
staging:iio:cdc:ad7746 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:cdc:ad7152 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:38:12 +0000 (19:38 +0000)]
staging:iio:cdc:ad7152 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:cdc:ad7150 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:37:59 +0000 (19:37 +0000)]
staging:iio:cdc:ad7150 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:adc:ad799x move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:37:47 +0000 (19:37 +0000)]
staging:iio:adc:ad799x move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:adc:ad7606 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:37:28 +0000 (19:37 +0000)]
staging:iio:adc:ad7606 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:adc:ad7291 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:37:16 +0000 (19:37 +0000)]
staging:iio:adc:ad7291 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:adc:ad7280a move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:37:07 +0000 (19:37 +0000)]
staging:iio:adc:ad7280a move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:accel:sca3000 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:36:45 +0000 (19:36 +0000)]
staging:iio:accel:sca3000 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:accel:lis3l02dq move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:36:35 +0000 (19:36 +0000)]
staging:iio:accel:lis3l02dq move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:accel:adis16220 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:36:17 +0000 (19:36 +0000)]
staging:iio:accel:adis16220 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agostaging:iio:accel:adis move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:35:55 +0000 (19:35 +0000)]
staging:iio:accel:adis move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:light:vcnl4000 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:33:55 +0000 (19:33 +0000)]
iio:light:vcnl4000 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Peter Meerwald <pmeerw@pmeerw.net>

11 years agoiio:light:tsl2563 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:33:40 +0000 (19:33 +0000)]
iio:light:tsl2563 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Jon Brenner <jbrenner@taosinc.com>

11 years agoiio:light:lm3533 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:33:14 +0000 (19:33 +0000)]
iio:light:lm3533 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Johan Hovold <jhovold@gmail.com>

11 years agoiio:light:adjd_s311 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:33:01 +0000 (19:33 +0000)]
iio:light:adjd_s311 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Peter Meerwald <pmeerw@pmeerw.net>

11 years agoiio:imu:mpu6050 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:32:17 +0000 (19:32 +0000)]
iio:imu:mpu6050 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Ge Gao <ggao@invensense.com>

11 years agoiio:imu:adis16480 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:31:52 +0000 (19:31 +0000)]
iio:imu:adis16480 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:imu:adis16400 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:31:17 +0000 (19:31 +0000)]
iio:imu:adis16400 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:gyro:itg3200_core move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:30:36 +0000 (19:30 +0000)]
iio:gyro:itg3200_core move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>

11 years agoiio:gyro:adxrs450 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:30:18 +0000 (19:30 +0000)]
iio:gyro:adxrs450 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:gyro:adis16136 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:29:52 +0000 (19:29 +0000)]
iio:gyro:adis16136 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:gyro:adis16080 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:29:24 +0000 (19:29 +0000)]
iio:gyro:adis16080 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:freq:ad9523 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:28:57 +0000 (19:28 +0000)]
iio:freq:ad9523 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:mcp4725 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:28:38 +0000 (19:28 +0000)]
iio:dac:mcp4725 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Peter Meerwald <pmeerw@pmeerw.net>

11 years agoiio:dac:max517 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:28:22 +0000 (19:28 +0000)]
iio:dac:max517 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Roland Stigge <stigge@antcom.de>

11 years agoiio:dac:ad5791 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:28:12 +0000 (19:28 +0000)]
iio:dac:ad5791 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5764 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:28:00 +0000 (19:28 +0000)]
iio:dac:ad5764 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5755 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:27:50 +0000 (19:27 +0000)]
iio:dac:ad5755 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5686 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:27:41 +0000 (19:27 +0000)]
iio:dac:ad5686 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5624r move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:11:22 +0000 (19:11 +0000)]
iio:dac:ad5624r move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5504 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:11:04 +0000 (19:11 +0000)]
iio:dac:ad5504 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5449 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:10:50 +0000 (19:10 +0000)]
iio:dac:ad5449 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5446 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:10:35 +0000 (19:10 +0000)]
iio:dac:ad5446 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5421 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:10:22 +0000 (19:10 +0000)]
iio:dac:ad5421 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5380 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:09:55 +0000 (19:09 +0000)]
iio:dac:ad5380 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5360 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:08:52 +0000 (19:08 +0000)]
iio:dac:ad5360 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:dac:ad5064 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:08:37 +0000 (19:08 +0000)]
iio:dac:ad5064 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:amplifiers:ad8366 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:08:08 +0000 (19:08 +0000)]
iio:amplifiers:ad8366 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
11 years agoiio:adc:viperboard_adc move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:07:39 +0000 (19:07 +0000)]
iio:adc:viperboard_adc move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars Poeschel <poeschel@lemonage.de>

11 years agoiio:adc:ti_am335x_adc move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:07:18 +0000 (19:07 +0000)]
iio:adc:ti_am335x_adc move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Patil, Rachna <rachna@ti.com>

11 years agoiio:adc:ti-adc081 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:06:39 +0000 (19:06 +0000)]
iio:adc:ti-adc081 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
11 years agoiio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:06:24 +0000 (19:06 +0000)]
iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Milo(Woogyom) Kim <milo.kim@ti.com>

11 years agoiio:adc:at91_adc move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:06:10 +0000 (19:06 +0000)]
iio:adc:at91_adc move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 years agoiio:adc:ad7887 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:05:59 +0000 (19:05 +0000)]
iio:adc:ad7887 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:adc:ad7476 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:05:34 +0000 (19:05 +0000)]
iio:adc:ad7476 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:adc:ad7298 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:04:29 +0000 (19:04 +0000)]
iio:adc:ad7298 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:adc:ad7266 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:04:03 +0000 (19:04 +0000)]
iio:adc:ad7266 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:adc:ad_sigma_delta move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:42:39 +0000 (19:42 +0000)]
iio:adc:ad_sigma_delta move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:st_sensors move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:41:59 +0000 (19:41 +0000)]
iio:st_sensors move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
11 years agoiio:accel:kxsd9 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:03:36 +0000 (19:03 +0000)]
iio:accel:kxsd9 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:hid_sensors move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Wed, 27 Feb 2013 19:03:04 +0000 (19:03 +0000)]
iio:hid_sensors move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:dummy move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Tue, 19 Feb 2013 21:12:21 +0000 (21:12 +0000)]
staging:iio:dummy move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio:adc:max1363 move to info_mask_(shared_by_type/separate)
Jonathan Cameron [Tue, 19 Feb 2013 21:11:35 +0000 (21:11 +0000)]
iio:adc:max1363 move to info_mask_(shared_by_type/separate)

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Add broken out info_mask fields for shared_by_type and separate
Jonathan Cameron [Tue, 19 Feb 2013 21:10:30 +0000 (21:10 +0000)]
iio: Add broken out info_mask fields for shared_by_type and separate

This simplifies the code, removes an extensive layer of 'helper' macros
and gives us twice as much room to play with in these masks before we
have any need to be clever.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoiio: adc: add exynos adc driver under iio framwork
Naveen Krishna Chatradhi [Fri, 15 Feb 2013 06:56:00 +0000 (06:56 +0000)]
iio: adc: add exynos adc driver under iio framwork

This patch adds New driver to support:
1. Supports ADC IF found on EXYNOS4412/EXYNOS5250
   and future SoCs from Samsung
2. Add ADC driver under iio/adc framework
3. Also adds the Documentation for device tree bindings

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:common: Use spi_sync_transfer() in STMicroelectronics common library
Denis Ciocca [Sat, 9 Feb 2013 16:08:00 +0000 (16:08 +0000)]
iio:common: Use spi_sync_transfer() in STMicroelectronics common library

Use the new spi_sync_transfer() helper function instead of open-coding it.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoIIO ADC support for AD7923
Christophe Leroy [Wed, 13 Feb 2013 06:47:00 +0000 (06:47 +0000)]
IIO ADC support for AD7923

This patch adds support for Analog Devices AD7923 ADC in the IIO Subsystem.

Signed-off-by: Patrick Vasseur <patrick.vasseur@c-s.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Add OF support
Guenter Roeck [Thu, 7 Feb 2013 17:09:00 +0000 (17:09 +0000)]
iio: Add OF support

Provide bindings and parse OF data during initialization.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio: Remove adt7410 driver
Lars-Peter Clausen [Mon, 18 Feb 2013 13:38:00 +0000 (13:38 +0000)]
staging:iio: Remove adt7410 driver

The adt7410 hwmon driver is feature wise more or less on par with the IIO
driver. So we can finally remove the IIO driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: comedi: ni_labpc: fix common detach
Ian Abbott [Fri, 15 Mar 2013 13:39:52 +0000 (13:39 +0000)]
staging: comedi: ni_labpc: fix common detach

`labpc_common_detach()` calls `comedi_pci_disable()` unconditionally.
That's okay for PCI devices and harmless for ISA devices (as the
`hw_dev` member will be NULL so `comedi_to_pci_dev()` will return NULL
and `comedi_pci_disable()` checks for that), but it is disastrous for
PCMCIA devices.  Those are managed by the "ni_labpc_cs" module but it
calls this `labpc_common_detach()` and the `hw_dev` member will be
pointing to the `struct device` embedded in a `struct pcmcia_device` in
that case.  That's enough to confuse `comedi_pci_disable()` into
thinking it's a valid PCI device to be disabled.

Use the private board information (`thisboard`) to make sure it is a PCI
device before calling `comedi_pci_disable()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: remove unneeded settings of `dev->iobase`
Ian Abbott [Fri, 15 Mar 2013 13:15:36 +0000 (13:15 +0000)]
staging: comedi: remove unneeded settings of `dev->iobase`

Some PCI drivers use the "spare" `iobase` member of `struct
comedi_device` as a flag to indicate that the call to
`comedi_pci_enable()` was successful.  This is no longer necessary now
that `comedi_pci_enable()` and `comedi_pci_disable()` use the
`ioenabled` member of `struct comedi_device` themselves to keep track of
what needs to be done.

Remove the unnecessary assignments to the `iobase` member in the
relevant drivers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: add 'ioenabled' flag to device
Ian Abbott [Fri, 15 Mar 2013 13:15:35 +0000 (13:15 +0000)]
staging: comedi: add 'ioenabled' flag to device

Add 1-bit bit-field member `ioenabled` of type `bool` to `struct
comedi_device`.  Use this to keep track of whether a PCI device and its
BARs have been successfully enabled by `comedi_pci_enable()`.  This
avoids overloading the meaning of the `iobase` member which is used by
several drivers to hold the base port I/O address of a board's "main"
registers.  Other drivers using MMIO use `iobase` as a flag to indicate
that the preceding call to `comedi_pci_enable()` was successful.  They
no longer need to do that.

The name `ioenabled` is intended to be PCI-agnostic so it can be used
for similar purposes by non-PCI drivers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: make 'in_request_module' a bool bit-field
Ian Abbott [Fri, 15 Mar 2013 13:15:34 +0000 (13:15 +0000)]
staging: comedi: make 'in_request_module' a bool bit-field

Change the `in_request_module` member of `struct comedi_device` to a
1-bit bit-field of type `bool` and move it into a suitable hole in the
data type to save a few bytes.  Change the assigned values to `true` and
`false`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: make 'dev->attached' a bool bit-field
Ian Abbott [Fri, 15 Mar 2013 13:15:33 +0000 (13:15 +0000)]
staging: comedi: make 'dev->attached' a bool bit-field

Change the `attached` member of `struct comedi_device` to a 1-bit
bit-field of type `bool`.  Change assigned values to `true` and `false`
and replace or remove comparison operations with simple boolean tests.

We'll put some extra bit-fields in the gap later to save space.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_660x: support NI PXI-6624
Ian Abbott [Fri, 15 Mar 2013 11:16:36 +0000 (11:16 +0000)]
staging: comedi: ni_660x: support NI PXI-6624

Florent Boudet reports success using a NI PXI-6624 board with a
trivially modified version of the "ni_660x" driver (addition to the PCI
device ID table and comedi board table).  He did this with the
out-of-tree Comedi drivers at www.comedi.org, but it applies equally to
the in-tree "staging" drivers.

He reports the PXI-6624 is basically the same as the PXI-6602, but with
isolated channels and external voltage source.

Add support for NI PXI-6224 to the "ni_660x" driver.

(Maybe the driver should be renamed to "ni_66xx"?)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Florent Boudet <flboudet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_660x: reformat driver description comment
Ian Abbott [Fri, 15 Mar 2013 11:16:35 +0000 (11:16 +0000)]
staging: comedi: ni_660x: reformat driver description comment

Convert to preferred block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adv_pci_dio: restore PCI-1753E support
Ian Abbott [Fri, 15 Mar 2013 10:32:12 +0000 (10:32 +0000)]
staging: comedi: adv_pci_dio: restore PCI-1753E support

Back in the old days (before "staging") when Comedi only supported
manual configuration of devices, the "adv_pci_dio" driver supported both
PCI-1753 ("pci1753") and PCI-1753E ("pci1753e").  In actual fact,
"pci1753e" is just a PCI-1753 connected by a ribbon cable to a PCI-1753E
expansion card, which is plugged into a PCI slot but is not a PCI device
itself.  Now that the "adv_pci_dio" driver only supports automatic
configuration of devices and the main "comedi" module no longer allows
auto-configuration to be disabled, a PCI-1753 with a PCI-1753E expansion
card is always treated as an unexpanded PCI-1753 ("pci1753") and there
is no way to override it.  (Recently, an undefined macro
`USE_PCI1753E_BOARDINFO` was used to make the driver switch to
supporting "pci1753e" instead of "pci1753", but this is less than
ideal.)

Advantech has their own Linux (non-Comedi) driver for the PCI-1753 which
detects whether the PCI-1753E expansion card is connected to the
PCI-1753 by fiddling with a register at offset 53 from the main
registers base.

Use Advantech's test in our "adv_pci_dio" driver.  If the board appears
to be a PCI-1753 ("pci1753"), check if the expansion card appears to be
present, and if so, treat the device as a PCI-1753 plus PCI-1753E
expansion card ("pci1753e").

Also, get rid of `enum dio_boardid` (`BOARD_...` enum values) which was
added recently and just use the older `TYPE_...` enum values from `enum
hw_cards_id` instead as the mapping is now 1-to-1.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_atmio: fix build error due to missing '; '
H Hartley Sweeten [Thu, 14 Mar 2013 20:33:24 +0000 (13:33 -0700)]
staging: comedi: ni_atmio: fix build error due to missing '; '

Fix a build error due to a missing ';' at the end of a line.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Geert Uytterhoeven <geert.uytterhoeven@gmail.com>
Cc: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: dwc2: remove a kfree(NULL)
Dan Carpenter [Fri, 15 Mar 2013 06:03:31 +0000 (09:03 +0300)]
Staging: dwc2: remove a kfree(NULL)

dwc2_hcd_release() calls dwc2_hcd_free() which frees ->core_params
and sets it to NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: sep: fix possible memory leak in sep_prepare_input_dma_table()
Wei Yongjun [Fri, 15 Mar 2013 09:20:08 +0000 (17:20 +0800)]
staging: sep: fix possible memory leak in sep_prepare_input_dma_table()

'lli_array_ptr' etc. are malloced in sep_prepare_input_dma_table() and should
be freed before leaving from the error handling case, otherwise it will cause
memory leak.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add documentation for omap_bandgap_validate
Eduardo Valentin [Fri, 15 Mar 2013 13:00:38 +0000 (09:00 -0400)]
staging: omap-thermal: add documentation for omap_bandgap_validate

Document the helper to validate a struct omap_bandgap and a sensor id.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: remove TODO entry for exposed APIs
Eduardo Valentin [Fri, 15 Mar 2013 13:00:37 +0000 (09:00 -0400)]
staging: omap-thermal: remove TODO entry for exposed APIs

Not all APIs exposed today are used. However all unused APIs
will be required once the thermal layer allows IRQ based
policies.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: remove TODO entry suggesting regmap usage
Eduardo Valentin [Fri, 15 Mar 2013 13:00:36 +0000 (09:00 -0400)]
staging: omap-thermal: remove TODO entry suggesting regmap usage

It is hard to use regmap because benefit of using regmap cache
may not be applicable as there is a specific sequence to
restore the bandgap context.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>