- 16 8月, 2016 1 次提交
-
-
由 Anders Darander 提交于
The driver always assumes that an input device has been created when reading channel 3. This causes a kernel panic when dereferencing st->ts_input. The change was introduced in commit 84882b06 ("iio: adc: at91_adc: Add support for touchscreens without TSMR"). Earlier versions only entered that part of the if-else statement if only the following flags are set: AT91_ADC_IER_XRDY | AT91_ADC_IER_YRDY | AT91_ADC_IER_PRDY Signed-off-by: NAnders Darander <anders@chargestorm.se> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 16 4月, 2016 1 次提交
-
-
由 Slawomir Stepien 提交于
This fixes the errors reported by checkpatch.pl: ERROR: space prohibited before that ',' (ctx:WxW) ERROR: code indent should use tabs where possible Signed-off-by: NSlawomir Stepien <sst@poczta.fm> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 22 11月, 2015 1 次提交
-
-
由 Nizam Haider 提交于
So this patch swaps that use out for kmalloc_array instead. Signed-off-by Nizam Haider <nijamh@cdac.in> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 19 7月, 2015 1 次提交
-
-
由 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>
-
- 21 6月, 2015 1 次提交
-
-
由 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>
-
- 08 3月, 2015 1 次提交
-
-
由 Octavian Purdila 提交于
If the in-kernel push interface is used we may have a different masks on the device buffer and the kernel buffer and in this case the device should generate data for the reunion of the buffers, which is available at indio_dev->active_scan_mask. Compiled tested only except for bmc150-accel which was tested at runtime with the hardware. Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 15 9月, 2014 1 次提交
-
-
由 Ludovic Desroches 提交于
If touchscreen mode is enabled and a conversion is requested on another channel, the result in the last converted data register can be a touchscreen relative value. Starting a conversion involves to do a conversion for all active channel. It starts with ADC channels and ends with touchscreen channels. Then if ADC_LCD register is not read quickly, its content may be a touchscreen conversion. To remove this temporal constraint, the conversion value is taken from the channel data register. Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Cc: Stable@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 30 8月, 2014 1 次提交
-
-
由 Josh Wu 提交于
The handle_adc_eoc_trigger() in only used in at91_adc.c. So make it static. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 14 6月, 2014 2 次提交
-
-
由 Peter Meerwald 提交于
argument has been ignored; adjust drivers accordingly Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Dan Carpenter 提交于
at91_adc_get_trigger_value_by_name() was returning -ENOMEM truncated to a positive u8 and that doesn't work. I've changed it to int and refactored it to preserve the error code. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org> Cc: Stable@vger.kernel.org
-
- 08 5月, 2014 4 次提交
-
-
由 Alexandre Belloni 提交于
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
由 Alexandre Belloni 提交于
That include file is now only used by the at91_adc driver, remove it from include/mach for better driver separation. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
由 Alexandre Belloni 提交于
Old ADCs, as present on the sam9rl and the sam9g45 don't have a TSMR register and the touchscreen support should be handled differently. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
由 Alexandre Belloni 提交于
num_channels and registers are not used anymore since they are defined inside the driver and assigned by matching the id_table. Also, struct at91_adc_reg_desc is now only used inside the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
- 16 3月, 2014 1 次提交
-
-
由 Alexandre Belloni 提交于
When sample_hold_time is zero (this is the case when DT is not used or if atmel,adc-sample-hold-time is omitted), then the calculated shtim is large. Make that 0, which is the default for that register and the ADC will then use a sane value of 2/ADCCLK or 1/ADCCLK depending on the version. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NJosh Wu <josh.wu@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 07 3月, 2014 1 次提交
-
-
由 Alexandre Belloni 提交于
Trying to use the at91_adc driver while not using device tree is ending up in a kernel crash: Unable to handle kernel NULL pointer dereference at virtual address 00000004 [...] [<c01f3510>] (at91_adc_probe) from [<c0183828>] (platform_drv_probe+0x18/0x48) [<c0183828>] (platform_drv_probe) from [<c01824a4>] (driver_probe_device+0x100/0x218) [<c01824a4>] (driver_probe_device) from [<c0182648>] (__driver_attach+0x8c/0x90) [<c0182648>] (__driver_attach) from [<c0180de4>] (bus_for_each_dev+0x58/0x88) [<c0180de4>] (bus_for_each_dev) from [<c0181c7c>] (bus_add_driver+0xd4/0x1d4) [<c0181c7c>] (bus_add_driver) from [<c0182c40>] (driver_register+0x78/0xf4) [<c0182c40>] (driver_register) from [<c0008998>] (do_one_initcall+0xe8/0x14c) [<c0008998>] (do_one_initcall) from [<c02f0b50>] (kernel_init_freeable+0xec/0x1b4) [<c02f0b50>] (kernel_init_freeable) from [<c022acdc>] (kernel_init+0x8/0xe4) [<c022acdc>] (kernel_init) from [<c0009670>] (ret_from_fork+0x14/0x24) This is because the at91_adc_caps structure is mandatory but is not filled when using platform_data. Correct that by using an id_table. It ensues that the driver will not match "at91_adc" anymore but it was crashing anyway. Fixes: c4601666 (iio: at91: ADC start-up time calculation changed since at91sam9x5) Cc: stable@vger.kernel.org # v3.13+ Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: NJosh Wu <josh.wu@atmel.com> Acked-by: NJosh Wu <josh.wu@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 02 11月, 2013 1 次提交
-
-
由 Wei Yongjun 提交于
Fix to return -ENODEV instead of 0 if non-TSMR adc don't support, as done elsewhere in this function. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: NJosh Wu <josh.wu@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 18 10月, 2013 1 次提交
-
-
由 Josh Wu 提交于
AT91 ADC hardware integrate touch screen support. So this patch add touch screen support for at91 adc iio driver. To enable touch screen support in adc, you need to add the dt parameters: 1. which type of touch are used? (4 or 5 wires), sample period time. 2. correct pressure detect threshold value. In the meantime, since touch screen will use a interal period trigger of adc, so it is conflict to other hardware triggers. Driver will disable the hardware trigger support if touch screen is enabled. This driver has been tested in AT91SAM9X5-EK and SAMA5D3x-EK. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> CC: devicetree@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 10 10月, 2013 2 次提交
-
-
由 Josh Wu 提交于
CC: devicetree@vger.kernel.org Signed-off-by: NJosh Wu <josh.wu@atmel.com> Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Josh Wu 提交于
Since in at91sam9x5, sama5d3x chip. the start up time calucation is changed. This patch can choose different start up time calculation formula for different chips. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 01 10月, 2013 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Move the complexity of calculating the fixed point scale to the core. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Cc: Josh Wu <josh.wu@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 22 9月, 2013 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Makes the code a bit shorter and less ugly. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Cc: Josh Wu <josh.wu@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 21 9月, 2013 1 次提交
-
-
由 Thomas Meyer 提交于
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: NThomas Meyer <thomas@m3y3r.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 19 9月, 2013 1 次提交
-
-
由 Josh Wu 提交于
The adc_clk variable is currently defined using a 32-bits unsigned integer, which will overflow under some very valid range of operations. Such overflow will occur if, for example, the parent clock is set to a 20MHz frequency and the ADC startup time is larger than 215ns. To fix this, introduce an intermediate variable holding the clock rate in kHz. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 16 9月, 2013 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Now that iio_push_to_buffers() takes a void pointer for the data parameter we can remove those casts to u8*. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 30 8月, 2013 2 次提交
-
-
由 Josh Wu 提交于
For at91 boards, there are different IPs for adc. Different IPs has different STARTUP & PRESCAL mask in ADC_MR. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Josh Wu 提交于
As use the multiple compatible string, we can remove hardware register in dt. CC: devicetree@vger.kernel.org Signed-off-by: NJosh Wu <josh.wu@atmel.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 8月, 2013 1 次提交
-
-
由 Sachin Kamat 提交于
Using devm_iio_device_alloc makes code simpler. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 05 6月, 2013 1 次提交
-
-
由 Sachin Kamat 提交于
The data structure is required only when DT is enabled. Hence compile it conditionally. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 4月, 2013 3 次提交
-
-
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: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
The sleep mode will allow to put the adc in sleep between conversion. Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Ludovic Desroches 提交于
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: NLudovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 26 3月, 2013 1 次提交
-
-
由 Lars-Peter Clausen 提交于
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: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 18 3月, 2013 1 次提交
-
-
由 Jonathan Cameron 提交于
The original info_mask is going away in favour of the broken out versions. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
-
- 23 1月, 2013 1 次提交
-
-
由 Thierry Reding 提交于
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 1月, 2013 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 12月, 2012 1 次提交
-
-
/opt/work/linux-2.6/drivers/iio/adc/at91_adc.c: In function 'at91_adc_trigger_handler': /opt/work/linux-2.6/drivers/iio/adc/at91_adc.c:83:22: error: 'indio_dev' undeclared (first use in this function) /opt/work/linux-2.6/drivers/iio/adc/at91_adc.c:83:22: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: linux-iio@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 10 11月, 2012 1 次提交
-
-
由 Jonathan Cameron 提交于
Route all buffer writes through the demux. Addition or removal of a buffer results in tear down and setup of all the buffers for a given device. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Tested-by: Nsrinivas pandruvada <srinivas.pandruvada@intel.com>
-
- 31 10月, 2012 1 次提交
-
-
由 Axel Lin 提交于
This reverts commit 45259859. This fixes build error because devm_kcalloc does not exist in current tree. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 20 10月, 2012 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Use dev_kcalloc instead of devm_kzalloc to allocate arrays since it is semantically more appropriate. While we are at it the patch also fixes the following coccinelle warning: drivers/iio/adc/at91_adc.c:277:25-31: ERROR: application of sizeof to pointer Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-By: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-