- 31 8月, 2015 1 次提交
-
-
由 Sanchayan Maity 提交于
This patch adds support for IIO buffer to the Vybrid ADC driver. IIO triggered buffer infrastructure along with iio sysfs trigger is used to leverage continuous sampling support provided by the ADC block. Signed-off-by: NSanchayan Maity <maitysanchayan@gmail.com> Acked-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 23 8月, 2015 3 次提交
-
-
由 Javier Martinez Canillas 提交于
The driver has an OF id table but the .of_match_table is not set so the SPI core can't do an OF style match and the table was unused. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Acked-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt DT binding doc lists "ti,adc128s052" or "ti,adc122s021" as compatible strings but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The driver has an OF id table but the .of_match_table is not set so the SPI core can't do an OF style match and the table was unused. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 16 8月, 2015 1 次提交
-
-
由 Xander Huff 提交于
The driver currently registers a pair of irq handlers using request_threaded_irq(), however the synchronization mechanism between the hardirq and the threadedirq handler is a regular spinlock. Unfortunately, this breaks PREEMPT_RT builds, where a spinlock can sleep, and is thus not able to be acquired from a hardirq handler. This patch gets rid of the threaded handler and pushes all interrupt handling into the hardirq context, and uses request_irq(). To validate that this change has no impact on RT performance, here are cyclictest values with no processes running: $ sudo cyclictest -S -m -p 98 policy: fifo: loadavg: 0.00 0.01 0.05 1/174 2539 T: 0 ( 1405) P:98 I:1000 C:167010520 Min: 9 Act: 12 Avg: 12 Max: 75 T: 1 ( 1862) P:98 I:1500 C:111340339 Min: 9 Act: 12 Avg: 12 Max: 73 Then, all xadc raw handles were accessed in a continuous loop via /sys/bus/iio/devices/iio:device0: $ sudo cyclictest -S -m -p 98 policy: fifo: loadavg: 7.84 7.70 7.63 3/182 4260 T: 0 ( 2559) P:98 I:1000 C:241557018 Min: 11 Act: 18 Avg: 21 Max: 74 T: 1 ( 2560) P:98 I:1500 C:161038006 Min: 10 Act: 21 Avg: 20 Max: 73 Signed-off-by: NXander Huff <xander.huff@ni.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 13 8月, 2015 5 次提交
-
-
由 Hartmut Knaack 提交于
Move the entry for the CC 10001 ADC driver in Kconfig and Makefile up to maintain alphabetic order. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Some adjustment of indentation to make checkpatch.pl happy in strict mode. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Move the call to enable channel interrupts into its _read() function to have it protected by a mutex. This ensures that only one channel is sampled at a time. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Make use of GENMASK for consecutive bitmasks and BIT for single bitmasks. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Active channel number is stored in BERLIN2_SM_CTRL as value, instead of a bit map. The masks for channel interrupts and data ready are a 16 bits wide bit map each, instead of just 4 bits. Also correct the data mask for the temperature sensor, which was Reported-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 8月, 2015 4 次提交
-
-
由 Hartmut Knaack 提交于
Drop the otherwise unused definition of the channel-array size and use it directly in _probe - makes it a bit more obvious. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Use augmented assignment to subtract the offset for negative temperature values. Specify the amount of private data to be allocated through devm_iio_device_alloc() with sizeof(*priv), as it is shorter and common practice in IIO. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Mark berlin2_adc_channels array as constant. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
Pass up the real error code returned by platform_get_irq_byname(). Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 21 7月, 2015 2 次提交
-
-
由 Sanchayan Maity 提交于
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: NSanchayan Maity <maitysanchayan@gmail.com> Acked-by: NStefan Agner <stefan@agner.ch> Acked-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Andrea Galbusera 提交于
This adds support for Microchip's 13 bit 1 channel AD converter MCP3301 Signed-off-by: NAndrea Galbusera <gizero@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 19 7月, 2015 6 次提交
-
-
由 Manfred Schlaegl 提交于
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 b12206e9 iio: adc: mcp320x. Add support for more ADCs This patch fixes the issue by setting chip_info in mcp320x_probe. Signed-off-by: NManfred Schlaegl <manfred.schlaegl@gmx.at> Reviewed-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fugang Duan 提交于
Read the register only when the adc register address is 4 byte aligned. (rather than the other way around). Signed-off-by: NHaibo Chen <haibo.chen@freescale.com> Signed-off-by: NFugang Duan <B38611@freescale.com> Cc: <Stable.vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hartmut Knaack 提交于
The Cosmic Circuits 10001 ADC driver depends on HAS_IOMEM, HAVE_CLK and REGULATOR together, not just any of these. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jan Leupold 提交于
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: NJan Leupold <leupold@rsi-elektrotechnik.de> [nicolas.ferre@atmel.com: change commit message, increase u16 to u32 for startup time] Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabio Estevam 提交于
Since commit 1c6c6952 ("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: NFabio Estevam <fabio.estevam@freescale.com> Cc: <stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Heiko Stuebner 提交于
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: 44d6f2ef ("iio: adc: add driver for Rockchip saradc") Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 12 7月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 29 6月, 2015 1 次提交
-
-
由 Hartmut Knaack 提交于
Rework the help text of several ADCs to make sure that: - the module name is mentioned, if the driver can be built as a module - "If unsure, say N" messages are dropped - right indentation is maintained Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 21 6月, 2015 2 次提交
-
-
由 Hartmut Knaack 提交于
The Cosmic Circuits 10001 ADC driver depends on HAS_IOMEM, HAVE_CLK and REGULATOR together, not just any of these. Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jan Leupold 提交于
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: NJan Leupold <leupold@rsi-elektrotechnik.de> [nicolas.ferre@atmel.com: change commit message, increase u16 to u32 for startup time] Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 14 6月, 2015 1 次提交
-
-
由 Naidu Tellapati 提交于
The ADC is typically shared with remote CPUs not running Linux. However, there is only one register to power-up/power-down. Remote CPUs aren't able to power-up the ADC, and rely in Linux doing it instead. This commit uses the adc-reserved-channels devicetree property to distinguish shared usage. In this case, the ADC is powered up at probe time. If the ADC is used only by the CPU running Linux, power-up/down at runtime, only when neeeded. Signed-off-by: NNaidu Tellapati <naidu.tellapati@imgtec.com> Signed-off-by: NEzequiel Garcia <ezequiel.garcia@imgtec.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 08 6月, 2015 5 次提交
-
-
由 Stefan Agner 提交于
Support configurable conversion mode through sysfs. So far, the mode used was low-power, which is enabled by default now. Beside that, the modes normal and high-speed are selectable as well. Use the new device tree property which specifies the maximum ADC conversion clock frequencies. Depending on the mode used, the available resulting conversion frequency are calculated dynamically. Acked-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabio Estevam 提交于
Since commit 1c6c6952 ("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: NFabio Estevam <fabio.estevam@freescale.com> Cc: <stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Heiko Stuebner 提交于
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: 44d6f2ef ("iio: adc: add driver for Rockchip saradc") Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 H. Nikolaus Schaller 提交于
The @chan parameter can be 0 or 1 and not a bit mask. Fix wrong description. Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: NMarek Belisko <marek@goldelico.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 H. Nikolaus Schaller 提交于
The bit mask to read the setting of the constant current source for measuring the NTC voltage was the wrong one. Since default value is initialized to the lowest level (000 = 10uA) the difference was probably never noticed in practice. Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: NMarek Belisko <marek@goldelico.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 23 5月, 2015 3 次提交
-
-
由 Urs Fässler 提交于
Signed-off-by: NUrs Fässler <urs.fassler@bytesatwork.ch> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Axel Lin 提交于
Remove extra space between platform prefix and DRIVER_NAME in MODULE_ALIAS. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Antoine Tenart 提交于
This patch adds the support of the Berlin ADC, available on Berlin SoCs. This ADC has 8 channels available, with one connected to a temperature sensor. The particularity here, is that the temperature sensor connected to the ADC has its own registers, and both the ADC and the temperature sensor must be configured when using it. Signed-off-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 14 5月, 2015 1 次提交
-
-
由 Vignesh R 提交于
Add optional DT properties to set open delay, sample delay and number of averages per sample for each adc step. Open delay, sample delay and averaging are some of the parameters that affect the sampling rate and accuracy of the sample. Making these parameters configurable via DT will help in balancing speed vs accuracy. Signed-off-by: NVignesh R <vigneshr@ti.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 13 5月, 2015 3 次提交
-
-
由 Naidu Tellapati 提交于
According to hardware team there should be some delay after setting channel number, start mode and before setting START. Add a one microsecond delay for this purpose. Fixes: 1664f6a5 ("iio: adc: Cosmic Circuits 10001 ADC driver") Signed-off-by: NNaidu Tellapati <naidu.tellapati@imgtec.com> Signed-off-by: NEzequiel Garcia <ezequiel.garcia@imgtec.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Naidu Tellapati 提交于
regulator_get_voltage() returns a non-negative value in case of success, and a negative error in case of error. Let's fix this. Fixes: 1664f6a5 ("iio: adc: Cosmic Circuits 10001 ADC driver") Signed-off-by: NNaidu Tellapati <naidu.tellapati@imgtec.com> Signed-off-by: NEzequiel Garcia <ezequiel.garcia@imgtec.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Naidu Tellapati 提交于
At present we are incorrectly setting the register to 0x1 to power up the ADC. Since it is an active high power down register, we need to set the register to 0x0 to actually power up. Conversely, writing 0x1 to the register powers it down. This commit adds a couple of helpers to make the code clearer and then use them to do the power-up/power-down properly. Fixes: 1664f6a5 ("iio: adc: Cosmic Circuits 10001 ADC driver") Signed-off-by: NNaidu Tellapati <naidu.tellapati@imgtec.com> Signed-off-by: NEzequiel Garcia <ezequiel.garcia@imgtec.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 11 5月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-