05 Jun, 2013
4 commits
-
Signed-off-by: Michael Hennerich
Signed-off-by: Jonathan Cameron -
Signed-off-by: Michael Hennerich
Reviewed-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
The code uses
return foo;
goto err_type;when instead the form should have been
ret = foo;
goto err_type;Here this causes a useful iio_device_put to be skipped.
Signed-off-by: Joe Perches
Signed-off-by: Jonathan Cameron -
Reported-by: Michał Mirosław
Signed-off-by: Jonathan Cameron
23 May, 2013
3 commits
-
The exynos_adc device structure was wrongly extracted from the dev*
correcting the same.Using the regular conversion of
struct device* -> struct platform_device* -> struct exynos_adc* seems wrong.
Instead we should be doing
struct device* -> struct iio_dev* -> struct exynos_adc*Signed-off-by: Naveen Krishna Chatradhi
Reviewed-by: Doug Anderson
Signed-off-by: Jonathan Cameron -
Signed-off-by: Denis Ciocca
Signed-off-by: Jonathan Cameron -
This patch fixes below build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m:
drivers/built-in.o: In function `ad5064_i2c_write':
drivers/iio/dac/ad5064.c:608: undefined reference to `i2c_master_send'
drivers/built-in.o: In function `ad5064_i2c_register_driver':
drivers/iio/dac/ad5064.c:646: undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `ad5064_i2c_unregister_driver':
drivers/iio/dac/ad5064.c:651: undefined reference to `i2c_del_driver'
make: *** [vmlinux] Error 1When CONFIG_I2C=m, meaning we can't build the drivers in with I2C support.
Thus don't allow the drivers to be compiled as built-in when CONFIG_I2C=m.The real fix though is to break the driver apart into a SPI part, an I2C part
and a common part. But that's something for 3.11 while this is something for
3.10/stable.Reported-by: Wu Fengguang
Reported-by: Randy Dunlap
Signed-off-by: Axel Lin
Acked-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron
03 Apr, 2013
4 commits
-
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
Signed-off-by: Ludovic Desroches
Signed-off-by: Jonathan Cameron -
The sleep mode will allow to put the adc in sleep between conversion.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Ludovic Desroches
Acked-by: Maxime Ripard
Signed-off-by: Jonathan Cameron -
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
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jonathan Cameron -
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
Acked-by: Laxman Dewangan
29 Mar, 2013
1 commit
-
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
Signed-off-by: Jonathan Cameron
26 Mar, 2013
2 commits
-
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:
@@
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)Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
…/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
18 Mar, 2013
26 commits
-
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
Tested-by: Naveen Krishna Chatradhi
Signed-off-by: Jonathan Cameron -
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
Cc: Patrick Vasseur
Cc: Christophe Leroy
Signed-off-by: Jonathan Cameron -
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
Cc: Patrick Vasseur
Cc: Christophe Leroy
Signed-off-by: Jonathan Cameron -
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
Cc: Patrick Vasseur
Cc: Christophe Leroy
Signed-off-by: Jonathan Cameron -
Signed-off-by: Ge Gao
Signed-off-by: Jonathan Cameron -
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
Reported-by: Dan Carpenter
Reviewed-by: Doug Anderson
Cc: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
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
Signed-off-by: Jonathan Cameron -
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
Acked-by: Lars-Peter Clausen -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen
cc: Patrick Vasseur
cc: Christophe Leroy -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Naveen Krishna Chatradhi -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
cc: Peter Meerwald -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
cc: Jon Brenner -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
cc: Johan Hovold -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
cc: Peter Meerwald -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
cc: Ge Gao -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
cc: Manuel Stahl -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
cc: Peter Meerwald -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
cc: Roland Stigge -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen -
The original info_mask is going away in favour of the broken out versions.
Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen