summaryrefslogtreecommitdiffstats
path: root/drivers/iio
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | iio: st-accel: add support for lsm303agr accelerometerGiuseppe Barba2015-07-234-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the lsm303agr accelerometer. Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com> Acked-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: st_magn: Add irq trigger handlingGiuseppe Barba2015-07-233-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add irq trigger handling for magnetometer also Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com> Acked-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: st-sensors: add support for single full scale deviceGiuseppe Barba2015-07-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some sensors could have only one full scale value. This means that the sensor hasn't a full scale register. This commit add a check on the configured full scale address to support such kind of sensors. Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com> Acked-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: st-sensors: add configuration for WhoAmI addressGiuseppe Barba2015-07-235-26/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch permits to configure the WhoAmI register address because some device could have not a standard address for this register. Signed-off-by: Giuseppe Barba <giuseppe.barba@st.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>
| * | | iio: fix drivers that consider 0 as a valid IRQ in client->irqOctavian Purdila2015-07-234-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since patch "i2c / ACPI: Use 0 to indicate that device does not have interrupt assigned" [1], 0 is not a valid i2c client irq anymore, so change all driver's checks accordingly. The same issue occurs when the device is instantiated via device tree with no IRQ, or from the i2c sysfs interface, even before the patch above. [1] http://lkml.kernel.org/g/<1430908148-201129-3-git-send-email-mika.westerberg@linux.intel.com> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: light: Add support for TXC PA12 als and proximity sensorAdriana Reus2015-07-203-0/+495
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for TXC PA12203001 als and proximity sensor. Support for raw illuminance and proximity readings. Signed-off-by: Adriana Reus <adriana.reus@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: light: add support for TI's opt3001 light sensorAndreas Dannenberg2015-07-203-0/+815
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TI's opt3001 light sensor is a simple and yet powerful little device. The device provides 99% IR rejection, automatic full-scale, very low power consumption and measurements from 0.01 to 83k lux. This patch adds support for that device using the IIO framework. See http://www.ti.com/product/opt3001 for more information. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: dht11: Use new function ktime_get_resolution_ns()Harald Geyer2015-07-201-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up the most ugly workaround in this driver. There are no functional changes yet in the decoding algorithm, but we improve the following things: * Get rid of spurious warning messages on systems with fast HRTIMER. * If the clock is not fast enough for decoding to work, we give up immediately. * In that case we return EAGAIN instead of EIO, so it's easier to discriminate causes of failure. Returning EAGAIN is somewhat controversial: It's technically correct as a faster clock might become available. OTOH once all clocks are enabled this is a permanent error. There is no ECLOCKTOOSLOW error code. Signed-off-by: Harald Geyer <harald@ccbib.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: dht11: avoid multiple assignments to make checkpatch.pl --strict happyHarald Geyer2015-07-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We just do the assignments in two steps. Signed-off-by: Harald Geyer <harald@ccbib.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: dht11: add comment to make checkpatch.pl --strict happyHarald Geyer2015-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Explain why the driver needs a mutex. Signed-off-by: Harald Geyer <harald@ccbib.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: dht11: whitespace changes to make checkpatch.pl --strict happyHarald Geyer2015-07-201-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add spaces around binary operators in cases where it reduces readability * align multiline statements around opening parenthesis Reported-by: Hartmut Knaack <knaack.h@gmx.de> in Message-ID: <55919E72.3010807@gmx.de> Signed-off-by: Harald Geyer <harald@ccbib.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: adc: vf610: Determine sampling frequencies by using minimum sample timeSanchayan Maity2015-07-201-4/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver currently does not take into account the minimum sample time as per the Figure 6-8 Chapter 9.1.1 12-bit ADC electrical characteristics. We set a static amount of cycles instead of considering the sample time as a given value, which depends on hardware characteristics. Determine sampling frequencies by first reading the device tree property node and then calculating the required Long Sample Time Adder (LSTAdder) value, based on the ADC clock frequency and sample time value obtained from the device tree. This LSTAdder value is then used for calculating the sampling frequencies possible. In case the sample time property is not specified through the device tree, a safe default value of 1000ns is assumed. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Acked-by: Stefan Agner <stefan@agner.ch> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: adc: mcp320x: Add support for mcp3301Andrea Galbusera2015-07-202-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for Microchip's 13 bit 1 channel AD converter MCP3301 Signed-off-by: Andrea Galbusera <gizero@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:magnetometer:bmc150_magn: replace magic valueHartmut Knaack2015-07-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Construct the scanmask using its descriptive axis names (as used in iio_chan_spec) instead of a 'magic' value. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: magnetometer: mmc35240: Add DT bindingJandy Gou2015-07-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jandy Gou <qingsong.gou@ck-telecom.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:light:acpi-als: add missing prefixesHartmut Knaack2015-07-191-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some macros and a function were missing the acpi_als_ prefix, so add it. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | | | Merge 4.2-rc4 into staging-nextGreg Kroah-Hartman2015-07-278-26/+31
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | We want the iio and other fixes in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | iio:light:stk3310: make endianness independent of hostHartmut Knaack2015-07-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Data is stored in the device in be16 format. Make use of be16_to_cpu and cpu_to_be16 to have correct endianness on any host architecture. 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: move device register to end of probeHartmut Knaack2015-07-191-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iio_device_register should be the last operation during probe. Therefor move up interrupt setup code and while at it, change the check for invalid values of client->irq to be smaller than zero. Fixes: 3dd477acbdd1 ("iio: light: Add threshold interrupt support for STK3310") As the device_register makes the userspace interfaces of the device available it is possible for requests to come in before the probe sequence has finished. This can lead to unhandled interrupts and similar. 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: mma8452: use iio event type IIO_EV_TYPE_MAGMartin Kepplinger2015-07-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IIO_EV_TYPE_THRESH in rising direction describes an event where the threshold is crossed in rising direction, positive or negative values being possible. This is not the case here. Since the threshold is no signed value and only the magnitude is compared, IIO_EV_TYPE_MAG is what describes the behaviour of these devices, see the sysfs-bus-iio ABI Documentation. Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: mcp320x: Fix NULL pointer dereferenceManfred Schlaegl2015-07-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On reading in_voltage_scale of we got an NULL pointer dereference Oops. The reason for this is, that mcp320x_read_raw tries to access chip_info->resolution from struct mcp320x, but chip_info is never set. chip_info was never set since the driver was added, but there was no acute problem, because it was not referenced. The acute problem exists since b12206e917ac34bec41b9ff93d37d8bd53a2b3bc iio: adc: mcp320x. Add support for more ADCs This patch fixes the issue by setting chip_info in mcp320x_probe. Signed-off-by: Manfred Schlaegl <manfred.schlaegl@gmx.at> Reviewed-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: adc: vf610: fix the adc register read fail issueFugang Duan2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read the register only when the adc register address is 4 byte aligned. (rather than the other way around). Signed-off-by: Haibo Chen <haibo.chen@freescale.com> Signed-off-by: Fugang Duan <B38611@freescale.com> Cc: <Stable.vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: mlx96014: Replace offset signCrt Mori2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the offset to negative as usual equation is: (raw + offset)*scale and in this case offset should be negative (as we deduct 273.15 Kelvin to get temperature in Celsius). Signed-off-by: Crt Mori <cmo@melexis.com> Acked-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: magnetometer: mmc35240: fix SET/RESET sequenceViorel Suman2015-07-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RESET operation invoked in the last instance will align in the natural way all 3 axis and the chip top view. Without this, north and south are swapped. Signed-off-by: Viorel Suman <viorel.suman@intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: magnetometer: mmc35240: Fix SET/RESET maskDaniel Baluta2015-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes setting the SET/RESET bit in the REG_CTRL0 register. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: magnetometer: mmc35240: Fix crash in pm suspendDaniel Baluta2015-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We must set i2c client private data at probe in order to correctly retrieve it in pm suspend/resume, preventing the following crash: [ 321.790582] PM: Syncing filesystems ... done. [ 322.364440] PM: Preparing system for mem sleep [ 322.400047] PM: Entering mem sleep [ 322.462178] BUG: unable to handle kernel NULL pointer dereference at 0000036c [ 322.469119] IP: [<80e0b3d2>] mmc35240_suspend+0x12/0x30 [ 322.474291] *pdpt = 000000002fd6f001 *pde = 0000000000000000 [ 322.479967] Oops: 0000 1 PREEMPT SMP [ 322.496516] task: a86d0df0 ti: a8766000 task.ti: a8766000 [ 322.570744] Call Trace: [ 322.573217] [<80c0d2d1>] pm_generic_suspend+0x21/0x30 [ 322.578284] [<80d042ab>] i2c_device_pm_suspend+0x1b/0x30 Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:magnetometer:bmc150_magn: output intended variableHartmut Knaack2015-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the debug/error string, the content of chip_id is supposed to be output, rather than the return value of the previous operation. 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:magnetometer:bmc150_magn: add regmap dependencyHartmut Knaack2015-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bmc150_magn makes use of REGMAP_I2C, so select it to build always without errors. 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: tmp006: Check channel info on writePeter Meerwald2015-07-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only SAMP_FREQ is writable Will lead to SAMP_FREQ being written by any attempt to write to the other exported attributes and hence a rather unexpected result! Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: sx9500: Add missing init in sx9500_buffer_pre{en,dis}able()Geert Uytterhoeven2015-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/iio/proximity/sx9500.c: In function ‘sx9500_buffer_preenable’: drivers/iio/proximity/sx9500.c:682: warning: ‘ret’ may be used uninitialized in this function drivers/iio/proximity/sx9500.c: In function ‘sx9500_buffer_predisable’: drivers/iio/proximity/sx9500.c:706: warning: ‘ret’ may be used uninitialized in this function If active_scan_mask is empty, it will loop once more over all channels, doing nothing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:light:ltr501: fix regmap dependencyHartmut Knaack2015-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of regmap in commit 2f2c96338afc requires REGMAP_I2C to be selected, in order to meet all dependencies. Fixes: 2f2c96338afc ("iio: ltr501: Add regmap support.") Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:light:ltr501: fix variable in ltr501_initHartmut Knaack2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When filling data->als_contr, the register content read into status needs to be used, instead of the return status value of regmap_read. Fixes: 8592a7eefa540 ("iio: ltr501: Add support for ltr559 chip") Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: sx9500: fix bug in compensation codeVlad Dogaru2015-07-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial compensation was mistakingly toggling an extra bit in the control register. Fix this and make sure it's less likely to happen by introducing an additional macro. Reported-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: sx9500: rework error handling of raw readingsVlad Dogaru2015-07-191-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error handling so that we can power the chip down even if a raw read fails. Reported-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: magnetometer: mmc35240: fix available sampling frequenciesTeodora Baluta2015-07-191-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the sampling frequencies according to the datasheet (page 8). The datasheet specifies the following available frequencies for continuous mode: 1.5 Hz, 13 Hz, 25 Hz, and 50 Hz. Also fix comments about the ODR to comply with datasheet. Signed-off-by: Teodora Baluta <teodora.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:light:stk3310: Fix REGMAP_I2C dependencyHartmut Knaack2015-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stk3310 driver makes use of regmap_i2c, so this dependency needs to be reflected in Kconfig. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: light: STK3310: un-invert proximity valuesTiberiu Breana2015-07-191-36/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In accordance with the recent proximity ABI changes, STK3310's proximity readings should be un-inversed in order to return low values for far-away objects and high values for close ones. As consequences of this change, iio event directions have been switched and maximum proximity sensor reference values have also been adjusted in accordance with the real readings. Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:adc:cc10001_adc: fix Kconfig dependencyHartmut Knaack2015-07-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Cosmic Circuits 10001 ADC driver depends on HAS_IOMEM, HAVE_CLK and REGULATOR together, not just any of these. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: light: tcs3414: Fix bug preventing to set integration timePeter Meerwald2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the millisecond values in tcs3414_times should be checked against val2, not val, which is always zero. Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reported-by: Stephan Kleisinger <stephan.kleisinger@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:accel:bmc150-accel: fix counting directionHartmut Knaack2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In bmc150_accel_unregister_triggers() triggers should be unregistered in reverse order of registration. Trigger registration starts with number 0, counting up. In consequence, trigger number needs to be count down here. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Octavian Purdila <octavian.purdila@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio:light:cm3323: clear bitmask before setHartmut Knaack2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting the bits for integration time, the appropriate bitmask needs to be cleared first. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: adc: at91_adc: allow to use full range of startup timeJan Leupold2015-07-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DT-Property "atmel,adc-startup-time" is stored in an u8 for a microsecond value. When trying to increase the value of STARTUP in Register AT91_ADC_MR some higher values can't be reached. Change the type in function parameter and private structure field from u8 to u32. Signed-off-by: Jan Leupold <leupold@rsi-elektrotechnik.de> [nicolas.ferre@atmel.com: change commit message, increase u16 to u32 for startup time] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: DAC: ad5624r_spi: fix bit shift of output data valueJM Friedt2015-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value sent on the SPI bus is shifted by an erroneous number of bits. The shift value was already computed in the iio_chan_spec structure and hence subtracting this argument to 16 yields an erroneous data position in the SPI stream. Signed-off-by: JM Friedt <jmfriedt@femto-st.fr> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: proximity: sx9500: Fix proximity valueDaniel Baluta2015-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the ABI confusion proximity value exposed by SX9500 was inverted. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: inv-mpu: Specify the expected format/precision for write channelsAdriana Reus2015-07-191-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gyroscope needs IIO_VAL_INT_PLUS_NANO for the scale channel and unless specified write returns MICRO by default. This needs to be properly specified so that write operations into scale have the expected behaviour. Signed-off-by: Adriana Reus <adriana.reus@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: twl4030-madc: Pass the IRQF_ONESHOT flagFabio Estevam2015-07-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Cc: <stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: adc: rockchip_saradc: add missing MODULE_* dataHeiko Stuebner2015-07-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The module-data is currently missing. This includes the license-information which makes the driver taint the kernel and miss symbols when compiled as module. Fixes: 44d6f2ef94f9 ("iio: adc: add driver for Rockchip saradc") Signed-off-by: Heiko Stuebner <heiko@sntech.de> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | hid-sensor: Fix suspend/resume delaySrinivas Pandruvada2015-07-191-1/+10
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default all the sensors are runtime suspended state (lowest power state). During Linux suspend process, all the run time suspended devices are resumed and then suspended. This caused all sensors to power up and introduced delay in suspend time, when we introduced runtime PM for HID sensors. The opposite process happens during resume process. To fix this, we do powerup process of the sensors only when the request is issued from user (raw or tiggerred). In this way when runtime, resume calls for powerup it will simply return as this will not match user requested state. Note this is a regression fix as the increase in suspend / resume times can be substantial (report of 8 seconds on Len's laptop!) Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Tested-by: Len Brown <len.brown@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | | Merge 4.2-rc3 into staging-nextGreg Kroah-Hartman2015-07-2016-77/+103
|\ \ \ | |_|/ |/| | | | | | | | | | | We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | Merge tag 'iio-fixes-for-4.2b' of ↵Greg Kroah-Hartman2015-07-136-63/+58
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for the 4.2 cycle. Note these depend (mostly) on material in the recent merge window, hence their separation from set (a) as the fixes-togreg branch predated the merge window. I am running rather later with these than I would have liked hence the large set. * stk3310 fixes from Hartmut's review that came in post merge - fix direction of proximity inline with recent documentation clarification. - fix missing REGMAP_I2C dependency - rework the error handling for raw readings to fix an failure to power down in the event of a raw reading failing. - fix a bug in the compensation code which was toggling an extra bit in the register. * mmc35240 - reported samplign frequencies were wrong. * ltr501 fixes - fix a case of returning the return value of a regmap_read instead of the value read. - fix missing regmap dependency * sx9500 - fix missing default values for ret in a couple of places to handle the case of no enabled channels. * tmp006 - check that writes to info_mask elements are actually to writable ones. Otherwise, writing to any of them will change the sampling frequency.
OpenPOWER on IntegriCloud