aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-07-05iio: hid-sensor-press: Fix return valuesSachin Kamat1-5/+2
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored the actual return values (which could be -EINVAL) and instead returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO upon success. Agreed with by Srinivas. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-03iio: xilinx-xadc: Remove unused variableSachin Kamat1-6/+0
'offset’ is not used in the function. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-03iio: ad5686: Remove redundant variableSachin Kamat1-2/+1
‘regdone’ is not used in the function. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-03iio: ad5504: Remove redundant variableSachin Kamat1-4/+1
By re-arranging the code, 'ret' can be removed from this function. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-03iio: ad5624r_spi: Remove redundant variableSachin Kamat1-4/+1
By re-arranging the code, 'ret' can be removed from this function. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-03iio: adis16400: Remove unused variableSachin Kamat1-2/+1
'rx' is not used in this function. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-29Merge tag 'iio-for-3.17b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman9-58/+774
Jonathan writes: Second round of new drivers and cleanups for IIO in the 3.17 cycle. New drivers * mcp4902, mcp4912 and mcp4922 SPI DAC driver. * max1027, max1029 and max1031 SPI ADC driver. Cleanups * cm32181 - use devm APIs to simplify error paths. * ak8975 - use devm APIs to simplify error paths. * ad9850 - drop some unused defines and an unnecessary goto. * hmc5843 - add missing devices to the device id table and the documentation. * ad9832 - small formatting cleanups. * sca3000 - hide direct use of the stufftoread element by adding a data_available function. This is a precursor for the addition of buffer watermarks to the subsystem but stands as a good cleanup on its own.
2014-06-29iio: staging: sca3000: hide stufftoread logicJosselin Costanzi1-4/+1
Change sca3000_ring implementation so that it exports a data_available function to iio. Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-29iio: magnetometer: ak8975: Use devm_* APIsBeomho Seo1-44/+14
This patch use devm_* APIs make driver simpler. Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-28iio: add support of the max1027Philippe Reynes3-0/+531
This driver add partial support of the maxim 1027/1029/1031. Differential mode is not supported. It was tested on armadeus apf27 board. Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-22Merge 3.16-rc2 into staging-nextGreg Kroah-Hartman6-21/+18
We want the staging fixes here as well.
2014-06-21iio: light: cm32181: Use devm_* APIsBeomho Seo1-10/+1
This patch changes API from iio_device_register() to devm_* API. Using API make code simpler. Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-21iio: of_iio_channel_get_by_name() returns non-null pointers for error legsAdam Thomson1-2/+4
Currently in the inkern.c code for IIO framework, the function of_iio_channel_get_by_name() will return a non-NULL pointer when it cannot find a channel using of_iio_channel_get() and when it tries to search for 'io-channel-ranges' property and fails. This is incorrect behaviour as the function which calls this expects a NULL pointer for failure. This patch rectifies the issue. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Stable@vger.kernel.org
2014-06-21iio: dac: mcp4902/mcp4912/mcp4922 dac driverMichael Welling3-0/+227
This patch provides an iio device driver for the Microchip MCP49x2 series DACs. Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-21iio:adc:ad799x: Fix reading and writing of event values, apply shiftPeter Meerwald1-2/+6
last two bits of ADC and limit values are zero and should not be reported (ad7993, ad7997); compare with read_raw() event values are 10 (ad7993, ad7997) or 12 bit max., check the range on write Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Stable@vger.kernel.org Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-18Merge tag 'iio-for-3.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman23-61/+1452
Jonathan writes: First round of new drivers, cleanups and functionality for the 3.17 cycle. New drivers * t5403 barometric pressure sensor * kxcjk1013 accelerometer (with a locking followup fix). * ak09911 digital compass Documentation * ABI docs for proximity added (interface has been there a long time but somehow snuck through without being documented) * Move iio-trig-sysfs documentation out of staging (got left behind when the driver moved some time ago). Cleanups * drop the timestamp argument from iio_trigger_poll(_chained) as nothing has been done with it for some time. * ad799x kerneldoc for ad799x_chip brought up to date. * replace a number of reimplementations of the GENMASK macro and use the BIT macro to cleanup a few locations. * bring the iio_event_monitor example program up to date with new device types. * fix some incorrect function prototypes in iio_utils.h example code. * INDIO_RING_TRIGGERED to INDIO_BUFFER_TRIGGERED fix in docs. This got left behind after we renamed it a long time back. * fix error handling in the generic_buffer example program. * small tidy ups in the iio-trig-periodic-rtc driver. * Allow reseting iio-trig-periodic-rtc frequency to 0 (default) after it has changed. * Trivial tidy ups in coding style in iio_simply_dummy
2014-06-18Merge tag 'iio-fixes-for-3.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linusGreg Kroah-Hartman6-21/+18
Jonathan writes: First set of IIO fixes for the 3.16 cycle. A mixed bag of fixes, many of which feel just to late for 3.15. * hid sensors - some devices need a feature report request in order to change power state. This isn't part of the spec, but has been observed on several devices and does no harm to others. * mpl3115 has had two errors in the buffer description fixed. The presure is signed, not unsigned and the temperature has 12 bits rather than 16. These could lead to incorrect interpretation of the data in userspace. * tsl2x7x - the high byte of the proximity thresholds should be written along with the low byte (which was). This could lead to interesting results with large thresholds. * twl4030 - a flag to specify processed values were required was not set when initializing a reading. As such values returned were in an unknown state. Fixed by simply initializing it appropriately. * IIO_SIMPLE_DUMMY_BUFFER did not select IIO_BUFFER leading to randconfig build errors. * ak8975 was applying an unwanted le16_to_cpu conversion as the i2c framework already performs one. As such for big endian systems, the bytes would be in the wrong order in the magnetic field measurements reported. * mxs-lradc - the controllable voltage dividers were not enabled / disabled for later channels than the first one during conversion. * at91_adc error handling returned -ENOMEM in a u8. Return value of at91_adc_get_trigger_value_by_name changed to int thus allowing -ENOMEM and also original values to be returned. * mcb - mcb_request_mem returns and ERR_PTR but the caller was checking for NULL to detect an error.
2014-06-16iio: accel: kxcjk1013 Fix missing unlock errorsSrinivas Pandruvada1-2/+6
Fix unlock at two places. One when i2c error occurs and other when trigger set state when raw read is in progress. kbuild test robot errors: >> >> drivers/iio/accel/kxcjk-1013.c:531:3-9: preceding lock on line 524 >> >> drivers/iio/accel/kxcjk-1013.c:376:4-10: preceding lock on line 368 Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-16iio: AK09911 : 3 axis compass supportSrinivas Pandruvada3-0/+337
Added IIO magnetometer driver for AK09911. In functionality is resembles AK8975 or AK8963. But there are several differences, so instead of modifying existing AK8975 driver and keep it clean, implemented as a separate driver. The key differences are: - Register map is different and have different indexes - AK09911 is a very compact interface with no DRDY pin. So no support of interrupt or GPIO poll - Even for polled mode no mention on ST2 register, which is required in ak8975 driver - mode values are different for fuse access Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio: accel: kxcjk1013 3-axis accelerometer driverSrinivas Pandruvada3-0/+773
This patch adds IIO driver for KXCJK 1013 triaxis accelerometer sensor. The specifications for this driver is downloaded from: http://www.kionix.com/sites/default/files/KXCJK-1013%20Specifications%20Rev%202.pdf Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio: Remove timestamp argument from iio_trigger_poll() and iio_trigger_poll_chained()Peter Meerwald8-12/+11
argument has been ignored; adjust drivers accordingly Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio: adc: checking for NULL instead of IS_ERR() in probeDan Carpenter1-2/+2
mcb_request_mem() returns an ERR_PTR(), it doesn't return NULL. Fixes: 74aeac4da66f ('iio: adc: Add MEN 16z188 ADC driver') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Stable@vger.kernel.org
2014-06-14iio:adc:ad7298: Use BIT() and GENMASK() macrosPeter Meerwald1-12/+9
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio:adc:ad7476: Use GENMASK() macroPeter Meerwald1-3/+2
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio:adc:ad7887: Use BIT() and GENMASK() macrosPeter Meerwald1-11/+10
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio:adc:ad5504: Use BIT() and GENMASK() macrosPeter Meerwald1-6/+5
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio:adc:ad5791: Use BIT() and GENMASK() macrosPeter Meerwald1-15/+14
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio: adc: at91: signedness bug in at91_adc_get_trigger_value_by_name()Dan Carpenter1-8/+8
at91_adc_get_trigger_value_by_name() was returning -ENOMEM truncated to a positive u8 and that doesn't work. I've changed it to int and refactored it to preserve the error code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Stable@vger.kernel.org
2014-06-14iio:adc:ad799x: Fix ad799x_chip_info kerneldocPeter Meerwald1-2/+1
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-14iio: Add t5403 barometric pressure sensor driverPeter Meerwald3-0/+286
16-bit pressure and temperature sensor the chip can do I2C and SPI, only the I2C interface is supported by the driver at the moment datasheet: http://www.epcos.com/inf/57/ds/T5400.pdf application note: http://www.epcos.com/blob/993154/download/1/t5403-applicationnote.pdf an out-of-tree driver targetting the input subsystem is at https://github.com/unixphere/t5400, it was rejected here: http://comments.gmane.org/gmane.linux.kernel.input/28107 v2: (thanks Hartmut Knaack) * fix MODE_HIGH, equals 2 * check INT_TIME mask in write_raw() Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Stefan Nilsson <stefan.nilsson@unixphere.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-06-07iio: Fix endianness issue in ak8975_read_axis()Peter Meerwald1-8/+1
i2c_smbus_read_word_data() does host endian conversion already, no need for le16_to_cpu() Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Stable@vger.kernel.org
2014-06-03Merge tag 'staging-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging into nextLinus Torvalds51-240/+3249
Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 3.16-rc1. Lots of stuff here, tons of cleanup patches, a few new drivers, and some removed as well, but I think we are still adding a few thousand more lines than we remove, due to the new drivers being bigger than the ones deleted. One notible bit of work did stand out, Jes Sorensen has gone on a tear, fixing up a wireless driver to be "more sane" than it originally was from the vendor, with over 500 patches merged here. Good stuff, and a number of users laptops are better off for it. All of this has been in linux-next for a while" * tag 'staging-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1703 commits) staging: skein: fix sparse warning for static declarations staging/mt29f_spinand: coding style fixes staging: silicom: fix sparse warning for static variable staging: lustre: Fix coding style staging: android: binder.c: Use more appropriate functions for euid retrieval staging: lustre: fix integer as NULL pointer warnings Revert "staging: dgap: remove unneeded kfree() in dgap_tty_register_ports()" Staging: rtl8192u: r8192U_wx.c Fixed a misplaced brace staging: ion: shrink highmem pages on kswapd staging: ion: use compound pages on high order pages for system heap staging: ion: remove struct ion_page_pool_item staging: ion: simplify ion_page_pool_total() staging: ion: tidy up a bit staging: rtl8723au: Remove redundant casting in usb_ops_linux.c staging: rtl8723au: Remove redundant casting in rtl8723a_hal_init.c staging: rtl8723au: Remove redundant casting in rtw_xmit.c staging: rtl8723au: Remove redundant casting in rtw_wlan_util.c staging: rtl8723au: Remove redundant casting in rtw_sta_mgt.c staging: rtl8723au: Remove redundant casting in rtw_recv.c staging: rtl8723au: Remove redundant casting in rtw_mlme.c ...
2014-06-02Merge tag 'soc-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into nextLinus Torvalds1-48/+292
Pull part one of ARM SoC updates from Olof Johansson: "A quite large set of SoC updates this cycle. In no particular order: - Multi-cluster power management for Samsung Exynos, adding support for big.LITTLE CPU switching on EXYNOS5 - SMP support for Marvell Armada 375 and 38x - SMP rework on Allwinner A31 - Xilinx Zynq support for SOC_BUS, big endian - Marvell orion5x platform cleanup, modernizing the implementation and moving to DT. - _Finally_ moving Samsung Exynos over to support MULTIPLATFORM, so that their platform can be enabled in the same kernel binary as most of the other v7 platforms in the tree. \o/ The work isn't quite complete, there's some driver fixes still needed, but the basics now work. New SoC support added: - Freescale i.MX6SX - LSI Axxia AXM55xx SoCs - Samsung EXYNOS 3250, 5260, 5410, 5420 and 5800 - STi STIH407 plus a large set of various smaller updates for different platforms. I'm probably missing some important one here" * tag 'soc-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (281 commits) ARM: exynos: don't run exynos4 l2x0 setup on other platforms ARM: exynos: Fix "allmodconfig" build errors in mcpm and hotplug ARM: EXYNOS: mcpm rename the power_down_finish ARM: EXYNOS: Enable mcpm for dual-cluster exynos5800 SoC ARM: EXYNOS: Enable multi-platform build support ARM: EXYNOS: Consolidate Kconfig entries ARM: EXYNOS: Add support for EXYNOS5410 SoC ARM: EXYNOS: Support secondary CPU boot of Exynos3250 ARM: EXYNOS: Add Exynos3250 SoC ID ARM: EXYNOS: Add 5800 SoC support ARM: EXYNOS: initial board support for exynos5260 SoC clk: exynos5410: register clocks using common clock framework ARM: debug: qcom: add UART addresses to Kconfig help for APQ8084 ARM: sunxi: allow building without reset controller Documentation: devicetree: arm: sort enable-method entries ARM: rockchip: convert smp bringup to CPU_METHOD_OF_DECLARE clk: exynos5250: Add missing sysmmu clocks for DISP and ISP blocks ARM: dts: axxia: Add reset controller power: reset: Add Axxia system reset driver ARM: axxia: Adding defconfig for AXM55xx ...
2014-06-02twl4030-madc: Request processed values in twl4030_get_madc_conversionPaul Kocialkowski1-0/+1
Not setting the raw parameter in the request causes it to be randomly initialized to a value that might be different from zero or zero. This leads to values that are randomly either raw or processed, making it very difficult to make reliable use of the values. Cc: Stable@vger.kernel.org Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-29iio: Fix two mpl3115 issues in measurement conversionPeter Meerwald1-3/+3
(i) pressure is 20-bit unsigned, not signed; the buffer description is incorrect; for raw reads, this is just cosmetic (ii) temperature is 12-bit signed, not 16-bit; this affects readout of temperatures below zero as the sign bit is incorrectly processed reported via private mail Cc: stable@vger.kernel.org Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reported-by: Robert Deliën <robert@delien.nl> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-29iio: hid-sensors: Get feature report from sensor hub after changing power stateArchana Patni1-0/+3
Some sensor hubs require a get feature report call to be issued soon after changing the power state of the sensor. Without this, the sensor remains in the current state. This patch adds a call soon after the power state. This is retained as a generic call across all sensor hubs since the behavior has been noticed on more than one implementation. Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Subramony Sesha <subramony.sesha@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-25Merge tag 'iio-for-3.16c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman4-11/+26
Jonathan writes: Third round of new stuff for IIO in the 3.16 cycle. This (rather late) set consists only of fixes to patches earlier in the cycle or minor fixes for other problems (such as randconfig build issues picked up by Arnd). I've included the general minor fixes here as it is very late in the current cycle and they can all wait for the merge window. * Recent change to hid-sensors introduced a possible infinite loop due to a typo. In the same series, a report interval unit read was added but in the case where the hardware doesn't support it a value of 0 would lead to some nasty issues. The patch sets it to the specified default of msecs. * Anon inodes were used by IIO without being explicitly selected. This has been true for a long time so it clearly only effects rather unusual configurations (rand configs) * at91 requires the input subsytem but this wasn't explicity in the Kconfig. * A couple of parts supported by the max1363 driver were using the wrong iio_chan_spec arrays and hence would missreport their bit depths. This has been there a long time and was never right so isn't a regression.
2014-05-25iio:adc:max1363 incorrect resolutions for max11604, max11605, max11610 and max11611.Jonathan Cameron1-8/+8
Cc: Stable@vger.kernel.org> Reported-by: Erik Habbinga <Erik.Habbinga@schneider-electric.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Hartmut Knaack <knaack.h@gmx.de>
2014-05-22Merge 3.15-rc6 into staging-next.Greg Kroah-Hartman3-7/+10
This resolves the conflicts in the files: drivers/iio/adc/Kconfig drivers/staging/rtl8723au/os_dep/usb_ops_linux.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-10iio: hid-sensors: Set default unit of measure for report intervalArchana Patni1-2/+15
For PROP_REPORT_INTERVAL, the spec does not mandate the presence of the report interval unit in the feature report and expects the default unit of measure to be used as milliseconds. Currently, when the unit is not present, it gets set as zero leading to issues in sampling frequency. This patch sets the unit of measure to the default unit if it is not defined by firmware. Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Subramony Sesha <subramony.sesha@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-10iio:adc: at91 requires the input subsystemArnd Bergmann1-0/+1
Building the at91 adc driver with CONFIG_INPUT disabled results in this build error: ERROR: "input_event" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_unregister_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_free_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_register_device" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_set_abs_params" [drivers/iio/adc/at91_adc.ko] undefined! ERROR: "input_allocate_device" [drivers/iio/adc/at91_adc.ko] undefined! To make sure we can build random configurations, this adds a Kconfig dependency on CONFIG_INPUT, as we do for other similar drivers. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: linux-iio@vger.kernel.org Cc: Josh Wu <josh.wu@atmel.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-10iio: always select ANON_INODESArnd Bergmann1-0/+1
Without ANON_INODES, we get this build error: drivers/built-in.o: In function `iio_event_getfd': :(.text+0x14bf18): undefined reference to `anon_inode_getfd' All other users explicitly select this symbol, so we should do the same thing here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: linux-iio@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-10iio: hid-sensors: typo leads to potential forever loopDan Carpenter1-1/+1
The "i < " was missing in this condition. Fixes: 5d02edfc3957 ('iio: hid-sensors: Convert units and exponent') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-07iio: adc: at91: add sam9rl supportAlexandre Belloni1-0/+18
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-05-07iio: adc: at91: remove unused include from include/machAlexandre Belloni1-1/+102
That include file is now only used by the at91_adc driver, remove it from include/mach for better driver separation. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-05-07iio: adc: at91_adc: Add support for touchscreens without TSMRAlexandre Belloni1-47/+153
Old ADCs, as present on the sam9rl and the sam9g45 don't have a TSMR register and the touchscreen support should be handled differently. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-05-07iio: adc: at91: cleanup platform_dataAlexandre Belloni1-0/+19
num_channels and registers are not used anymore since they are defined inside the driver and assigned by matching the id_table. Also, struct at91_adc_reg_desc is now only used inside the driver. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-05-05iio: hid-sensors: Pressure: Raw read supportSrinivas Pandruvada1-2/+15
Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-05iio: hid-sensors: Inclinometer 3D: Raw read supportSrinivas Pandruvada1-0/+13
Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-05-05iio: hid-sensors: Compass 3D: Raw read supportSrinivas Pandruvada1-0/+16
Added support for raw reading of channel. If the sensor is powered off, it will turn on for reading value Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>