- 23 3月, 2017 2 次提交
-
-
由 Ksenija Stanojevic 提交于
Since the driver has been split into MFD there is no reason for it to stay, so remove it. Signed-off-by: NKsenija Stanojevic <ksenija.stanojevic@gmail.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Reviewed-by: NMarek Vasut <marex@denx.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Ksenija Stanojevic 提交于
Add support for sixteen-channel 12-bit resolution ADC and its functions, which include general-purpose ADC readings, battery voltage measurement, and die temperature measurement. Signed-off-by: NKsenija Stanojevic <ksenija.stanojevic@gmail.com> Reviewed-by: NJonathan Cameron <jic23@kernel.org> Reviewed-by: NMarek Vasut <marex@denx.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 26 2月, 2017 1 次提交
-
-
由 Christophe JAILLET 提交于
Reorder error handling labels in order to match the way resources have been allocated. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 05 2月, 2017 1 次提交
-
-
由 Arnd Bergmann 提交于
If we get an unknown 'childmode' value, a number of variables are not initialized properly: drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_probe': drivers/iio/adc/rcar-gyroadc.c:390:5: error: 'num_channels' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/iio/adc/rcar-gyroadc.c:426:22: error: 'sample_width' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/iio/adc/rcar-gyroadc.c:428:23: error: 'channels' may be used uninitialized in this function [-Werror=maybe-uninitialized] The driver is currently correct, but handling this properly is more robust for possible modifications. There is also a false-positive warning about adcmode being possibly uninitialized, but that cannot happen as we also check the 'first' flag: drivers/iio/adc/rcar-gyroadc.c:398:26: error: 'adcmode' may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds an initialization for 'adcmode' and bails out for any unknown childmode. Fixes: 059c53b3 ("iio: adc: Add Renesas GyroADC driver") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 02 2月, 2017 1 次提交
-
-
由 William Breathitt Gray 提交于
The Apex Embedded Systems STX104 series provides a digital output register where 4 lines may be set at a time. This patch add support for the set_multiple callback function, thus allowing multiple digital output lines to be set more efficiently in groups. Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 01 2月, 2017 1 次提交
-
-
由 William Breathitt Gray 提交于
This patch sets the gpio_chip names option with an array of GPIO line names that match the manual documentation for the Apex Embedded Systems STX104. This should make it easier for users to identify which GPIO line corresponds to a respective GPIO pin on the device. Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 31 1月, 2017 1 次提交
-
-
由 William Breathitt Gray 提交于
The stx104_dev structure was used to hold private data for use in the stx104_remove function. Now that the stx104_remove function is gone, the stx104_dev structure and relevant code is no longer needed. This patch removes the unnecessary code. Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 29 1月, 2017 4 次提交
-
-
由 Fabrice Gasnier 提交于
Add DMA optional support to STM32 ADC, as there is a limited number DMA channels (request lines) that can be assigned to ADC. This way, driver may fall back using interrupts when all DMA channels are in use for other IPs. Use dma cyclic mode with two periods. Allow to tune period length by using watermark. Coherent memory is used for dma (max buffer size is fixed to PAGE_SIZE). Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabrice Gasnier 提交于
Define extended attribute so that user may choose rising, falling or both edges for external trigger sources. Default to rising edge in case it isn't set. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabrice Gasnier 提交于
STM32 ADC has external timer trigger sources. Use stm32 timer triggers API (e.g. is_stm32_timer_trigger()) with local ADC lookup table to validate a trigger can be used. This also provides correct trigger selection value (e.g. extsel). Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabrice Gasnier 提交于
STM32 ADC conversions can be launched using hardware triggers. It can be used to start conversion sequences (group of channels). Selected channels are select via sequence registers. Trigger source is selected via 'extsel' (external trigger mux). Trigger polarity is set to rising edge by default. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 28 1月, 2017 3 次提交
-
-
由 William Breathitt Gray 提交于
The devm_ resource manager functions allow memory to be automatically released when a device is unbound. This patch takes advantage of the resource manager functions and replaces the gpiochip_add_data call and iio_device_register call with the devm_gpiochip_add_data call and devm_iio_device_register call respectively. In addition, the stx104_remove function has been removed as no longer necessary due to the use of the relevant devm_ resource manager functions. Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Martin Blumenstingl 提交于
This adds support for the SAR (Successive Approximation Register) ADC on the Amlogic Meson SoCs. The code is based on the public S805 (Meson8b) and S905 (GXBB) datasheets (see [0] and [1]), as well as by reading (various versions of) the vendor driver and by inspecting the registers on the vendor kernels of my testing-hardware. Currently the GXBB, GXL and GXM SoCs are supported. GXBB hardware has 10-bit ADC resolution, while GXL and GXM have 12-bit ADC resolution. The code was written to support older SoCs (Meson8 and Meson8b) as well, but due to lack of actual testing-hardware no of_device_id was added for these. Two "features" from the vendor driver are currently missing: - the vendor driver uses channel #7 for calibration (this improves the accuracy of the results - in my tests the results were less than 3% off without calibration compared to the vendor driver). Adding support for this should be easy, but is not required for most applications. - channel #6 is connected to the SoCs internal temperature sensor. Adding support for this is probably not so easy since (based on the u-boot sources) most SoC versions are using different registers and algorithms for the conversion from "ADC value" to temperature. Supported by the hardware but currently not supported by the driver: - reading multiple channels at the same time (the hardware has a FIFO buffer which stores multiple results) - continuous sampling (this would require a way to enable this individually because otherwise the ADC would be drawing power constantly) - interrupt support (similar to the vendor driver this new driver is polling the results. It is unclear if the IRQ-mode is supported on older (Meson6 or Meson8) hardware as well or if there are any errata) [0] http://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf [1] http://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdfSigned-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Marek Vasut 提交于
Add IIO driver for the Renesas RCar GyroADC block. This block is a simple 4/8-channel ADC which samples 12/15/24 bits of data every cycle from all channels. Signed-off-by: NMarek Vasut <marek.vasut+renesas@gmail.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Simon Horman <horms+renesas@verge.net.au> Cc: Jonathan Cameron <jic23@kernel.org> Cc: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 22 1月, 2017 3 次提交
-
-
由 Bhumika Goyal 提交于
Declare iio_info structures as const as they are only stored in the info field of a iio_dev structure. This field is of type const, so iio_info structures having similar properties can be made const too. File size before: text data bss dec hex filename 6944 792 0 7736 1e38 drivers/iio/adc/ti-ads1015.o File size after: text data bss dec hex filename 7264 472 0 7736 1e38 drivers/iio/adc/ti-ads1015.o Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
The I2C core always reports a MODALIAS of the form i2c:<foo> even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Phil Reid 提交于
This adds TI's tlc4541 16-bit ADC driver. Which is a single channel ADC. Supports raw and trigger buffer access. Also supports the tlc3541 14-bit device, which has not been tested. Implementation of the tlc3541 is fairly straight forward thou. Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NPhil Reid <preid@electromag.com.au> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 21 1月, 2017 2 次提交
-
-
由 Alison Schofield 提交于
The suspend/resume functions were using dev_to_iio_dev() to get the iio_dev. That only works on IIO dev's. Use dev_get_drvdata() for a platform device to get the correct iio_dev. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jacopo Mondi 提交于
Add iio driver for Maxim MAX11100 single-channel ADC. Signed-off-by: NJacopo Mondi <jacopo+renesas@jmondi.org> Tested-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 15 1月, 2017 2 次提交
-
-
由 David Lechner 提交于
This changes the reference voltage regulator matching string from "refin" to "vref". This is to be consistent with other A/DC chips that also use "vref-supply" in their device tree bindings. Signed-off-by: NDavid Lechner <david@lechnology.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 David Lechner 提交于
This drops the "ti-" prefix from the module name. It makes the module name consistent with other iio ti-ads* drivers and it makes the driver work with device tree (the spi subsystem drops the "ti," prefix when matching compatible strings from device tree). Tested working on LEGO MINDSTORMS EV3 with the following device tree node: adc@3 { compatible = "ti,ads7957"; reg = <3>; #io-channel-cells = <1>; spi-max-frequency = <10000000>; vref-supply = <&adc_ref>; }; Signed-off-by: NDavid Lechner <david@lechnology.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 11 1月, 2017 7 次提交
-
-
由 Jonathan Cameron 提交于
Another one of these that we missed previously which prevents test builds of this driver on 32 bit platforms as it gives an undefined __divdi3 warning. Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jonathan Cameron 提交于
It is meant to be long and is only added to an s64. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Cc: Rama Krishna Phani A <rphani@codeaurora.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jonathan Cameron 提交于
A simple do_div call works here as all the signed 64 bit is actually small and unsigned at this point, and the numerator is u32. Introduce a temporary u64 variable to avoid type comparison warnings on some architectures. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Cc: Rama Krishna Phani A <rphani@codeaurora.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Andreas Klinger 提交于
This is the IIO driver for AVIA HX711 ADC which is mostly used in weighting cells. The protocol is quite simple and using GPIOs: One GPIO is used as clock (SCK) while another GPIO is read (DOUT) The raw value read from the chip is delivered. To get a weight one needs to subtract the zero offset and scale it. Signed-off-by: NAndreas Klinger <ak@it-klinger.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Hans de Goede 提交于
For some reason the axp288_adc driver was modifying the AXP288_ADC_TS_PIN_CTRL register, changing bits 0-1 depending on whether the GP_ADC channel or another channel was written. These bits control when a bias current is send to the TS_PIN, the GP_ADC has its own pin and a separate bit in another register to control the bias current. Not only does changing when to enable the TS_PIN bias current (always or only when sampling) when reading the GP_ADC make no sense at all, the code is modifying these bits is writing the entire register, assuming that all the other bits have their default value. So if the firmware has configured a different bias-current for either pin, then that change gets clobbered by the write, likewise if the firmware has set bit 2 to indicate that the battery has no thermal sensor, this will get clobbered by the write. This commit fixes all this, by simply removing all writes to the AXP288_ADC_TS_PIN_CTRL register, they are not needed to read the GP_ADC pin, and can actually be harmful. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Javier Martinez Canillas 提交于
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/iio/adc/fsl-imx25-gcq.ko | grep alias $ After this patch: $ modinfo drivers/iio/adc/fsl-imx25-gcq.ko | grep alias alias: of:N*T*Cfsl,imx25-gcqC* alias: of:N*T*Cfsl,imx25-gcq Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jonathan Cameron 提交于
As a precursor to splitting buffer.h, lets make sure all drivers include the relevant headers rather than relying on picking them up from kfifo_buf.h. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
-
- 31 12月, 2016 1 次提交
-
-
由 Geert Uytterhoeven 提交于
If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/iio/adc/ti_am335x_adc.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Fixes: f438b9da (" drivers: iio: ti_am335x_adc: add dma support") Cc: <stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 11 12月, 2016 2 次提交
-
-
由 Rama Krishna Phani A 提交于
Several ADC channels are supported in PMIC which can be used to measure voltage, temperature, current etc. Different scaling can be applied on the obtained voltage to report in physical units. Scaling functionality can be different per channel. Add scaling support per channel. Every channel present in adc has an unique conversion formula for obtained voltage. Add support to report in Raw as well as in processed format. Scaling is applied when processed read is requested and is not applied when a Raw read is requested. Signed-off-by: NRama Krishna Phani A <rphani@codeaurora.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Rama Krishna Phani A 提交于
Several channels are supported in ADC of PMIC which can be used to measure voltage, temperature, current etc., Hardware provides readings for all channels in adc code. That adc code needs to be converted to voltage. Logic for conversion of adc code to voltage is common for all ADC channels(voltage, temperature, current .,etc). Implement separate function for generic conversion logic. Signed-off-by: NRama Krishna Phani A <rphani@codeaurora.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 12月, 2016 2 次提交
-
-
由 David Lechner 提交于
This adds a new driver for the TI ADS7950 family of ADC chips. These communicate using SPI and come in 8/10/12-bit and 4/8/12/16 channel varieties. Signed-off-by: NDavid Lechner <david@lechnology.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Aniroop Mathur 提交于
msleep(1~20) may not do what the caller intends, and will often sleep longer. (~20 ms actual sleep for any value given in the 1~20ms range) This is not the desired behaviour for many cases like device resume time, device suspend time, device enable time, data reading time, etc. Thus, change msleep to usleep_range for precise wakeups. Signed-off-by: NAniroop Mathur <a.mathur@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 19 11月, 2016 2 次提交
-
-
由 Fabrice Gasnier 提交于
This patch adds support for STMicroelectronics STM32 MCU's analog to digital converter. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabrice Gasnier 提交于
Add core driver for STMicroelectronics STM32 ADC (Analog to Digital Converter). STM32 ADC can be composed of up to 3 ADCs with shared resources like clock prescaler, common interrupt line and analog reference voltage. This core driver basically manages shared resources. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 13 11月, 2016 1 次提交
-
-
由 Peter Rosin 提交于
The DAC is used to find the peak level of an alternating voltage input signal by a binary search using the output of a comparator wired to an interrupt pin. Like so: _ | \ input +------>-------|+ \ | \ .-------. | }---. | | | / | | dac|-->--|- / | | | |_/ | | | | | | | | irq|------<-------' | | '-------' Signed-off-by: NPeter Rosin <peda@axentia.se> Acked-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 12 11月, 2016 1 次提交
-
-
由 Dan Carpenter 提交于
We should be testing "ret" here. Fixes: aa16c6bd ("iio:adc: Add support for AD7766/AD7767") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 06 11月, 2016 2 次提交
-
-
由 Mugunthan V N 提交于
This patch adds the required pieces to ti_am335x_adc driver for DMA support Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Wenyou Yang 提交于
Add suspend/resume callback, support the pinctrl sleep state when the system suspend as well. Signed-off-by: NWenyou Yang <wenyou.yang@atmel.com> Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 24 10月, 2016 1 次提交
-
-
由 Akinobu Mita 提交于
This adds triggered buffer support for the ti-adc0832 driver. Tested with ADC0831 and ADC0832 by using SYSFS trigger. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-