summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* staging: dgnc: fix CamelCase in dgnc_tty.cDaeseok Youn2016-04-042-3/+3
| | | | | | | fix checkpatch.pl warning about 'Avoid CamelCase' Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: dgnc: remove too many traverse pointerDaeseok Youn2016-04-041-17/+20
| | | | | | | | | | The "ch->ch_bd" is already assined to "bd" but this is only for checking null or MAGIC number. in the dgnc_tty_ioctl function, bd can be used for referencing to board_ops structure. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* android,lowmemorykiller: Don't abuse TIF_MEMDIE.Tetsuo Handa2016-04-042-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, lowmemorykiller (LMK) is using TIF_MEMDIE for two purposes. One is to remember processes killed by LMK, and the other is to accelerate termination of processes killed by LMK. But since LMK is invoked as a memory shrinker function, there still should be some memory available. It is very likely that memory allocations by processes killed by LMK will succeed without using ALLOC_NO_WATERMARKS via TIF_MEMDIE. Even if their allocations cannot escape from memory allocation loop unless they use ALLOC_NO_WATERMARKS, lowmem_deathpending_timeout can guarantee forward progress by choosing next victim process. On the other hand, mark_oom_victim() assumes that it must be called with oom_lock held and it must not be called after oom_killer_disable() was called. But LMK is calling it without holding oom_lock and checking oom_killer_disabled. It is possible that LMK calls mark_oom_victim() due to allocation requests by kernel threads after current thread returned from oom_killer_disabled(). This will break synchronization for PM/suspend. This patch introduces per a task_struct flag for remembering processes killed by LMK, and replaces TIF_MEMDIE with that flag. By applying this patch, assumption by mark_oom_victim() becomes true. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Arve Hjonnevag <arve@android.com> Cc: Riley Andrews <riandrews@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'iio-for-4.7a' of ↵Greg Kroah-Hartman2016-04-0478-1475/+2494
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First round of IIO new device support, features and cleanups for the 4.7 cycle. New core support * UV light modifier (for intensity) * UV light index channel type. New device support * hp206c barometer and altimeter - new driver. * mcp4131 potentiometer - new driver supporting lots of parts from Microchip. * mma8452 - FXLS8471Q support - NXP LPC18XX SOC ADC - new driver. - NXP LPC18XX SOC DAC - new driver. - rockchip_saradc - support rk3399 * st accel - h3lis331dl support Staging driver removals * adis16204 - obsolete part making it hard to get parts to test the driver in order to clean it up. * adis16220 - obsolete part making it hard to get the parts test the driver in order to clean it up. Features * core - convenience functions to claim / release direct access to the device. Makes more consistent handling of this corner easier. Used in ad7192 driver. * ak8975 - power regulator support. * at91-sama5d2 - differential channel support. * mma8452 - runtime pm support - drop device specific autosleep and use the runtime pm one instead. * ms5611 - DT bindings - oversampling ratio support Cleanups and minor fixes * MAINTAINERS - Peter got married - hence name change! * Documentation - Fix a typo in in_proximity_raw description. - Add some missing docs for iio_buffer_access_funcs. * Tools - update iio_event_monitor names to match new stuff. - make generic_buffer look for triggers ending in -trigger as we let these in for a number of drivers a long time back and now it is a fairly common option. Drivers * staging wide - convert bare unsigned usage to unsigned int to comply with coding style. * non staging wide: - since boiler plate gpio handling of interrupts has been moved into the ACPI core we don't need to include gpio/consumer.h in a load of drivers so drop it. * ad7606 - fix an endian casting sparse warning. * ak8975 - fix a possible unitialized warning from gcc. - drop and unused field left over from earlier cleanups - fix a missing regulator_disable on exit. * at91-sama5d2 - typo and indentation - missing IOMEM dependency. - cleanup mode register usage by avoidling erasing whole thing when changing the sampling frequency. * bmc150 - use the core demux and available_scan_masks to simplify buffer handling - optimize the transfers in the trigger handler now we have a magic function to emulate bulk reads (under circumstances met here). This matters with some rather dumb i2c adapters in particular. - use a single regmap_conf for all bus types as they were all the same. * bmg160 - use the core demux and available_scan_masks to simplify the buffer handling - optimize the transfers in the trigger handler now we have a magic funciton to emulate bulk rads (under circumstances met here). - drop gpio interrupt probing from the driver (ACPI) as now handled by the ACPI core. * ina2xx-adc - update the CALIB register when RShunt changes. - fix scale for VShunt - in reality this error canceled out when used. * isl29028 - use regmap to retrieve the struct device instead of carrying a second copy of it around. * kxcjk-1013 - use core demux - optimize i2c transfers in the trigger handler. * mcp4531 - refactor to use a pointer to access model parameters instead of indexing into the array each time. * mma8452 - style fixes - avoid swtiching to active whenever the config changes - add missin i2c_device_id for mma8451 * mpu6050 - fix possible NULL dereference. - fix the name / chip_id used when ACPI used (otherwise reports as NULL). * ms5611 - fix a missing regulator_disable that left the regulator on during removal. * mxc4005 - drop gpio interrupt handling for ACPI case from driver as the core now handles this case. * st-sensors - note that there are only ever a maximum of 3 axis on current st-sensors so just allocate a fixed sized buffer big enough for that. * tpl0102 - change the i2c_check_functionality condition to bring it inline with other IIO users as EOPNOTSUPP. * tsl2563 - replace deprecated flush_scheduled_work
| * iio: accel: bmc150: use common definition for regmap confIrina Tirdea2016-04-034-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | bmc150_i2c_regmap_conf is defined three times (in bmc150-accel-core.c, bmc150-accel-i2c.c and and bmc150-accel-spi.c), although the definition is the same. Use one common definition for bmc150_i2c_regmap_conf in all included files. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * hp206c: Initial support for reading sensor valuesCrestez Dan Leonard2016-04-033-0/+437
| | | | | | | | | | Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Add channel for UV indexPeter Meerwald-Stadler2016-04-034-0/+13
| | | | | | | | | | | | | | UV index indicating strength of sunburn-producing ultraviolet (UV) radiation Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Add modifier for UV lightPeter Meerwald-Stadler2016-04-034-1/+7
| | | | | | | | | | Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: ina2xx-adc: fix scale for VShuntMarc Titinger2016-04-031-2/+2
| | | | | | | | | | | | | | | | The scale would result in uV instead of expected mV. Mostly cosmetic, since the value of 'Power' was computed OK. Signed-off-by: Marc Titinger <marc.titinger@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:at91-sama5d2: add support for differential conversionsLudovic Desroches2016-04-031-15/+56
| | | | | | | | | | | | | | | | Add signed differential channels and update the voltage scale for differential conversions. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:at91-sama5d2: cleanup mode register useLudovic Desroches2016-04-031-5/+10
| | | | | | | | | | | | | | | | Do not erase previous configuration of the mode register when setting the sampling frequency. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: potentiometer: add driver for Microchip ↵Slawomir Stepien2016-04-034-0/+597
| | | | | | | | | | | | | | | | | | | | | | | | | | MCP413X/414X/415X/416X/423X/424X/425X/426X The following functionalities are supported: - write, read from volatile memory Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/22060b.pdf Signed-off-by: Slawomir Stepien <sst@poczta.fm> Reviewed-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * Staging: iio: ad7606: Fix sparse endian warningKsenija Stanojevic2016-04-031-2/+3
| | | | | | | | | | | | | | | | Fix following sparse warning: warning: cast to restricted __be16 Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: buffer: add missing descriptions in iio_buffer_access_funcsLuis de Bethencourt2016-04-031-0/+2
| | | | | | | | | | | | | | | | | | The members buffer_group and attrs of iio_buffer_access_funcs have no descriptions for the documentation. Adding them. Fixes: 08e7e0adaa17 ("iio: buffer: Allocate standard attributes in the core") Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: tools: make generic_buffer look for "-trigger"Linus Walleij2016-04-031-1/+13
| | | | | | | | | | | | | | | | | | | | All the ST Sensors use the old "<foo>-trigger" rather than the standard "<foo>-devN" new standard suffix for triggers. Now much to do about it since it is ABI, but make the testing tools recognize it too. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: remove gpio interrupt probing from drivers that use a single interruptIrina Tirdea2016-04-032-57/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 845c877009cf014b ("i2c / ACPI: Assign IRQ for devices that have GpioInt automatically") automatically assigns the first ACPI GPIO interrupt in client->irq, so we can remove the probing code from drivers that use only one interrupt. Commit 0f0796509c07c1c7 ("iio: remove gpio interrupt probing from drivers that use a single interrupt") removes gpio interrupt probing from most drivers. This patch cleans the remaining ones. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: remove unused gpio consumer.h includeIrina Tirdea2016-04-038-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | GPIO handling code has been removed from the drivers (since this is now handled by the ACPI core) in commit 0f0796509c07 ("iio: remove gpio interrupt probing from drivers that use a single interrupt"). Remove the include for linux/gpio/consumer.h since it is no longer used. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: accel: kxcjk-1013: optimize i2c transfers in trigger handlerAdriana Reus2016-04-031-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to enable/disable the bus at each i2c transfer and must wait for the enable/disable to happen before sending the data. When reading data in the trigger handler, the kxcjk-1013 accel driver does one i2c transfer for each axis. This has an impact on the frequency of the accelerometer at high sample rates due to additional delays introduced by the i2c bus at each transfer. Reading all axis values in one i2c transfer reduces the delays introduced by the i2c bus. Uses i2c_smbus_read_i2c_block_data_or_emulated that will fallback to reading each axis as a separate word in case i2c block read is not supported. Signed-off-by: Adriana Reus <adriana.reus@intel.com> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: accel: kxcjk-1013: use available_scan_masksAdriana Reus2016-04-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Use available_scan_masks to allow the iio core to select the data to send to userspace depending on which axes are enabled, instead of doing this in the driver's interrupt handler. Signed-off-by: Adriana Reus <adriana.reus@intel.com> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: accel: bmg160: optimize transfers in trigger handlerIrina Tirdea2016-04-031-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to enable/disable the bus at each i2c transfer and must wait for the enable/disable to happen before sending the data. When reading data in the trigger handler, the bmg160 gyro driver does one bus transfer for each axis. This has an impact on the frequency of the accelerometer at high sample rates due to additional delays introduced by the bus at each transfer. Reading all axis values in one bus transfer reduces the delays introduced by the bus. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: gyro: bmg160: use available_scan_masksIrina Tirdea2016-04-031-2/+7
| | | | | | | | | | | | | | | | | | | | Use available_scan_masks to allow the iio core to select the data to send to userspace depending on which axes are enabled, instead of doing this in the driver's interrupt handler. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: accel: bmc150: optimize transfers in trigger handlerIrina Tirdea2016-04-031-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to enable/disable the bus at each i2c transfer and must wait for the enable/disable to happen before sending the data. When reading data in the trigger handler, the bmc150 accel driver does one bus transfer for each axis. This has an impact on the frequency of the accelerometer at high sample rates due to additional delays introduced by the bus at each transfer. Reading all axis values in one bus transfer reduces the delays introduced by the bus. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: accel: bmc150: use available_scan_masksIrina Tirdea2016-04-031-2/+7
| | | | | | | | | | | | | | | | | | | | Use available_scan_masks to allow the iio core to select the data to send to userspace depending on which axes are enabled, instead of doing this in the driver's interrupt handler. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: potentiometer: mcp4531: use pointer to access model parametersSlawomir Stepien2016-04-031-7/+6
| | | | | | | | | | | | | | | | | | Use const pointer to element from model configuration array rather then array index, as it will not change anyway. Signed-off-by: Slawomir Stepien <sst@poczta.fm> Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging: iio: convert bare unsigned usage to unsigned intAlison Schofield2016-03-289-61/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | Use kernel preferred unsigned int declaration style. Patch created using: git ls-files drivers/staging/iio | \ xargs ./scripts/checkpatch.pl -f --fix-inplace --types=unspecified_int Hand edits restored columns in structure definitions. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: st_sensors: simplify buffer address handlingLinus Walleij2016-03-281-21/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The driver goes to some length to dynamically allocate an array to hold the channel addresses. However no ST sensor has more than three channels (x, y, z at most). Instead of kmalloc():ing and kfree():in the address array, just use a fixed array of three elements. Cc: Giuseppe Barba <giuseppe.barba@st.com> 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: ina2xx-adc: update the CALIB. register when RShunt changesMarc Titinger2016-03-211-15/+24
| | | | | | | | | | | | | | | | | | The user (or an init script) may setup RShunt via sysfs after the driver was initialized, for instance based on the EEPROM contents of a modular probe. The calibration register must be set accordingly. Signed-off-by: Marc Titinger <marc.titinger@baylibre.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:magnetometer:ak8975: fix missing regulator_disableGregor Boirie2016-03-201-18/+60
| | | | | | | | | | | | | | | | Ensure optional regulator is properly disabled when present. Fixes: 63d5d525cbbc ("iio:magnetometer:ak8975: power regulator support") Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: light: tsl2563: Remove flush_scheduled_workAmitoj Kaur Chawla2016-03-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | flush_scheduled_work is scheduled for deprecation. Replace cancel_delayed_work and flush_scheduled_work with cancel_delayed_work_sync instead to ensure there is no pending or running work item. Since there is only one work item, chip->poweroff_work, there are no further dependencies of flush_scheduled_work(). Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:pressure:ms5611: fix missing regulator_disableGregor Boirie2016-03-202-9/+35
| | | | | | | | | | | | | | | | Ensure optional regulator is properly disabled when present. Fixes: 3145229f9191 ("iio:pressure:ms5611: power regulator support") Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: imu: mpu6050: Fix name/chip_id when using ACPIDaniel Baluta2016-03-201-3/+26
| | | | | | | | | | | | | | | | | | | | | | When using ACPI, id is NULL and the current code automatically defaults name to NULL and chip id to 0. We should instead use the data provided in the ACPI device table. Fixes: c816d9e7a57b ("iio: imu: mpu6050: fix possible NULL dereferences") Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-By: Matt Ranostay <matt.ranostay@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: rockchip_saradc: add saradc support for rk3399David Wu2016-03-202-1/+24
| | | | | | | | | | | | | | | | The ADC is a 6-channel signal-ended 10-bit Successive Approximation Register (SAR) A/D Converter. Signed-off-by: David Wu <david.wu@rock-chips.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging: iio: isl29028: use regmap to retrieve struct deviceAlison Schofield2016-03-201-25/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Driver includes struct regmap and struct device in its global data. Remove the struct device and use regmap API to retrieve device info. Simplified version of Coccinelle semantic patch used: @ a @ identifier drvdata, r; position p; @@ struct drvdata@p { ... struct regmap *r; ... }; @ b @ identifier a.drvdata, d; position a.p; @@ struct drvdata@p { ... - struct device *d; ... }; @ passed depends on b @ identifier a.drvdata, a.r, b.d, i, f; @@ f (..., struct drvdata *i ,...) { + struct device *dev = regmap_get_device(i->r); <+... - i->d + dev ...+> } Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * tools: iio: Update iio_event_monitor namesPeter Meerwald-Stadler2016-03-201-0/+14
| | | | | | | | | | | | | | add recently added channel types and modifiers Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: use runtime pm instead of device specific autosleepMartin Kepplinger2016-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What is this autosleep? ----------------------- It slows down the device after x seconds of inactivity. The thing is, we have really achieved almost the same by runtime pm. differnces are: autosleep * uses more power during inactivity * the first read after inactivity slightly faster * complicated to understand for the user * no documented sysfs interface (afaik) * complicated to read and maintain runtime pm * already merged in mma8452 * uses less power during inactivity * first read after inactivity slower * easy to use. well documented. * easy to maintain and understand The two approaches solve the same problem. runtime pm has more advantages than autosleep and comes quite close to it's behaviour anyways. As I see it, autosleep, even if somehow supported, would never be used anyways. So resolve this issue by "ignoring" autosleep. Signed-off-by: Martin Kepplinger <martink@posteo.de> Reviewed-by: Martina Kepplinger <martina.novakovic@zoho.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: add i2c_device_id for mma8451Martin Kepplinger2016-03-201-0/+1
| | | | | | | | | | | | | | This was forgotten about and is added for consistency now Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: ABI: Fix typo in in_proximity_raw descriptionPeter Meerwald2016-03-201-1/+1
| | | | | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * MAINTAINERS: update pmeerw's namePeter Meerwald-Stadler2016-03-201-1/+1
| | | | | | | | | | | | | | happily married for 4 month :) Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * dt: document NXP LPC1850 DAC driver bindingsJoachim Eastwood2016-03-201-0/+20
| | | | | | | | | | | | Signed-off-by: Joachim Eastwood <manabian@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: dac: add NXP LPC18xx DAC driverJoachim Eastwood2016-03-123-0/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add base support for the 10-bit DAC peripheral found on NXP LPC18xx/43xx SoCs. This is a minimal driver that does not support DMA or interrupts. User manual with register description can be found on: LPC18xx: www.nxp.com/documents/user_manual/UM10430.pdf LPC43xx: www.nxp.com/documents/user_manual/UM10503.pdf Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * dt: document NXP LPC1850 ADC driver bindingsJoachim Eastwood2016-03-121-0/+21
| | | | | | | | | | Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: add NXP LPC18xx ADC driverJoachim Eastwood2016-03-123-0/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add base support for the 10-bit SAR ADC peripheral found on NXP LPC18xx/43xx SoCs. This is a minimal driver that does not support burst mode, interrupts, DMA or hardware triggers. User manual with register description can be found on: LPC18xx: www.nxp.com/documents/user_manual/UM10430.pdf LPC43xx: www.nxp.com/documents/user_manual/UM10503.pdf Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging: iio: ad7192: use iio_device_{claim|release}_direct_mode()Alison Schofield2016-03-121-18/+12
| | | | | | | | | | | | | | | | Replace the code that guarantees the device stays in direct mode with iio_device_{claim|release}_direct_mode() which does same. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: core: implement iio_device_{claim|release}_direct_mode()Alison Schofield2016-03-122-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is often the case that the driver wants to be sure a device stays in direct mode while it is executing a task or series of tasks. To accomplish this today, the driver performs this sequence: 1) take the device state lock, 2) verify it is not in a buffered mode, 3) execute some tasks, and 4) release that lock. This patch introduces a pair of helper functions that simplify these steps and make it more semantically expressive. iio_device_claim_direct_mode() If the device is not in any buffered mode it is guaranteed to stay that way until iio_release_direct_mode() is called. iio_device_release_direct_mode() Release the claim. Device is no longer guaranteed to stay in direct mode. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: mma8452: add support for FXLS8471QMartin Kepplinger2016-03-123-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for Freescale's (now NXP's) FXLS8471Q accelerometer. We use MMA8451Q's configuration because for what the driver supports, FXLS8471Q is the same. Support for FXLS8471Q's features (fast SPI interface and a larger FIFO, among others) can be added to this driver anytime. See it's datasheet for the details: http://cache.nxp.com/files/sensors/doc/data_sheet/FXLS8471Q.pdf Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: accel: Add support for the h3lis331dl accelerometerTiberiu Breana2016-03-125-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for STMicroelectronics h3lis331dl high-g accelerometer. The datasheet for this device can be found here: http://www.st.com/web/en/resource/technical/document/ datasheet/DM00053090.pdf Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Reviewed-by: Denis Ciocca <denis.ciocca@st.com> Acked-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:adis16220: Remove adis16220 driverLars-Peter Clausen2016-03-094-648/+0
| | | | | | | | | | | | | | | | | | | | The ADIS16220 part has been obsoleted, which makes it hard to get the hardware to even test the driver. Considering this there is no expectation that the driver will be cleaned up and be able to move out of staging, so remove the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:adis16204: Remove adis16204 driverLars-Peter Clausen2016-03-094-336/+0
| | | | | | | | | | | | | | | | | | | | The ADIS16204 part has been obsoleted, which makes it hard to get the hardware to even test the driver. Considering this there is no expectation that the driver will be cleaned up and be able to move out of staging, so remove the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: Fix build error of missing devm_ioremap_resource on UMKrzysztof Kozlowski2016-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | The devres.o gets linked if HAS_IOMEM is present so on ARCH=um allyesconfig (COMPILE_TEST) failed with: drivers/built-in.o: In function `at91_adc_probe': at91-sama5d2_adc.c:(.text+0x48f548): undefined reference to `devm_ioremap_resource' Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: imu: mpu6050: fix possible NULL dereferencesMatt Ranostay2016-03-052-2/+4
| | | | | | | | | | | | | | Fix possible null dereferencing of i2c and spi driver data. Signed-off-by: Matt Ranostay <matt.ranostay@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud