summaryrefslogtreecommitdiffstats
path: root/drivers/iio
Commit message (Collapse)AuthorAgeFilesLines
...
| * iio: adc: twl6030-gpadc: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-231-0/+1
| | | | | | | | | | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: dac: max5821: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-231-0/+1
| | | | | | | | | | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: leave sysfs namings to the iio coreMartin Kepplinger2015-09-231-1/+0
| | | | | | | | | | | | | | | | | | | | This doesn't actually change anything since the core names the sysfs folder for the iio event attributes "events" anyways. It only leaves the job to the core. Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: add copyright notice commentMartin Kepplinger2015-09-231-0/+1
| | | | | | | | | | | | Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: add support for MMA8652FC and MMA8653FCMartin Kepplinger2015-09-232-8/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MMA8652FC and MMA8653FC don't provide the transient interrupt source, so the motion interrupt source is used by providing a new iio_chan_spec definition, so that other supported devices are not affected by this. Datasheets for the newly supported devices are available at Freescale's website: http://cache.freescale.com/files/sensors/doc/data_sheet/MMA8652FC.pdf http://cache.freescale.com/files/sensors/doc/data_sheet/MMA8653FC.pdf Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: add freefall / motion interrupt sourceMartin Kepplinger2015-09-231-8/+36
| | | | | | | | | | | | | | | | | | | | This adds the freefall / motion interrupt source definitions to the driver. It is used in this series' next patch, for chips that don't support the transient interrupt source. Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: add support for MMA8453Q accelerometer chipMartin Kepplinger2015-09-232-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the 10 bit version if Freescale's accelerometers of this series. The datasheet is available at Freescale's website: http://cache.freescale.com/files/sensors/doc/data_sheet/MMA8453Q.pdf It creates a devicetree bindings file to document the new functionality and removes the driver from the trivial-devices list. Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: refactor for seperating chip specific dataMartin Kepplinger2015-09-231-49/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a struct mma_chip_info to hold data that will remain specific to the chip in use. It is provided during probe() and linked in struct of_device_id. Also this suggests that the driver is called "mma8452" and now handles the MMA8452Q device, but is not limited to it. Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: humidity: add HDC100x supportMatt Ranostay2015-09-233-0/+330
| | | | | | | | | | | | | | | | Add support for the HDC100x temperature and humidity sensors including the resistive heater element. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: hi8435: Holt HI-8435 threshold detectorVladimir Barinov2015-09-233-0/+546
| | | | | | | | | | | | | | Add Holt threshold detector driver for HI-8435 chip Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mxc4005: add data ready trigger for mxc4005Teodora Baluta2015-08-311-1/+141
| | | | | | | | | | | | | | | | Add iio trigger for the data ready interrupt that signals new measurements for the X, Y and Z axes. Signed-off-by: Teodora Baluta <teodora.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mxc4005: add triggered buffer mode for mxc4005Teodora Baluta2015-08-312-3/+78
| | | | | | | | | | | | | | | | This patch adds support for buffered readings for the 3-axis accelerometer mxc4005. Signed-off-by: Teodora Baluta <teodora.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: accel: add support for mxc4005 accelerometerTeodora Baluta2015-08-313-0/+367
| | | | | | | | | | | | | | | | | | This patch adds support for Memsic MXC4005XC 3-axis accelerometer. The current implementation is a minimal one as it adds raw readings for the three axes and setting scale from userspace. Signed-off-by: Teodora Baluta <teodora.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: bmg160: Add SPI driverMarkus Pargmann2015-08-313-1/+64
| | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: bmg160: Separate i2c and core driverMarkus Pargmann2015-08-315-67/+108
| | | | | | | | | | | | | | | | | | | | This patch separates the core driver using regmap and the i2c driver which creates the i2c regmap. Also in the Kconfig file BMG160 and BMG160_I2C are separate now. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: proximity: add support for PulsedLight LIDARMatt Ranostay2015-08-313-0/+301
| | | | | | | | | | | | | | | | | | | | | | | | Add support for the PulsedLight LIDAR rangefinder sensor which allows high speed (over 300Hz) distance measurements using Barker Coding within 40 meter range. Support only tested on the "blue label" rev 2, but may work using low sample frequencies on the original version. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: tsl4531: fix error handling in tsl4531_check_id()Dan Carpenter2015-08-311-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The tsl4531_check_id() function returned 1 on "found" and 0 on "not found" and negative error codes on failure. This was non-standard and bug prone. The caller treated all non-zero values including error codes as "found". This patch fixes it by changing the tsl4531_check_id() to return zero on success or a negative error code, and updates the caller. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: light: add APDS9960 ALS + promixity driverMatt Ranostay2015-08-313-0/+1149
| | | | | | | | | | | | | | | | | | | | APDS9960 is a combination of ALS, proximity, and gesture sensors. This patch adds support for these functions along with gain control, integration time, and event thresholds. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: vf610: Add IIO buffer support for Vybrid ADCSanchayan Maity2015-08-312-7/+100
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for IIO buffer to the Vybrid ADC driver. IIO triggered buffer infrastructure along with iio sysfs trigger is used to leverage continuous sampling support provided by the ADC block. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: light: fix platform_no_drv_owner.cocci warningskbuild test robot2015-08-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | drivers/iio/light/opt3001.c:796:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Support triggered eventsVladimir Barinov2015-08-275-4/+88
| | | | | | | | | | | | | | | | | | | | Support triggered events. This is useful for chips that don't have their own interrupt sources. It allows to use generic/standalone iio triggers for those drivers. Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mlx90614: Implement filter configurationCrt Mori2015-08-271-3/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented Low pass 3db frequency filter which configures FIR and IIR values within the configuration register of EEPROM. For more standardized interface we have fixed the FIR value to 1024, while changes in IIR value are directly connected to filter responses. The new datasheet version will provide a simplified table (also in reStructured text format below) with this change, to provide quick overview of possible settings. Below sensor timings (bandwidth) are calculated for 3db frequency low pass filter. +--------------------+-----------------+ | Filter setting (%) | Band width (Hz) | | (rounded to 1.0) | | +====================+=================+ | 13 | 0.15 | +--------------------+-----------------+ | 17 | 0.20 | +--------------------+-----------------+ | 25 | 0.31 | +--------------------+-----------------+ | 50 | 0.77 | +--------------------+-----------------+ | 57 | 0.86 | +--------------------+-----------------+ | 67 | 1.10 | +--------------------+-----------------+ | 80 | 1.53 | +--------------------+-----------------+ | 100 | 7.23 | +--------------------+-----------------+ The diff is made towards togreg branch. Added myself to MAINTAINERS and authors as per discussion with Jonathan. Signed-off-by: Crt Mori <cmo@melexis.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: humidity: si7020: replaced bitmask on humidity values with range checkNicola Corna2015-08-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The maximum possible value for the relative humidity is 55575 (100%RH). This value, if shifted right by 2 bits, uses 14 bits and masking it with a 12 bit mask removes 2 meaningful bits. The masking has been replaced with a range check that sets the minimum value at 786 (0%RH) and the maximum at 13893 (99.998%RH). Signed-off-by: Nicola Corna <nicola@corna.info> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: mcp320x: Set struct spi_driver .of_match_tableJavier Martinez Canillas2015-08-221-0/+1
| | | | | | | | | | | | | | | | | | The driver has an OF id table but the .of_match_table is not set so the SPI core can't do an OF style match and the table was unused. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Export SPI module alias information in missing driversJavier Martinez Canillas2015-08-222-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SPI core always reports the MODALIAS uevent as "spi:<modalias>" regardless of the mechanism that was used to register the device (i.e: OF or board code) and the table that is used later to match the driver with the device (i.e: SPI id table or OF match table). So drivers needs to export the SPI id table and this be built into the module or udev won't have the necessary information to autoload the needed driver module when the device is added. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: dac: ad7303: Add OF match tableJavier Martinez Canillas2015-08-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | The Documentation/devicetree/bindings/iio/dac/ad7303.txt DT binding doc lists "adi,ad7303" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: frequency: adf4350: Add OF match tableJavier Martinez Canillas2015-08-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | The Documentation/devicetree/bindings/iio/frequency/adf4350.txt DT binding doc lists "adi,adf4350" or "adi,adf4351" as compatible strings but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc128s052: Add OF match tableJavier Martinez Canillas2015-08-221-0/+8
| | | | | | | | | | | | | | | | | | | | The Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt DT binding doc lists "ti,adc128s052" or "ti,adc122s021" as compatible strings but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: as3935: Add OF match tableJavier Martinez Canillas2015-08-221-0/+7
| | | | | | | | | | | | | | | | | | | | The Documentation/devicetree/bindings/iio/proximity/as3935.txt DT binding doc lists "ams,as3935" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: max1027: Set struct spi_driver .of_match_tableJavier Martinez Canillas2015-08-221-0/+1
| | | | | | | | | | | | | | | | The driver has an OF id table but the .of_match_table is not set so the SPI core can't do an OF style match and the table was unused. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: xilinx-xadc: Push interrupts into hardirq contextXander Huff2015-08-162-29/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver currently registers a pair of irq handlers using request_threaded_irq(), however the synchronization mechanism between the hardirq and the threadedirq handler is a regular spinlock. Unfortunately, this breaks PREEMPT_RT builds, where a spinlock can sleep, and is thus not able to be acquired from a hardirq handler. This patch gets rid of the threaded handler and pushes all interrupt handling into the hardirq context, and uses request_irq(). To validate that this change has no impact on RT performance, here are cyclictest values with no processes running: $ sudo cyclictest -S -m -p 98 policy: fifo: loadavg: 0.00 0.01 0.05 1/174 2539 T: 0 ( 1405) P:98 I:1000 C:167010520 Min: 9 Act: 12 Avg: 12 Max: 75 T: 1 ( 1862) P:98 I:1500 C:111340339 Min: 9 Act: 12 Avg: 12 Max: 73 Then, all xadc raw handles were accessed in a continuous loop via /sys/bus/iio/devices/iio:device0: $ sudo cyclictest -S -m -p 98 policy: fifo: loadavg: 7.84 7.70 7.63 3/182 4260 T: 0 ( 2559) P:98 I:1000 C:241557018 Min: 11 Act: 18 Avg: 21 Max: 74 T: 1 ( 2560) P:98 I:1500 C:161038006 Min: 10 Act: 21 Avg: 20 Max: 73 Signed-off-by: Xander Huff <xander.huff@ni.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: percolate error if event fd failsLinus Walleij2015-08-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This makes the error from iio_event_getfd() percolate up to userspace properly so we can know for sure there is no events on this device (-ENODEV returned). Before this patch we would bail out looking for the unsupported events on the erroneous (negative) file descriptor. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: st_sensors: add debugfs register read hookLinus Walleij2015-08-165-0/+26
| | | | | | | | | | | | | | | | | | | | This adds a debugfs hook to read/write registers in the ST sensors using debugfs. Proved to be awesome help when trying to debug why IRQs do not arrive. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: bmg160: Remove remaining uses of i2c_clientMarkus Pargmann2015-08-161-30/+29
| | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: bmg160: Use generic dev_drvdataMarkus Pargmann2015-08-161-5/+5
| | | | | | | | | | | | | | | | | | i2c_get_clientdata() is specifically for i2c. Replace it with the generic dev_get/set_drvdata() to support different protocols. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: bmg160: Remove i2c_client from data structMarkus Pargmann2015-08-161-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | i2c_client variable is not really used anymore in the core driver. It is only used to get the device to make proper outputs. This patch replaces all i2c_client usage through direct usage of the device pointer. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: bmg160: Use i2c regmap instead of direct i2c accessMarkus Pargmann2015-08-162-111/+88
| | | | | | | | | | | | | | | | | | This patch introduces regmap usage into the driver. This is done to later easily support the SPI interface of this chip. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Move generic buffer implementations to sub-directoryLars-Peter Clausen2015-08-167-25/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For generic IIO trigger implementations we already have a sub-directory, but the generic buffer implementations currently reside in the IIO top-level directory. The main reason is that things have historically grown into this form. With more generic buffer implementations on its way now is the perfect time to clean this up and introduce a sub-directory for generic buffer implementations to avoid too much clutter in the top-level directory. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Move callback buffer to its own moduleLars-Peter Clausen2015-08-153-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently the IIO callback buffer implementation is directly built into the IIO core module when enabled. Given that the callback buffer module is standalone functionallity there is really no reason to do this. So move it to its own module. Also rename the source to follow the standard IIO module naming convention as well as add a license notice to the file. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:cc10001_adc: resort entry in Kconfig and MakefileHartmut Knaack2015-08-122-12/+12
| | | | | | | | | | | | | | | | Move the entry for the CC 10001 ADC driver in Kconfig and Makefile up to maintain alphabetic order. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:magnetometer:bmc150_magn: sort entry alphabeticallyHartmut Knaack2015-08-122-17/+19
| | | | | | | | | | | | | | | | | | | | Sort the entry for bmc105_magn in Kconfig and Makefile to its correct position. Also add the minor module information for completeness. Fixes: c91746a2361d ("iio: magn: Add support for BMC150 magnetometer") Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:light:stk3310: adjust indentationHartmut Knaack2015-08-121-3/+3
| | | | | | | | | | | | | | | | Adjust some indentation issues as spotted by checkpatch.pl --strict Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:light:stk3310: use correct names and type for stateHartmut Knaack2015-08-121-5/+5
| | | | | | | | | | | | | | | | | | Indicate the bit number of predefined states, make use of these names and change the state type in _resume to u8 to avoid type casting. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:light:stk3310: add more error handlingHartmut Knaack2015-08-121-14/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the following error cases: * lower boundary for val in _write_event * return value of regmap_(field_)read * possible values for chan->type * return value of stk3310_gpio_probe Also add an error path in _probe to put the sensor back into stand-by mode in case of serious errors. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:berlin2-adc: coding style cleanupHartmut Knaack2015-08-121-29/+35
| | | | | | | | | | | | | | | | Some adjustment of indentation to make checkpatch.pl happy in strict mode. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:berlin2-adc: enable interrupts with mutex lockedHartmut Knaack2015-08-121-9/+8
| | | | | | | | | | | | | | | | | | Move the call to enable channel interrupts into its _read() function to have it protected by a mutex. This ensures that only one channel is sampled at a time. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:berlin2-adc: use GENMASK and BIT for masksHartmut Knaack2015-08-121-5/+5
| | | | | | | | | | | | | | | | Make use of GENMASK for consecutive bitmasks and BIT for single bitmasks. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | Merge tag 'gpio-v4.3-1' of ↵Linus Torvalds2015-09-042-10/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.3 kernel cycle. There is quite a lot going on in the GPIO subsystem this merge window, so the main matter is decribed below. The hits in other subsystems when making the GPIO flags optional are all ACKed by their respective subsystem maintainers. Core changes: - Root out the wrapper devm_gpiod_get() and gpiod_get() etc versions of the descriptor calls that did not use the flags argument on the end. This was around for too long and eventually Uwe Kleine-König took the time to clean it out and the last users are removed along with the macros in this tag. In several cases the use of flags simplifies the code. For this reason we have (ACKed) patches hitting in DRM, IIO, media, NFC, USB+PHY up until we hammer in the nail with removing the macros. - Add a fat document describing how much ready-made GPIO stuff we have i the kernel to discourage people from reinventing a square wheel in userspace, as so often happens. - Create a separate lockdep class for each instance of a GPIO IRQ chip instead of using one class for all chips, as the current code will not work with systems with several GPIO chips doing lockdep debugging. - Protect against driver unloading also when a GPIO line is only used as IRQ for the GPIOLIB_IRQCHIP helpers. - If the GPIO chip has no designated owner, assign the parent device driver owner as owner. - Consolidation of chained IRQ handler install/remove replacing all call sites where irq_set_handler_data() and irq_set_chained_handler() were done in succession with a combined call to irq_set_chained_handler_and_data(). This series was created by Thomas Gleixner after the problem was observed by Russell King. - Tglx also made another series of patches switching __irq_set_handler_locked() for irq_set_handler_locked() which is way cleaner. - Tglx and Jiang Liu wrote a good bunch of patches to make use of irq_desc_get_xxx() accessors and avoid looking up irq_descs from IRQ numbers. The goal is to get rid of the irq number from the handlers in the IRQ flow which is nice. - Rob Herring killed off the set_irq_flags() for all GPIO drivers. This was an ARM specific function that is replaced with the generic irq_modify_status() where special flags are actually needed. - When an OF node has a pin range for its GPIOs, return -EPROBE_DEFER if the pin controller isn't available. Pretty logical, yet needed to be fixed. - If a driver using GPIOLIB_IRQCHIP has its own irq_*_resources call back, then call these instead of the defaults provided by the GPIOLIB. - Fix an undocumented ABI hole: named GPIOs were not properly documented. Driver improvements: - Add get_direction() support to the generic GPIO driver, it's strange that we didn't have that before. - Make it possible to have input-only GPIO chips using the generic GPIO driver. - Clean out platform data support from the Emma Mobile (EM) driver - Finegrained runtime PM support for the RCAR driver. - Support r8a7795 (R-car H3) in the RCAR driver. - Support interrupts on GPIOs 16 thru 31 in the DaVinci driver. - Some consolidation and new support in the MPC8xxx driver, we now support MPC5125. - Preempt-RT-friendly patches: the OMAP, MPC8xxx, drivers uses raw spinlocks making it work better with the realime patches. - Interrupt support for the EXTRAXFS GPIO driver. - Make the ETRAXFS GPIO driver support also ARTPEC-3. - Interrupt and wakeup support for the BRCMSTB driver, also for wakeup from S5 cold boot. - Mask MXC IRQs during suspend. - Improve OMAP2 GPIO set_debounce() to work according to spec. - The VF610 driver handles IRQs properly. New drivers: - ZTE ZX GPIO driver" * tag 'gpio-v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (87 commits) Revert "gpio: extraxfs: fix returnvar.cocci warnings" gpio: tc3589x: use static container helper gpio: xlp: fix error return code gpio: vf610: handle level IRQ's properly gpio: max732x: Fix error handling in probe() gpio: omap: fix clk_prepare/unprepare usage gpio: omap: protect regs access in omap_gpio_irq_handler gpio: omap: fix omap2_set_gpio_debounce gpio: omap: switch to use platform_get_irq gpio: omap: remove wrong irq_domain_remove usage in probe gpiolib: add description for gpio irqchip fields in struct gpio_chip gpio: extraxfs: fix returnvar.cocci warnings gpiolib: irqchip: use different lockdep class for each gpio irqchip gpio/grgpio: fix deadlock in grgpio_irq_unmap() Documentation: gpio: consumer: describe active low property gpio: mxc: fix section mismatch warning gpio/mxc: mask gpio interrupts in suspend gpio: omap: Fix missing raw locks conversion gpio: brcmstb: support wakeup from S5 cold boot gpio: brcmstb: Add interrupt and wakeup source support ...
| * Merge tag 'v4.2-rc4' into develLinus Walleij2015-08-1322-101/+132
| |\ | | | | | | | | | Linux 4.2-rc4
| * | iio: magn: bmc150: use flags argument of devm_gpiod_getUwe Kleine-König2015-07-061-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Simplify driver accordingly. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
OpenPOWER on IntegriCloud