openwrt/staging/blogic.git
11 years agoRevert "iio: add configuration option for debug support"
Greg Kroah-Hartman [Mon, 5 Aug 2013 06:21:10 +0000 (14:21 +0800)]
Revert "iio: add configuration option for debug support"

This reverts commit 98a5e9e99d05e9b6a14778b85631b55e8e349990.

IIO, like the rest of the kernel, should rely on dynamic debugging, not
have a special config option for it.  That way, no user has to rebuild
their kernel to have debug messages, which is a good thing, let's not
revert back to the bad old days of the 2000's.

Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge tag 'iio-for-3.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Mon, 5 Aug 2013 06:14:26 +0000 (14:14 +0800)]
Merge tag 'iio-for-3.12a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of new IIO drivers, features and cleanups for the 3.12 cycle.

There has been a lot of good work going into IIO recently, some of which
missed this pull request purely because I haven't caught up with all my
emails.

Core changes

1) Introduction of devm_iio_device_alloc/free and conversions of lots of
   drivers (37 + patches so far mostly from Sachin)
2) A Kconfig option to enabled some debug logging subsystem wide.

New drivers

1) Nuvoton NAU7802 adc driver
2) Avago APDS9300 ambient light sensor driver.

Staging graduations
1) ADIS16260 gyroscope (after a lot fo cleaning up from Lars-Peter)

New driver features

1) ST-sensors gain control of which pin is used for dataready.
2) mcp4725 gains eeprom saving (a later fix deals with a wrong return type
   bug in that patch)
3) A number of drivers have gained module alias' to aid autoloading.

Cleanups and minor bug fixes.

1) A number of typos in Kconfig comments
2) Drop remaining mentions of ring buffers (now just buffers)
3) Overrestrictive i2c function checking in the invensense mpu6050 driver
4) Some help text clarifications.
5) store_eeprom is now used in several drivers so move to generic abi docs.
6) Update dac power down options.
7) Add some error handlign to mxs-lradc on stmp_reset_block call.
8) Lars fixed the alphabetical order in various files and added comments
   to try and prevent them getting messed up again.
9) Dropped some remaining 'reset' attributes for drivers.  We have never
   seen a reason why these should be available.  Finally the macro
   used to define many of these has gone.
10) lps331ap gets an easier to check temperature scale implementation.
11) Various cleanups for the hmc5843 from Peter with a view to getting
    it ready for a staging graduation.

Quite a few other little typo fixes etc.

11 years agostaging:iio:hmc5843: Use i2c_smbus_read_word_swapped()
Peter Meerwald [Sat, 27 Jul 2013 15:31:00 +0000 (16:31 +0100)]
staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Drop unneeded #includes
Peter Meerwald [Sat, 27 Jul 2013 15:31:00 +0000 (16:31 +0100)]
staging:iio:hmc5843: Drop unneeded #includes

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Device has 3 channels, no need to store separately
Peter Meerwald [Sat, 27 Jul 2013 15:31:00 +0000 (16:31 +0100)]
staging:iio:hmc5843: Device has 3 channels, no need to store separately

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: 'add' is a poor abbreviation for address
Peter Meerwald [Sat, 27 Jul 2013 15:31:00 +0000 (16:31 +0100)]
staging:iio:hmc5843: 'add' is a poor abbreviation for address

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Implement timeout in read function
Peter Meerwald [Sat, 27 Jul 2013 15:31:00 +0000 (16:31 +0100)]
staging:iio:hmc5843: Implement timeout in read function

avoid polling data ready bit forever; msleep() may be too long
for high sampling frequencies but the driver interface does not
support buffering

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Remove id register #defines, not used anymore
Peter Meerwald [Sat, 27 Jul 2013 15:31:00 +0000 (16:31 +0100)]
staging:iio:hmc5843: Remove id register #defines, not used anymore

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:hmc5843: Drop I2C detection code
Peter Meerwald [Sat, 27 Jul 2013 15:31:00 +0000 (16:31 +0100)]
staging:iio:hmc5843: Drop I2C detection code

I2C is generally not probed for devices other than those commonly found
on architectures where device treeor board files are not used.  Note also
that this implementation does not fill in the name field of the
i2c_board_info structure as the documentation states it must.  Hence
it is unlikely anyone is actually using it.

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: lustre: remove proc_dir_entry_t typedef
Greg Kroah-Hartman [Sun, 4 Aug 2013 01:10:48 +0000 (09:10 +0800)]
staging: lustre: remove proc_dir_entry_t typedef

Use struct proc_dir_entry like the rest of the kernel does.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove strange journal macros into the one file using them
Greg Kroah-Hartman [Sun, 4 Aug 2013 01:03:03 +0000 (09:03 +0800)]
staging: lustre: remove strange journal macros into the one file using them

This moves the PUSH_JOURNAL and friend macros into debug.c, as that's
the only place they are used, so why are they even a macro?

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove task_t typedef
Greg Kroah-Hartman [Sun, 4 Aug 2013 00:56:42 +0000 (08:56 +0800)]
staging: lustre: remove task_t typedef

Use struct task_struct instead.

Also remove the unused libcfs_current() function, while I noticed it
doing this conversion.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove cfs_task_state_t
Greg Kroah-Hartman [Sun, 4 Aug 2013 00:48:26 +0000 (08:48 +0800)]
staging: lustre: remove cfs_task_state_t

It's just a long, so remove the typedef and use long.

Side note, all the functions like waitq_* should be removed as well,
they are wrapping functions that don't really do what it seems that they
do based on their name.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove CFS_DECL_WAITQ() macro
Greg Kroah-Hartman [Sun, 4 Aug 2013 00:39:49 +0000 (08:39 +0800)]
staging: lustre: remove CFS_DECL_WAITQ() macro

Just use DECLARE_WAIT_QUEUE_HEAD() instead.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove timer_list_t typedef
Greg Kroah-Hartman [Sun, 4 Aug 2013 00:35:40 +0000 (08:35 +0800)]
staging: lustre: remove timer_list_t typedef

Use struct timer_list instead.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove unused cfs_ waitqueue wrappers
Greg Kroah-Hartman [Sun, 4 Aug 2013 00:20:58 +0000 (08:20 +0800)]
staging: lustre: remove unused cfs_ waitqueue wrappers

These weren't ever used, so just remove them.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove cfs_module() macro
Greg Kroah-Hartman [Sun, 4 Aug 2013 00:16:25 +0000 (08:16 +0800)]
staging: lustre: remove cfs_module() macro

Open code the module_init/module_exit lines, and also use
MODULE_VERSION, as it seems that was intended, but just never hooked up
at all.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove wrappers for two atomic functions
Greg Kroah-Hartman [Sun, 4 Aug 2013 00:03:39 +0000 (08:03 +0800)]
staging: lustre: remove wrappers for two atomic functions

Just call them directly, like the rest of the kernel does.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove typedef for group_info_t
Greg Kroah-Hartman [Sat, 3 Aug 2013 23:59:19 +0000 (07:59 +0800)]
staging: lustre: remove typedef for group_info_t

Use "struct group_info" like the rest of the kernel, not a typedef.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove typedef for module_t
Greg Kroah-Hartman [Sat, 3 Aug 2013 23:48:41 +0000 (07:48 +0800)]
staging: lustre: remove typedef for module_t

Use "struct module" like the rest of the kernel, not a typedef.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove unused cfs_"symbol" macros
Greg Kroah-Hartman [Sat, 3 Aug 2013 23:42:22 +0000 (07:42 +0800)]
staging: lustre: remove unused cfs_"symbol" macros

These aren't used, so remove them.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: remove cfs_for_each_possible_cpu()
Greg Kroah-Hartman [Sat, 3 Aug 2013 23:36:31 +0000 (07:36 +0800)]
staging: lustre: remove cfs_for_each_possible_cpu()

It was just a wrapper around for_each_possible_cpu()

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoiio: Fix documentation of devm_iio_device_free()
Peter Meerwald [Mon, 29 Jul 2013 21:35:00 +0000 (22:35 +0100)]
iio: Fix documentation of devm_iio_device_free()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:mcp4725: Use devm_iio_device_alloc
Peter Meerwald [Mon, 29 Jul 2013 22:18:00 +0000 (23:18 +0100)]
iio:mcp4725: Use devm_iio_device_alloc

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:vcnl4000: Use devm_iio_device_alloc
Peter Meerwald [Mon, 29 Jul 2013 22:18:00 +0000 (23:18 +0100)]
iio:vcnl4000: Use devm_iio_device_alloc

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:adjd_s311: Use devm_iio_device_alloc
Peter Meerwald [Mon, 29 Jul 2013 22:18:00 +0000 (23:18 +0100)]
iio:adjd_s311: Use devm_iio_device_alloc

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: pressure: st_pressure: Use devm_iio_device_alloc
Sachin Kamat [Tue, 30 Jul 2013 06:24:00 +0000 (07:24 +0100)]
iio: pressure: st_pressure: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: frequency: ad9523: Use devm_* APIs
Sachin Kamat [Tue, 30 Jul 2013 06:24:00 +0000 (07:24 +0100)]
iio: frequency: ad9523: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: amplifiers: ad8366: Use devm_* APIs
Sachin Kamat [Tue, 30 Jul 2013 06:24:00 +0000 (07:24 +0100)]
iio: amplifiers: ad8366: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: lps331ap: Modify in_temp_scale calculation way
Jacek Anaszewski [Tue, 2 Jul 2013 10:13:00 +0000 (11:13 +0100)]
iio: lps331ap: Modify in_temp_scale calculation way

This patch modifies the way how the in_temp_scale output value is
calculated. With this implementation it is more clear how the value
is obtained.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: light: tsl2563: Use devm_* APIs
Sachin Kamat [Tue, 30 Jul 2013 08:44:00 +0000 (09:44 +0100)]
iio: light: tsl2563: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: light: lm3533-als: Use devm_iio_device_alloc
Sachin Kamat [Tue, 30 Jul 2013 08:44:00 +0000 (09:44 +0100)]
iio: light: lm3533-als: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: light: hid-sensor-als: Use devm_iio_device_alloc
Sachin Kamat [Tue, 30 Jul 2013 08:44:00 +0000 (09:44 +0100)]
iio: light: hid-sensor-als: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: imu: inv_mpu6050: Use devm_iio_device_alloc
Sachin Kamat [Tue, 30 Jul 2013 08:44:00 +0000 (09:44 +0100)]
iio: imu: inv_mpu6050: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler. While at
it include missing iio.h header file and do some cleanup.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: imu: adis16480: Use devm_iio_device_alloc
Sachin Kamat [Tue, 30 Jul 2013 08:44:00 +0000 (09:44 +0100)]
iio: imu: adis16480: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: imu: adis16400: Use devm_iio_device_alloc
Sachin Kamat [Tue, 30 Jul 2013 08:44:00 +0000 (09:44 +0100)]
iio: imu: adis16400: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: magnetometer: st_magn: Use devm_iio_device_alloc
Sachin Kamat [Fri, 2 Aug 2013 10:08:00 +0000 (11:08 +0100)]
iio: magnetometer: st_magn: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: magnetometer: hid-sensor-magn-3d: Use devm_iio_device_alloc
Sachin Kamat [Fri, 2 Aug 2013 10:08:00 +0000 (11:08 +0100)]
iio: magnetometer: hid-sensor-magn-3d: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Move out of staging
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Move out of staging

The drivers is in more or less good shape, conforms to the IIO ABI and none of
the default static code checker report any problems, so move it out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Remove sampling_frequency_available attribute
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Remove sampling_frequency_available attribute

The values presented here are completely bogus. Also ..._available attributes
are supposed to be used for properties that only support discrete sets of
values, but we accept continuous values and will round to the next supported
frequency.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Add proper range checks to write_frequency()
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Add proper range checks to write_frequency()

A negative sampling frequency is obviously invalid, so use kstrtouint() instead
of strict_strtoul. Also when setting a sampling frequency smaller than the
minimum supported frequency set the frequency to the minimum supported frequency
instead of just cutting off the upper bits of the raw register value.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Remove unused includes
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Remove unused includes

Remove some unused includes from the driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Add scale for the inclination channel
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Add scale for the inclination channel

While the inclination channel claims to support reading the scale the driver did
not implement this, so trying to read the scale results in a -EINVAL. This patch
fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Remove 'SPS' suffix from samplerate attribute
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Remove 'SPS' suffix from samplerate attribute

This is not part of the ABI.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Fix minor style issue
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Fix minor style issue

Delete some extra whitespace.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Simplify calibscale and caliboffset reading
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Simplify calibscale and caliboffset reading

All channels for this device have the same number of bits for calibscale and
caliboffset, there is no need to determine it dynamically based on the channel
type. Also there is no locking required since adis_read_reg_16() will take care
of proper locking on its own.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Use sign_extend32() instead of open-coding it
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Use sign_extend32() instead of open-coding it

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Add value range check for calibscale/-bias
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Add value range check for calibscale/-bias

Instead of just cutting of the upper bits of the value make sure that the value
is in the valid range and return an error if it is not.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Remove separate header
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Remove separate header

The header is only used by a single C file, just put the register defines
directly into that C file and remove the header.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Don't set default scan mask
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Don't set default scan mask

The recomentation for IIO driver is to leave all scan elements off by default
and let userspace decide which channels need to be enabled.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Remove support for orientation mapping
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Remove support for orientation mapping

The adis16260 driver implements a unique feature in that it allows to change the
orientation of the gyroscope channel by specifying the orientation in platform
data. This feature is as far as I can see unused though and makes the driver
unnecessarily complex. So this patch removes the support for it. If it turns
out we need this, the cleanest approach to implement it is by adding support for
orientation mapping inside the IIO core so it is available to all drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Drop unused 'negate' property
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Drop unused 'negate' property

Remove the unused 'negate' property from the driver state struct. This also
means we can now use the adis struct directly as the driver data.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16260: Fix reading calibscale
Lars-Peter Clausen [Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)]
staging:iio:adis16260: Fix reading calibscale

Return the actual value read from the device and not just the mask.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: core: Avoid double minus in sysfs output
Oleksandr Kravchenko [Mon, 22 Jul 2013 11:16:00 +0000 (12:16 +0100)]
iio: core: Avoid double minus in sysfs output

This patch fixes the issue with double minus in output when
reading channels from sysfs for IIO_VAL_INT_PLUS_MICRO and
IIO_VAL_INT_PLUS_NANO cases. Until this patch if val and val2
both are negatives output string contains "--" before
digits. It is result of "-%d..." in sprintf() format.

Signed-off-by: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: Update ti_am335x_adc Kconfig entry
Sachin Kamat [Tue, 23 Jul 2013 08:46:00 +0000 (09:46 +0100)]
iio: adc: Update ti_am335x_adc Kconfig entry

Make the string more readable to distinguish it from other TI ADCs.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ti_am335x_adc: Use devm_iio_device_alloc
Sachin Kamat [Tue, 23 Jul 2013 08:46:00 +0000 (09:46 +0100)]
iio: adc: ti_am335x_adc: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Rachna Patil <rachna@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoDocumentation: devres: add IIO device alloc/free functions to list
Oleksandr Kravchenko [Tue, 23 Jul 2013 08:39:00 +0000 (09:39 +0100)]
Documentation: devres: add IIO device alloc/free functions to list

Add devm_iio_device_alloc() and devm_iio_device_free() functions
to list of supported calls.

Signed-off-by: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: accel: st_accel: Use devm_iio_device_alloc
Sachin Kamat [Tue, 23 Jul 2013 06:47:00 +0000 (07:47 +0100)]
iio: accel: st_accel: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: accel: kxsd9: Use devm_iio_device_alloc
Sachin Kamat [Tue, 23 Jul 2013 06:47:00 +0000 (07:47 +0100)]
iio: accel: kxsd9: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: hid-sensor-accel-3d: Use devm_iio_device_alloc
Sachin Kamat [Tue, 23 Jul 2013 06:47:00 +0000 (07:47 +0100)]
iio: hid-sensor-accel-3d: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: iio: light: isl29028: Use devm_iio_device_alloc
Sachin Kamat [Mon, 22 Jul 2013 11:03:00 +0000 (12:03 +0100)]
staging: iio: light: isl29028: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: iio: light: isl29018: Use devm_iio_device_alloc
Sachin Kamat [Mon, 22 Jul 2013 11:03:00 +0000 (12:03 +0100)]
staging: iio: light: isl29018: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: iio: spear_adc: Use devm_iio_device_alloc
Sachin Kamat [Mon, 22 Jul 2013 11:02:00 +0000 (12:02 +0100)]
staging: iio: spear_adc: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Stefan Roese <sr@denx.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging: iio: mxs-lradc: Use devm_iio_device_alloc
Sachin Kamat [Mon, 22 Jul 2013 11:02:00 +0000 (12:02 +0100)]
staging: iio: mxs-lradc: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: frequency: adf4350: Use devm_* APIs
Sachin Kamat [Mon, 22 Jul 2013 11:02:00 +0000 (12:02 +0100)]
iio: frequency: adf4350: Use devm_* APIs

devm_* APIs are device managed and make code simpler.
This also takes care of missing clk_put function calls implicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: max1363: Use devm_iio_device_alloc
Sachin Kamat [Mon, 22 Jul 2013 11:02:00 +0000 (12:02 +0100)]
iio: max1363: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: exynos_adc: Use devm_iio_device_alloc
Sachin Kamat [Mon, 22 Jul 2013 11:02:00 +0000 (12:02 +0100)]
iio: exynos_adc: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: at91: Use devm_iio_device_alloc
Sachin Kamat [Mon, 22 Jul 2013 11:02:00 +0000 (12:02 +0100)]
iio: at91: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: viperboard_adc: Use devm_iio_device_alloc
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: viperboard_adc: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ti-adc081c: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: ti-adc081c: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: nau7802: Use devm_iio_device_alloc
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: nau7802: Use devm_iio_device_alloc

Using devm_iio_device_alloc makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: mcp320x: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: mcp320x: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Oskar Andero <oskar.andero@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: lp8788_adc: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: lp8788_adc: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Milo Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ad7923: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: ad7923: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ad7887: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: ad7887: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ad7793: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: ad7793: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ad7791: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: ad7791: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ad7476: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: ad7476: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ad7298: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 08:58:00 +0000 (09:58 +0100)]
iio: adc: ad7298: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: adc: ad7266: Use devm_* APIs
Sachin Kamat [Tue, 23 Jul 2013 06:50:00 +0000 (07:50 +0100)]
iio: adc: ad7266: Use devm_* APIs

devm_* APIs are device managed and make code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: add APDS9300 ambilent light sensor driver
Oleksandr Kravchenko [Mon, 22 Jul 2013 13:11:00 +0000 (14:11 +0100)]
iio: add APDS9300 ambilent light sensor driver

This patch adds IIO driver for APDS9300 ambient light sensor (ALS).
http://www.avagotech.com/docs/AV02-1077EN

The driver allows to read raw data from ADC registers or calculate
lux value. It also can handle threshold interrupt.

Signed-off-by: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoof: Add Avago Technologies vendor prefix
Oleksandr Kravchenko [Mon, 22 Jul 2013 13:11:00 +0000 (14:11 +0100)]
of: Add Avago Technologies vendor prefix

This commit adds a device tree vendor prefix for Avago Technologies.

Signed-off-by: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: core: implement devm_iio_device_alloc/devm_iio_device_free
Grygorii Strashko [Thu, 18 Jul 2013 10:19:00 +0000 (11:19 +0100)]
iio: core: implement devm_iio_device_alloc/devm_iio_device_free

Add a resource managed devm_iio_device_alloc()/devm_iio_device_free()
to automatically clean up any allocations made by IIO drivers,
thus leading to simplified IIO drivers code.

In addition, this will allow IIO drivers to use other devm_*() API
(like devm_request_irq) and don't care about the race between
iio_device_free() and the release of resources by Device core
during driver removing.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Tested-by: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Remove IIO_DEV_ATTR_RESET macro
Lars-Peter Clausen [Tue, 16 Jul 2013 15:08:00 +0000 (16:08 +0100)]
iio: Remove IIO_DEV_ATTR_RESET macro

There are no users of this macro left and we have come to the conclusion that it
is not a good idea to expose the raw chip reset to userspace so the macro is
very unlikely to be used in new drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ade7xxx: Don't expose the chip reset to userspace
Lars-Peter Clausen [Tue, 16 Jul 2013 15:08:00 +0000 (16:08 +0100)]
staging:iio:ade7xxx: Don't expose the chip reset to userspace

There is no reason why userspace should want to trigger a manual reset of the
device, so remove this functionality.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adt7316: Don't expose the chip reset to userspace
Lars-Peter Clausen [Tue, 16 Jul 2013 15:08:00 +0000 (16:08 +0100)]
staging:iio:adt7316: Don't expose the chip reset to userspace

There is no reason why userspace should want to trigger a manual reset of the
device, so remove this functionality.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad2s1210: Don't expose the chip reset to userspace
Lars-Peter Clausen [Tue, 16 Jul 2013 15:08:00 +0000 (16:08 +0100)]
staging:iio:ad2s1210: Don't expose the chip reset to userspace

There is no reason why userspace should want to trigger a manual reset of the
device, so remove this functionality.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: add configuration option for debug support
Otavio Salvador [Tue, 16 Jul 2013 12:56:00 +0000 (13:56 +0100)]
iio: add configuration option for debug support

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Add a comment to about alphabetical order to Kconfigs and Makefiles
Lars-Peter Clausen [Mon, 15 Jul 2013 07:45:00 +0000 (08:45 +0100)]
iio: Add a comment to about alphabetical order to Kconfigs and Makefiles

Keeping Makefile and Kconfig entries in alphabetical order usually works better
than just appending new entries at the end, since it reduces the amount of
conflicts. This patch adds a comment to the IIO Kconfig and Makefile files to
document that the entries should be kept in alphabetical order.

Also reorder those  entries which weren't in alphabetical order yet.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:dac:mcp4725 wrong return type of attribute _show function
Jonathan Cameron [Fri, 12 Jul 2013 19:54:00 +0000 (20:54 +0100)]
iio:dac:mcp4725 wrong return type of attribute _show function

Should be ssize_t and is int.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reported-by: Fengguan Wu <fengguang.wu@intel.com>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
11 years agoiio: hid-sensor-magn-3d: add module alias for autoload
Alexander Holler [Wed, 10 Jul 2013 08:32:00 +0000 (09:32 +0100)]
iio: hid-sensor-magn-3d: add module alias for autoload

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically
load the driver.

This makes it also possible to use the usual driver name instead of
HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by:Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: hid-sensor-als: add module alias for autoload
Alexander Holler [Wed, 10 Jul 2013 08:31:00 +0000 (09:31 +0100)]
iio: hid-sensor-als: add module alias for autoload

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically
load the driver.

This makes it also possible to use the usual driver name instead of
HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by:Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: hid-sensor-gyro-3d: add module alias for autoload
Alexander Holler [Wed, 10 Jul 2013 08:31:00 +0000 (09:31 +0100)]
iio: hid-sensor-gyro-3d: add module alias for autoload

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically
load the driver.

This makes it also possible to use the usual driver name instead of
HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by:Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: hid-sensor-accel-3d: add module alias for autoload
Alexander Holler [Wed, 10 Jul 2013 08:31:00 +0000 (09:31 +0100)]
iio: hid-sensor-accel-3d: add module alias for autoload

Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically
load the driver.

This makes it also possible to use the usual driver name instead of
HID-SENSOR-2000xx which isn't very descriptive in kernel messages.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by:Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: mxs-lradc: Check the return value from stmp_reset_block()
Fabio Estevam [Wed, 10 Jul 2013 02:36:00 +0000 (03:36 +0100)]
iio: mxs-lradc: Check the return value from stmp_reset_block()

stmp_reset_block() may fail, so let's check its return value and propagate it in
the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: fix semicolon in io_core_trigger.h
Peter Meerwald [Sun, 7 Jul 2013 20:24:00 +0000 (21:24 +0100)]
iio: fix semicolon in io_core_trigger.h

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: staging: fix typo in ade758_ring.c
Peter Meerwald [Sun, 7 Jul 2013 20:24:00 +0000 (21:24 +0100)]
iio: staging: fix typo in ade758_ring.c

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: fix typo, Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
Peter Meerwald [Sun, 7 Jul 2013 20:24:00 +0000 (21:24 +0100)]
iio: fix typo, Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: staging: fix device.txt documentation
Peter Meerwald [Sun, 7 Jul 2013 20:24:00 +0000 (21:24 +0100)]
iio: staging: fix device.txt documentation

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: Add Nuvoton NAU7802 ADC driver
Alexandre Belloni [Mon, 24 Jun 2013 17:24:00 +0000 (18:24 +0100)]
iio: Add Nuvoton NAU7802 ADC driver

The Nuvoton NAU7802 ADC is a 24-bit 2-channels I2C ADC, with adjustable
gain and sampling rates.

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>