summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'fixes-for-3.13a' of ↵Greg Kroah-Hartman2013-11-251-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First round of fixes for IIO in the 3.13 cycle. The usual mixed bag of fixes. * 3 cases where kconfig dependencies were missing. We need to keep a closer eye on this in new drivers. * hid_sensors was abusing the iio_dev->trigger pointer. We had a round of clearing this out some time ago but this driver clearly slipped through. * A misuse of the IIO_ST macro, in mcp3422, which we should really make a concertive effort to finish removing. * Avoid a double free introduced by recent buffer reference counting in the one driver that (quite reasonably!) does things differently (am335x) * A missing mutex_unlock in kxsd9 that means that driver has been non functional for some time and no one noticed (including me who for once actually has one of the supported devices). * An incorrect assumption about the parameters of sign_extend32 in mcp3422. So nothing controversial. The only substantial patch is the hid_sensors one and that is actually just adding a new pointer to the devices private state then moving the code over to it.
| * staging:iio: Fix hmc5843 Kconfig dependenciesPeter Meerwald2013-11-091-0/+2
| | | | | | | | | | | | | | | | trigger / buffer handling was introduced in changeset cb9b9a82 staging:iio:hmc5843: Add trigger handling Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | Merge branch 'for-linus' of ↵Linus Torvalds2013-11-151-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual earth-shaking, news-breaking, rocket science pile from trivial.git" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits) doc: usb: Fix typo in Documentation/usb/gadget_configs.txt doc: add missing files to timers/00-INDEX timekeeping: Fix some trivial typos in comments mm: Fix some trivial typos in comments irq: Fix some trivial typos in comments NUMA: fix typos in Kconfig help text mm: update 00-INDEX doc: Documentation/DMA-attributes.txt fix typo DRM: comment: `halve' -> `half' Docs: Kconfig: `devlopers' -> `developers' doc: typo on word accounting in kprobes.c in mutliple architectures treewide: fix "usefull" typo treewide: fix "distingush" typo mm/Kconfig: Grammar s/an/a/ kexec: Typo s/the/then/ Documentation/kvm: Update cpuid documentation for steal time and pv eoi treewide: Fix common typo in "identify" __page_to_pfn: Fix typo in comment Correct some typos for word frequency clk: fixed-factor: Fix a trivial typo ...
| * | treewide: Fix common typo in "identify"Maxime Jayat2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Correct common misspelling of "identify" as "indentify" throughout the kernel Signed-off-by: Maxime Jayat <maxime@artisandeveloppeur.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang2013-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge tag 'spi-v3.13' of ↵Linus Torvalds2013-11-123-6/+3
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "As well as the usual driver updates and cleanups there's a few improvements to the core here: - The start of some improvements to factor out more of the SPI message loop into the core. Right now this is just simplifying the code a bit but hopefully next time around we'll also have managed to roll out some noticable performance improvements which drivers can take advantage of. - Support for loading modules for ACPI enumerated SPI devices. - Managed registration for SPI controllers. - Helper for another common I/O pattern" * tag 'spi-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (116 commits) spi/hspi: add device tree support spi: atmel: fix return value check in atmel_spi_probe() spi: spi-imx: only enable the clocks when we start to transfer a message spi/s3c64xx: Fix doubled clock disable on suspend spi/s3c64xx: Do not ignore return value of spi_master_resume/suspend spi: spi-mxs: Use u32 instead of uint32_t spi: spi-mxs: Don't set clock for each xfer spi: spi-mxs: Clean up setup_transfer function spi: spi-mxs: Remove check of spi mode bits spi: spi-mxs: Fix race in setup method spi: spi-mxs: Remove bogus setting of ssp clk rate field spi: spi-mxs: Remove full duplex check, spi core already does it spi: spi-mxs: Fix chip select control bits in DMA mode spi: spi-mxs: Fix extra CS pulses and read mode in multi-transfer messages spi: spi-mxs: Change flag arguments in txrx functions to bit flags spi: spi-mxs: Always clear INGORE_CRC, to keep CS asserted spi: spi-mxs: Remove mxs_spi_enable and mxs_spi_disable spi: spi-mxs: Always set LOCK_CS spi/s3c64xx: Add missing pm_runtime_put on setup fail spi/s3c64xx: Add missing pm_runtime_set_active() call in probe() ...
| * | staging:iio:ade7753/ade7754/ade7759: Use spi_w8r16be() instead of spi_w8r16()Lars-Peter Clausen2013-10-033-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using spi_w8r16be() will do the conversion of the result from big endian to native endian in the helper function. This makes the code a bit smaller and also keeps sparse happy. Fixes the following sparse warnings: drivers/staging/iio/meter/ade7753.c:97:29: warning: incorrect type in argument 1 (different base types) drivers/staging/iio/meter/ade7753.c:97:29: expected restricted __be16 const [usertype] *p drivers/staging/iio/meter/ade7753.c:97:29: got unsigned short [usertype] *val drivers/staging/iio/meter/ade7754.c:97:29: warning: incorrect type in argument 1 (different base types) drivers/staging/iio/meter/ade7754.c:97:29: expected restricted __be16 const [usertype] *p drivers/staging/iio/meter/ade7754.c:97:29: got unsigned short [usertype] *val drivers/staging/iio/meter/ade7759.c:97:29: warning: incorrect type in argument 1 (different base types) drivers/staging/iio/meter/ade7759.c:97:29: expected restricted __be16 const [usertype] *p drivers/staging/iio/meter/ade7759.c:97:29: got unsigned short [usertype] *val Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | staging: Remove OOM message after input_allocate_deviceJoe Perches2013-10-291-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Emitting an OOM message isn't necessary after input_allocate_device as there's a generic OOM and a dump_stack already done. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | Merge tag 'iio-for-3.13e' of ↵Greg Kroah-Hartman2013-10-271-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Fifth round of IIO new drivers, cleanups and functionality for the 3.13 cycle. New Driver * Freescale mag3110 magnetometer driver. New functionality * Add LPS001WP support to the ST pressure driver. * Allow the max1363 driver to use only smbus functions for 8 bit devices. This allows the driver to be used when more extensive i2c support is not available. Cleanups * Fix incorrect description of unit conversions in ak8975. * Switch to pr_err in industrialio-core.c instead of direct printk calls. * Some simple redundant error handling removal patches. * Trivial warning suppression by adding brackets to a sizeof call. * Drop redundant of_match_ptr casts in drivers that are dependent on OF supporting being present. The only purpose of the of_match_ptr wrapper was to make stubbing out of the relevant structures trivial. Fixes * Make MXS_LRADC depend on INPUT to avoid compile failures. This fixes an issue introduced in the previous pull in this cycle.
| * | | staging/iio/adc: MXS_LRADC depends on INPUTRandy Dunlap2013-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mxs-lradc.c uses many input_() functions so it should depend on INPUT to fix build errors. drivers/built-in.o: In function `mxs_lradc_ts_unregister': drivers/staging/iio/adc/mxs-lradc.c:905: undefined reference to `input_unregister_device' drivers/staging/iio/adc/mxs-lradc.c:905: undefined reference to `input_unregister_device' drivers/built-in.o: In function `input_report_abs': include/linux/input.h:399: undefined reference to `input_event' include/linux/input.h:399: undefined reference to `input_event' include/linux/input.h:399: undefined reference to `input_event' drivers/built-in.o: In function `input_report_key': include/linux/input.h:389: undefined reference to `input_event' drivers/built-in.o: In function `input_sync': include/linux/input.h:414: undefined reference to `input_event' drivers/built-in.o:include/linux/input.h:389: more undefined references to `input_event' follow Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | | | Staging: iio: fix printk(KERN_ERR .. in lis3l02dq_core.cEbru Akagunduz2013-10-271-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix checkpatch.pl issues with prefer netdev_err(netdev, .. then dev_err(dev, .. then pr_err(.. to printk(KERN_ERR in lis3l02dq_core.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | Merge tag 'iio-for-3.12d' of ↵Greg Kroah-Hartman2013-10-1921-819/+783
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Fourth round of IIO new drivers, functionality and cleanups for the 3.13 cycle. New Drivers * cm36651 combined RGB light and proximity sensor. Core improvements * Some more fixes and cleanups related to buffers. These include the second half of a series which went is as fixes. The basis for delaying until the next merge window is that some are too invasive for this late in a cycle and others only effect code paths current unused in the mainline tree. In this case we have: * protecting against concurrent userspace access * fixing a memory leak if a device goes away * avoiding always reallocating the buffer whether or not it has changed (a bug fix, but one with no functional changes other than a small speed improvement.) * Add reference counting for buffers to ensure they hang around if open from userspace or in kernel when the device is forcefully removed. * Return -ENODEV for buffer access operations when the device has gone away. * Add proper locking for iio_update_buffers (currently we only have one buffer per device in mainline, but an input bridge driver is under development which would make this bug 'real'.) * Wake up anyone waiting on a buffer if the device is unregistered. A subsequent read will fail, notifying userspace that the device is no longer there rather than having it wait possibly for ever. * Move the iio_sw_preenable functionality into the core. This avoids drivers having to 'know' about how the buffers are implemented and is called by almost all drivers anyway. Those that don't call it are not harmed by it being called. * New registration approach for information (i.e. sysfs attributes) about events. Much more generic and now similar to how the equivalent is handled for channel information. The events infrastructure had been left behind by other changes so this brings it back in line. * Using the new events registration approach, add a hysterisis event_info element and apply this to those drivers with this property. * A little unitialized variable bug in the generic_buffer.c example. * Factor out the code for freeing lists of IIO Device attributes to avoid some repitition. Driver cleanups * At91 driver gains touch screen support and some related fixes. * Follow up series of patches removing the now redundant iio_sw_buffer_preenable calls. * Lots of conversions to the new event registration methods. * Another round of hmc5843 cleanups as that driver moves towards graduating from staging. * Make some SoC drivers buildable if COMPILE_TEST is used. Follow up fixes for a few bits and bobs that revealed. * Add explicit includes of linux/of.h to those drivers making us of linux/of.h
| * | | staging:iio:hmc5843: Trivial cleanupPeter Meerwald2013-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Check initialization and chip identifierPeter Meerwald2013-10-171-6/+27
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Introduce _set_range_gain()Peter Meerwald2013-10-171-12/+17
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Rename _set_rate() to _set_samp_freq()Peter Meerwald2013-10-171-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | move locking inside _set() function Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Reorganize _set_meas_conf()Peter Meerwald2013-10-171-25/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | move locking inside _set() function Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Rename _configure() to _set_mode()Peter Meerwald2013-10-171-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and be consistent with other setter functions in that first argument is hmc5843_data Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Remove ability to change operating modePeter Meerwald2013-10-171-68/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only continuous mode is supported for now; the driver could/should be switched to single conversion mode operating mode should be determined by the way IIO accesses the device and not exposed explicitly Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Add trigger handlingPeter Meerwald2013-10-171-8/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v3: * use __be16 instead of s16 v2 (thanks to Jonathan Cameron): * drop dynamic buffer allocation, buffer is in hmc5842_data * grab timestamp near data acquisition * restrict available scan masks (only read all axis) Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Always read all channels values otherwise no updatesPeter Meerwald2013-10-171-21/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: * use __be16 instead of s16 Split out data ready/wait for read measurement fix bug in case reading status register fails Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Rename _check_samp_freq to get_samp_freq_indexPeter Meerwald2013-10-171-31/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and drop/inline helper functions _check_int_plus_micros() and _show_int_plus_micros() Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:hmc5843: Use SCALE instead of magn_rangePeter Meerwald2013-10-171-101/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v3: * rename _check_scale() to _get_scale_index() v2: * use SCALE instead of CALIBSCALE to control the range/gain of measurements Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:spear_adc: Fix IRQ checkLars-Peter Clausen2013-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test in the spear_adc driver which checks whether the IRQ number returned by platform_get_irq() has multiple problems. It accepts 0 even though this is an invalid IRQ. It also rejects IRQ numbers that are larger or equal than NR_IRQS. First of all drivers should never need to reference NR_IRQS and secondly with CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check might reject valid IRQ numbers. This patch modifies the check to only test against less or equal to 0. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:lpc32xx_adc: Fix IRQ checkLars-Peter Clausen2013-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test in the lpc32xx_adc driver which checks whether the IRQ number returned by platform_get_irq() has multiple problems. It accepts 0 even though this is an invalid IRQ. It also rejects IRQ numbers that are larger or equal than NR_IRQS. First of all drivers should never need to reference NR_IRQS and secondly with CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check might reject valid IRQ numbers. This patch modifies the check to only test against less or equal to 0. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:ade7758: Remove redundant call to iio_sw_buffer_preenable()Lars-Peter Clausen2013-10-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core, so there is no need to do this from the driver anymore. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:ad5933: Remove redundant call to iio_sw_buffer_preenable()Lars-Peter Clausen2013-10-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core, so there is no need to do this from the driver anymore. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:simple-dummy: Remove redundant call to iio_sw_buffer_preenable()Lars-Peter Clausen2013-10-161-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core, so there is no need to do this from the driver anymore. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:mxs-lradc: Remove redundant call to iio_sw_buffer_preenable()Lars-Peter Clausen2013-10-161-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core, so there is no need to do this from the driver anymore. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:lis3l02dq: Remove redundant call to iio_sw_buffer_preenable().Lars-Peter Clausen2013-10-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core, so there is no need to do this from the driver anymore. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio: Allow to build SoC specific drivers when COMPILE_TEST is setLars-Peter Clausen2013-10-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of the SPEAr, LPC32XX or MXS ADC drivers have a compile time dependency on their respective platform. So make it possible to build the drivers when CONFIG_COMPILE_TEST is set. This makes it easier to compile test changes. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Marek Vasut <marex@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:mxs-lradc: Select STMP_DEVICELars-Peter Clausen2013-10-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MXS ADC driver uses the stmp_reset_block() which is only provided when the STMP_DEVICE Kconfig symbol is selected. Hence the driver should select this symbol. So far this has not been a problem since the driver depends on ARCH_MXS, which already selects STMP_DEVICE, but will become necessary once we allow the driver to be built when COMPILE_TEST is selected. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:spear_adc: Fix sparse warningLars-Peter Clausen2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver is casting from one __iomem pointer to another. Make sure to include __iomem in the cast, otherwise sparse will complain with the following warning: drivers/staging/iio/adc/spear_adc.c:321:18: warning: cast removes address space of expression drivers/staging/iio/adc/spear_adc.c:320:33: warning: incorrect type in assignment (different address spaces) drivers/staging/iio/adc/spear_adc.c:320:33: expected struct adc_regs_spear3xx [noderef] <asn:2>*adc_base_spear3xx drivers/staging/iio/adc/spear_adc.c:320:33: got struct adc_regs_spear3xx *<noident> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:spear_adc: Remove unused variableLars-Peter Clausen2013-10-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the scale_mv variable from the read_raw() callback. Fixes the following warning: drivers/staging/iio/adc/spear_adc.c: In function 'spear_read_raw': drivers/staging/iio/adc/spear_adc.c:149:6: warning: unused variable 'scale_mv' Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:ad7291: Use event spec for threshold hysteresisLars-Peter Clausen2013-10-121-111/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register the event threshold hysteresis attributes by using the new IIO_EV_INFO_HYSTERESIS event spec type. This allows us to throw away a good portion of boiler-plate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:ad799x: Use event spec for threshold hysteresisLars-Peter Clausen2013-10-121-103/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register the event threshold hysteresis attributes by using the new IIO_EV_INFO_HYSTERESIS event spec type. This allows us to throw away a good portion of boiler-plate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:ad799x: Simplify threshold register look-upLars-Peter Clausen2013-10-122-32/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a channel number the corresponding threshold and hysteresis registers can easily be calculated. No need to use a look-up table. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:tsl2x7x: Switch to new event config interfaceLars-Peter Clausen2013-10-121-47/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the tsl2x7x driver to the new IIO event config interface as the old one is going to be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Jon Brenner <jbrenner@taosinc.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:simple_dummy: Switch to new event config interfaceLars-Peter Clausen2013-10-123-31/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the simple_dummy driver to the new IIO event config interface as the old one is going to be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:ad7150: Switch to new event config interfaceLars-Peter Clausen2013-10-121-64/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the ad7150 driver to the new IIO event config interface as the old one is going to be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:ad799x: Switch to new event config interfaceLars-Peter Clausen2013-10-121-60/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the ad799x driver to the new IIO event config interface as the old one is going to be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:ad7291: Switch to new event config interfaceLars-Peter Clausen2013-10-121-37/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the ad7291 driver to the new IIO event config interface as the old one is going to be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:sca3000: Switch to new config interfaceLars-Peter Clausen2013-10-121-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the sca3000 driver to the new IIO event config interface as the old one is going to be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:lis2l02dq: Share threshold value between axisLars-Peter Clausen2013-10-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The threshold event can be enabled/disabled separately, but the threshold value is shared between all three axis. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging:iio:lis3l02dq: Switch to new event config interfaceLars-Peter Clausen2013-10-121-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the lis3l02dq driver to the new IIO event config interface as the old one is going to be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | staging: iio: generic_buffer: initialize retSebastian Andrzej Siewior2013-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `ret´ variable is only initialized in the error case. For some reason it was always != 0 while I played with generic_buffer so here is a patch. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * | | iio: Add reference counting for buffersLars-Peter Clausen2013-10-125-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the buffer is accessed by userspace we can not just free the buffers memory once we are done with it in kernel space. There might still be open file descriptors and userspace still might be accessing the buffer. This patch adds support for reference counting to the IIO buffers. When a buffer is created and initialized its initial reference count is set to 1. Instead of freeing the memory of the buffer the buffer's _free() function will drop that reference again. But only after the last reference to the buffer has been dropped the buffer the buffer's memory will be freed. The IIO device will take a reference to its primary buffer. The patch adds a small helper function for this called iio_device_attach_buffer() which will get a reference to the buffer and assign the buffer to the IIO device. This function must be used instead of assigning the buffer to the device by hand. The reference is only dropped once the IIO device is freed and we can be sure that there are no more open file handles. A reference to a buffer will also be taken whenever the buffer is active to avoid the buffer being freed while data is still being send to it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | | | staging: Remove unnecessary semicolonsJoe Perches2013-10-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These aren't necessary after switch, if and while statements. Also remove some unnecessary braces where these semicolons were removed around single statement and some unnecessary blank lines. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | | Staging: iio: fix sizeof *ring should be sizeof(*ring)Ebru Akagunduz2013-10-111-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Fix checkpatch.pl issues with sizeof *ring should be sizeof(*ring) in sca3000_ring.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | Staging: iio: adt7316-i2c: quoted string split across linesEbru Akagunduz2013-10-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix checkpatch.pl issues with quoted string split across lines in adt7316-i2c.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud