summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-08-04staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()iio-for-3.12aPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-04staging:iio:hmc5843: Drop unneeded #includesPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-04staging:iio:hmc5843: Device has 3 channels, no need to store separatelyPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-04staging:iio:hmc5843: 'add' is a poor abbreviation for addressPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-04staging:iio:hmc5843: Implement timeout in read functionPeter Meerwald
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>
2013-08-04staging:iio:hmc5843: Remove id register #defines, not used anymorePeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-04staging:iio:hmc5843: Drop I2C detection codePeter Meerwald
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>
2013-08-03iio: Fix documentation of devm_iio_device_free()Peter Meerwald
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>
2013-08-03iio:mcp4725: Use devm_iio_device_allocPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio:vcnl4000: Use devm_iio_device_allocPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio:adjd_s311: Use devm_iio_device_allocPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio: pressure: st_pressure: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: frequency: ad9523: Use devm_* APIsSachin Kamat
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>
2013-08-03iio: amplifiers: ad8366: Use devm_* APIsSachin Kamat
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>
2013-08-03iio: lps331ap: Modify in_temp_scale calculation wayJacek Anaszewski
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>
2013-08-03iio: light: tsl2563: Use devm_* APIsSachin Kamat
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>
2013-08-03iio: light: lm3533-als: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: light: hid-sensor-als: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: imu: inv_mpu6050: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: imu: adis16480: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: imu: adis16400: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: magnetometer: st_magn: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: magnetometer: hid-sensor-magn-3d: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03staging:iio:adis16260: Move out of stagingLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Remove sampling_frequency_available attributeLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Add proper range checks to write_frequency()Lars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Remove unused includesLars-Peter Clausen
Remove some unused includes from the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03staging:iio:adis16260: Add scale for the inclination channelLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Remove 'SPS' suffix from samplerate attributeLars-Peter Clausen
This is not part of the ABI. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03staging:iio:adis16260: Fix minor style issueLars-Peter Clausen
Delete some extra whitespace. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03staging:iio:adis16260: Simplify calibscale and caliboffset readingLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Use sign_extend32() instead of open-coding itLars-Peter Clausen
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03staging:iio:adis16260: Add value range check for calibscale/-biasLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Remove separate headerLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Don't set default scan maskLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Remove support for orientation mappingLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Drop unused 'negate' propertyLars-Peter Clausen
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>
2013-08-03staging:iio:adis16260: Fix reading calibscaleLars-Peter Clausen
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>
2013-08-03iio: core: Avoid double minus in sysfs outputOleksandr Kravchenko
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>
2013-08-03iio: adc: Update ti_am335x_adc Kconfig entrySachin Kamat
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>
2013-08-03iio: adc: ti_am335x_adc: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03Documentation: devres: add IIO device alloc/free functions to listOleksandr Kravchenko
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>
2013-08-03iio: accel: st_accel: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: accel: kxsd9: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: hid-sensor-accel-3d: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03staging: iio: light: isl29028: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03staging: iio: light: isl29018: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03staging: iio: spear_adc: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03staging: iio: mxs-lradc: Use devm_iio_device_allocSachin Kamat
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>
2013-08-03iio: frequency: adf4350: Use devm_* APIsSachin Kamat
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>