summaryrefslogtreecommitdiffstats
path: root/drivers/iio
Commit message (Collapse)AuthorAgeFilesLines
* iio: at91_adc: fix missing Sample and Hold timeJean-Christophe PLAGNIOL-VILLARD2013-04-021-1/+14
| | | | | | | | | | | On the at91_adc a minimal Sample and Hold Time is necessary for the ADC to guarantee the best converted final value between two channels selection. This time has to be programmed through the bitfield SHTIM in the Mode Register ADC_MR. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: at91_adc: add sleep mode supportJean-Christophe PLAGNIOL-VILLARD2013-04-021-9/+10
| | | | | | | | | The sleep mode will allow to put the adc in sleep between conversion. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: at91_adc: add low and high res supportLudovic Desroches2013-04-021-4/+70
| | | | | | | | | | | at91 adc offers the choice between two resolutions: low and high. The low and high resolution values depends on adc IP version, as many IP properties have been exposed through device tree, these settings have also been added to the dt bindings. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:magnetometer:ak8975 move driver out of stagingJonathan Cameron2013-04-023-0/+497
| | | | | | | | Issues raised in last series to propose this have now been resolved so there should be no reason this driver cannot graduate from staging. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
* iio: exynos_adc: Remove redundant of_match_ptr macroSachin Kamat2013-03-291-1/+1
| | | | | | | | exynos_adc is a DT only driver and exynos_adc_match table is always compiled in. Hence remove the macro. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:trigger: Introduce iio_tigger_{set,get}_drvdataLars-Peter Clausen2013-03-259-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce iio_tigger_{set,get}_drvdata which allows to attach driver specific data to a trigger. The functions wrap access to the triggers private_data field and all current users are updated to use iio_tigger_{set,get}_drvdata instead of directly accessing the private_data field. This is the first step towards removing the private_data field from the iio_trigger struct. The following coccinelle script has been used to update the drivers: <smpl> @@ struct iio_trigger *trigger; expression priv; @@ -trigger->private_data = priv +iio_trigger_set_drv_data(trigger, priv) @@ struct iio_trigger *trigger; @@ -trigger->private_data +iio_trigger_get_drv_data(trigger) </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge tag 'iio-for-3.10a' of ↵Greg Kroah-Hartman2013-03-2552-253/+1292
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of IIO new drivers and cleanup for the 3.10 cycle. New stuff 1) Add OF support for specifying mappings between iio devices and their in kernel consumers. 2) Driver for AD7923 (extra functionality and support for ad7904, ad7914 and ad7924 added later in series) 3) Driver for Exynos adc (dt suppor for phy added later in series). 4) Make iio_push_event save IRQ context - necessary if it is to be used within an interrupt handler. Users of this functionality to follow. 5) For iio use the device tree node name to provide the hwmon name attribute if available. Removal and moves out of staging 1) Drop the adt7410 driver from IIO now that there is a hmwon driver with equivalent support. This device is very much targeted at hardware monitoring so hwmon is a more appropriate host for the driver. 2) Move iio_hwmon driver to drivers/hwmon. Cleanups 1) Minor cleanup in ST common library. 2) Large set of patches to break the info_mask element which previously used odd and even bits to specify if a channel attribute was either shared across similar channels or specific to only one. Now we have two bitmaps, one for those parameters that are specific to this channel and one for those shared by all channels with the same type as this one. This has no effect on the userspace abi. It simplifies the core code and provides more space for new channel parameters. It has been on the todo list for a long time! Conflicts: drivers/iio/dac/ad5064.c
| * iio: adc: Add dt support for turning on the phy in exynos-adcDoug Anderson2013-03-171-1/+13
| | | | | | | | | | | | | | | | | | | | Without this change the exynos adc controller needed to have its phy enabled in some out-of-driver C code. Add support for specifying the phy enable register by listing it in the reg list. Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:adc:ad7923: Add support for the ad7904/ad7914/ad7924Lars-Peter Clausen2013-03-172-16/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | The ad7924 is software compatible with the ad7923. The ad7904 and ad7914 are the 8 and 10 bit version of the ad7924. While we are at it also drop the "with temperature sensor" from the Kconfig entry, since the chips do not have a temperature sensor. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Patrick Vasseur <patrick.vasseur@c-s.fr> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:ad7923: Implement scale reportingLars-Peter Clausen2013-03-171-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver already claims to support scale reporting in its channel spec, but doesn't actually implement this yet. This patch uses the regulator API to get the reference voltage and calculates the scale based on that. The patch also moves the global configuration bits into a field in the ad7923_state struct, since depending on the RANGE bit, the range goes either from 0 to VREF or from 0 to 2 * VREF. So we need to know the setting of the RANGE bit when calculating the scale. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Patrick Vasseur <patrick.vasseur@c-s.fr> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:ad7923: Return error if we didn't get the expected resultLars-Peter Clausen2013-03-171-0/+2
| | | | | | | | | | | | | | | | | | | | Instead of leaving 'val' uninitialized return an error if the result's address did not match that of the channel we were trying to read. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Patrick Vasseur <patrick.vasseur@c-s.fr> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * using kfifo_in_spinlocked instead of separate code.Ge Gao2013-03-171-3/+2
| | | | | | | | | | Signed-off-by: Ge Gao <ggao@invensense.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: adc: Kconfig: exynos_adc depends on CONFIG_OFNaveen Krishna Chatradhi2013-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | As the exynos_adc driver only supports device tree registration. Making driver depend on CONFIG_OF solves possible errors during probe. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: events: Make iio_push_event() IRQ context saveLars-Peter Clausen2013-03-171-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it is not save to call iio_push_event() from hard IRQ context since the IIO event code uses spin_lock()/spin_unlock() and it is not save to mix calls to spin_lock()/spin_unlock() from different contexts on the same lock. E.g. if the lock is being held in iio_event_chrdev_read() and an interrupts kicks in and the interrupt handler calls iio_push_event() we end uo with a deadlock. This patch updates iio_push_event() to use spin_lock_irqsave()/ spin_unlock_irqstrestore(), since it can be called from both IRQ and non-IRQ context. All other other users of the lock, which are always run in non-IRQ context, are updated to spin_lock_irq()/spin_unlock_irq(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:core drop info_mask from struct iio_infoJonathan Cameron2013-03-171-17/+0
| | | | | | | | | | | | | | | | This has been replaced by the pair of masks info_mask_separate and info_mask_shared_by_type. Other variants may follow. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:adc:ad7923 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> cc: Patrick Vasseur <patrick.vasseur@c-s.fr> cc: Christophe Leroy <christophe.leroy@c-s.fr>
| * iio:adc:exynos move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-1/+1
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
| * iio:light:vcnl4000 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-3/+3
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Peter Meerwald <pmeerw@pmeerw.net>
| * iio:light:tsl2563 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-5/+5
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Jon Brenner <jbrenner@taosinc.com>
| * iio:light:lm3533 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-3/+3
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Johan Hovold <jhovold@gmail.com>
| * iio:light:adjd_s311 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Peter Meerwald <pmeerw@pmeerw.net>
| * iio:imu:mpu6050 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-5/+5
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Ge Gao <ggao@invensense.com>
| * iio:imu:adis16480 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-16/+16
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:imu:adis16400 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-24/+25
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:gyro:itg3200_core move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-8/+5
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
| * iio:gyro:adxrs450 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-11/+11
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:gyro:adis16136 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-6/+7
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:gyro:adis16080 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-11/+11
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:freq:ad9523 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-4/+4
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:mcp4725 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Peter Meerwald <pmeerw@pmeerw.net>
| * iio:dac:max517 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Roland Stigge <stigge@antcom.de>
| * iio:dac:ad5791 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-3/+3
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5764 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-5/+5
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5755 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-5/+5
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5686 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-3/+3
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5624r move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5504 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5449 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5446 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5421 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-5/+5
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5380 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-4/+4
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5360 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-5/+5
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:dac:ad5064 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * iio:amplifiers:ad8366 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-1/+1
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
| * iio:adc:viperboard_adc move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-1/+1
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Lars Poeschel <poeschel@lemonage.de>
| * iio:adc:ti_am335x_adc move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-1/+1
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Patil, Rachna <rachna@ti.com>
| * iio:adc:ti-adc081 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
| * iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: Milo(Woogyom) Kim <milo.kim@ti.com>
| * iio:adc:at91_adc move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-2/+2
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
| * iio:adc:ad7887 move to info_mask_(shared_by_type/separate)Jonathan Cameron2013-03-171-4/+4
| | | | | | | | | | | | | | The original info_mask is going away in favour of the broken out versions. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
OpenPOWER on IntegriCloud