summaryrefslogtreecommitdiffstats
path: root/drivers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* iio: types: Added support for rotation from north usage attributesReyad Attiyat2014-07-201-0/+4
| | | | | | | | Added the rotation from north usage attributes to the iio modifier enum and to the iio modifier names array. Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Allow writing of event configPeter Meerwald2014-07-131-0/+34
| | | | | | | | | | | Allows explicity enabling of events Previously, events were always reported as enabled, but actually only implicitly enabled when updating the buffer scan mode Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Return more meaningful event enabled statePeter Meerwald2014-07-131-1/+9
| | | | | | | | only report an event as enabled if it actually is enabled Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Set conversion channels and rename ad7997_8_update_scan_mode()Peter Meerwald2014-07-131-5/+9
| | | | | | | | rename since function is used by all chips with ALERT pin, not just ad7997/8 Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Write default config on probe and reset alert status on probePeter Meerwald2014-07-131-6/+13
| | | | | | | | | writing ALERT_EN and BUSY_ALERT to the chip config register clears pending alerts, BUSY_ALERT is cleared when reading back the register Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Add helper function to read/write config registerPeter Meerwald2014-07-131-0/+24
| | | | | | | | 16-bit on ad7997/ad7998, 8-bit elsewhere Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Make chan_spec const in ad799x_chip_config structPeter Meerwald2014-07-131-1/+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>
* iio:adc:ad799x: Only expose event interface when IRQ is availablePeter Meerwald2014-07-131-86/+179
| | | | | | | | | an IRQ is necessary to handle the ALERT condition; without IRQ, the IIO event interface serves no purpose Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Use BIT() and GENMASK()Peter Meerwald2014-07-131-16/+15
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:adc:ad799x: Save some lines in ad7997_8_update_scan_mode() exit handlingPeter Meerwald2014-07-131-3/+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>
* iio:adc:ad799x: Drop I2C access helper functionsPeter Meerwald2014-07-131-93/+26
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge tag 'iio-for-3.17c' of ↵Greg Kroah-Hartman2014-07-1341-465/+1304
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: 3rd round of IIO new drivers, cleanups and functionality for the 3.17 cycle. New drivers * isl29125 digital color light sensor driver * TAOS/AMS tcs3414 digital color sensor Staging graduation * ad7291 ADC driver. New functionality * st_sensors - device tree support and bindings * mma8452 - device tree support Cleanups * Drop redundant variables in a number of drivers. * Reorder a structure definition to ealy wiht a warning about static not being at the beginning in the hid-sensors driver. * Switch a few more drivers away from using explicit sampling_frequency attribute to providing this through the core. * Make hid_sensor_get_reporting_interval static as only used within a single file. * Drop a redundant check for negative values in an unsigned variable from ad9832 * Drop some duplicate case labels in the event monitor example code. * Use devm_ioremap_resource to simplify error handling. * Use devm_kzalloc within the blackfin timer driver to simplify error handling and removal. * A number of cleanups of the ad7291 from Hartmut Knaack in response to a patch moving it out of staging. * Core support for the period info element about events. It has been in the abi for a while, but not added until now to the newer handling of information related to events. * Add HAS_IOMEM dependency to mxs_lradc to avoid build issues when testing enabled.
| * staging:iio:adc:Kconfig: Let MXS_LRADC depend on HAS_IOMEMChen Gang2014-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | MXS_LRADC need HAS_IOMEM, so let it depend on HAS_IOMEM The related error (with allmodconfig under score): MODPOST 1365 modules ERROR: "devm_ioremap_resource" [drivers/staging/iio/adc/mxs-lradc.ko] undefined! Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: add DT supportMartin Fuzzey2014-07-131-0/+6
| | | | | | | | | | | | | | | | | | | | Allow the mma8452 to be described in the device tree. Since no device specific binding attributes exist the trivial I2C binding is sufficient to describe the compatible string. Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: core : events ABI for specifying periodSrinivas Pandruvada2014-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iio sysfs ABI defines a way to specify period for roc and thresholds. What: /sys/.../events/in_accel_x_thresh_rising_period What: /sys/.../events/in_accel_x_thresh_falling_period what: /sys/.../events/in_accel_x_roc_rising_period What: /sys/.../events/in_accel_x_roc_falling_period But there is no way to add period with the current event info enum. Added IIO_EV_INFO_PERIOD and corresponding string. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: st_sensors: add devicetree probing supportLinus Walleij2014-07-115-0/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I2C devices that make up the STMicroelectronics MEMS sensors may be sneakily enabled by cleverly giving the device node the same name as a string match from the platform device ID table. However the right method is to use the compatible string. On detection, the ST sensors use the ID string to probe and instatiate the right sensor driver, so pass the kernel-internal ID string in the .data field of the OF match table, and set the I2C client name to this name when a compatible match is used. This avoids having misc Linux-specific strings floating around in the device tree. Cc: Lee Jones <lee.jones@linaro.org> Cc: Denis CIOCCA <denis.ciocca@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7291: Move out of stagingLars-Peter Clausen2014-07-086-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | The ad7291 driver is in a reasonable shape. It does not use non-standard API/ABI and there are no major style issues with the driver. So this patch moves it out of staging. There is one small warning from checkpatch which is also fixed in this patch. The patch also sorts the #include directives in alphabetical order. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7291 define alert register bitsHartmut Knaack2014-07-081-7/+18
| | | | | | | | | | | | | | | | | | Define some names for alert register bits and apply them to ad7291_event_handler(). Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7291 faciliate ad7291_read_event_config()Hartmut Knaack2014-07-081-4/+1
| | | | | | | | | | | | | | | | Save some lines in returning a voltage event. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7291 cleanup definesHartmut Knaack2014-07-081-18/+14
| | | | | | | | | | | | | | | | | | Use BIT and GENMASK, remove unused defines, use AD7291_VOLTAGE_OFFSET definition and move AD7291_BITS. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7291 fix coding styleHartmut Knaack2014-07-081-16/+18
| | | | | | | | | | | | | | | | Fix indention and comment style. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7291 remove double defineHartmut Knaack2014-07-081-2/+0
| | | | | | | | | | | | | | | | Remove second instance of definition of AD7291_BITS. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:trigger: Introduce the use of devm_kzallocHimangi Saraogi2014-07-071-20/+11
| | | | | | | | | | | | | | | | | | | | This patch introduces the use of the managed version of kzalloc and removes the kfrees in the probe and remove functions. More return paths are added and the labels are renamed to order them. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging: iio: Introduce the use of devm_ioremap_resourceHimangi Saraogi2014-07-071-31/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the use of devm_ioremap_resource. It does away with call to request_mem_region and the error checking on platform_get_resource. Also, the calls to free the allocated resources like release_mem_region and iounmap are done away with. The ret variable in the probe function is also eliminated. Also, a bug is fixed as the goto in the error handling of request_mem_region should not have called release_mem_region which releases a resource that has not been allocated. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging: iio: remove duplicate case labelsDaniel Baluta2014-07-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, compiling iio_event_monitor program fails: io_event_monitor.c: In function ‘event_is_known’: iio_event_monitor.c:125:2: error: duplicate case value case IIO_MOD_LIGHT_BOTH: ^ iio_event_monitor.c:121:2: error: previously used here case IIO_MOD_LIGHT_BOTH: Fixes: da4db94 (iio staging: add recently added modifiers to iio_event_monitor) Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging: iio: ad9832: Remove redundant checkSachin Kamat2014-07-071-1/+1
| | | | | | | | | | | | | | | | 'val' is unsigned and cannot be negative. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: hid-sensors: make hid_sensor_get_reporting_interval staticDaniel Baluta2014-07-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | This fixes the following sparse warning: CHECK drivers/iio/common/hid-sensors/hid-sensor-attributes.c drivers/iio/common/hid-sensors/hid-sensor-attributes.c:346:5: warning: symbol 'hid_sensor_get_reporting_interval' was not declared. Should it be static? Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: st_sensors: get platform data from device treeLinus Walleij2014-07-071-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the STMicroelectronics sensors only support one single platform data item: configuration of the DRDY (data ready) pin for a particular design. Augment the core to prioritize and take this information from the device tree if the parent device has an assigned device node, else fall back to passed in platform data (usually the default data). Cc: Lee Jones <lee.jones@linaro.org> Cc: Denis CIOCCA <denis.ciocca@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: imu: adis16480 switch sampling frequency attr to core supportJonathan Cameron2014-07-071-60/+22
| | | | | | | | | | | | | | | | | | | | By using the info_mask_shared_by_all element of the channel spec, access to the sampling frequency becomes available to in kernel users of the driver. It also shortens and simplifies the code. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio: imu: adis16400 switch sampling frequency attr to core support.Jonathan Cameron2014-07-071-53/+25
| | | | | | | | | | | | | | | | | | | | By using the info_mask_shared_by_all element of the channel spec, access to the sampling frequency becomes available to in kernel users of the driver. It also shortens and simplifies the code. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio: adis: Switch sampling frequency attr to core support.Jonathan Cameron2014-07-076-110/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using the info_mask_shared_by_all element of the channel spec, acce to the sampling frequency becomes available to in kernel users of the driver. It also shortens and simplifies the code. This particular conversion was made more complicated by the shared library and the fact that a number of the drivers do not actually have support for setting or reading the sampling frequency. The hardware, in those cases investigated supports it. It's just never been implemented. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio: gyro: itg3200 switch sampling frequency attr to core support.Jonathan Cameron2014-07-071-58/+43
| | | | | | | | | | | | | | | | | | | | | | | | By using the info_mask_shared_by_all element of the channel spec, access to the sampling frequency becomes available to in kernel users of the driver. It also shortens and simplifies the code a little. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Cc: Thorsten Nowak <thorsten.nowak@iis.fraunhofer.de> Cc: Christian Strobel <christian.strobel@iis.fraunhofer.de>
| * iio:st sensors: remove custom sampling frequence attribute in favour of core ↵Jonathan Cameron2014-07-075-37/+55
| | | | | | | | | | | | | | | | | | | | support. This allows in kernel client drivers to access this Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Denis Ciocca <denis.ciocca@st.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
| * iio: Add driver for AMS/TAOS tcs3414 digital color sensorPeter Meerwald2014-07-073-0/+418
| | | | | | | | | | | | | | | | | | 16-bit digital color sensor with red, green, blue and clear channel datasheet: http://ams.com/eng/content/download/250258/975997/TCS3414_Datasheet_EN_v1.pdf Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Add Intersil isl29125 digital color light sensor driverPeter Meerwald2014-07-073-0/+360
| | | | | | | | | | | | | | datasheet: http://www.intersil.com/content/dam/Intersil/documents/isl2/isl29125.pdf Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: hid-sensors: Fix compilation warningSachin Kamat2014-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | Move the 'static' keyword to beginning of definition to silence the following compilation warning: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:34:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] 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>
| * iio: xilinx-xadc: Remove unused variableSachin Kamat2014-07-031-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>
| * iio: ad5686: Remove redundant variableSachin Kamat2014-07-031-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>
| * iio: ad5504: Remove redundant variableSachin Kamat2014-07-031-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>
| * iio: ad5624r_spi: Remove redundant variableSachin Kamat2014-07-031-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>
| * iio: adis16400: Remove unused variableSachin Kamat2014-07-031-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>
* | staging: rtl8188eu: Rename _rtw_init_mlme_priv() to rtw_init_mlme_priv()navin patidar2014-07-132-11/+1
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Rename _rtw_free_mlme_priv() to rtw_free_mlme_priv()navin patidar2014-07-132-9/+1
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Remove unused function _rtw_enqueue_network()navin patidar2014-07-132-17/+0
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Remove unused function _rtw_dequeue_network()navin patidar2014-07-132-21/+0
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Make _rtw_free_network() staticnavin patidar2014-07-132-4/+1
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Rename _rtw_find_network() to rtw_find_network()navin patidar2014-07-132-18/+1
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Rename _rtw_free_network_queue() to rtw_free_network_queue()navin patidar2014-07-132-9/+1
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Remove unused function rtw_get_timestampe_from_ie()navin patidar2014-07-132-6/+0
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Remove unused function _rtw_IOL_append_WW_cmd()navin patidar2014-07-132-16/+0
| | | | | | | | | | Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>