- 13 2月, 2016 1 次提交
-
-
由 Tony Lindgren 提交于
Commit 5de85b9d ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") introduced pm_runtime_reinit() that is used to reinitialize PM runtime after -EPROBE_DEFER. This allows shutting down the device after a failed probe. However, for drivers using pm_runtime_use_autosuspend() this can cause a state where suspend callback is never called after -EPROBE_DEFER. On the following device driver probe, hardware state is different from the PM runtime state causing omap_device to produce the following error: omap_device_enable() called from invalid state 1 And with omap_device and omap hardware being picky for PM, this will block any deeper idle states in hardware. The solution is to fix the drivers to follow the PM runtime documentation: 1. For sections of code that needs the device disabled, use pm_runtime_put_sync_suspend() if pm_runtime_set_autosuspend() has been set. 2. For driver exit code, use pm_runtime_dont_use_autosuspend() before pm_runtime_put_sync() if pm_runtime_use_autosuspend() has been set. Fixes: 5de85b9d ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") Cc: linux-spi@vger.kernel.org Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Mark Brown <broonie@kernel.org> Cc: Nishanth Menon <nm@ti.com> Cc: Rafael J. Wysocki <rafael@kernel.org> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 2月, 2016 1 次提交
-
-
由 Stephan Olbrich 提交于
The bitmasks for txempty and idle interrupts were interchanged. Signed-off-by: NStephan Olbrich <stephanolbrich@gmx.de> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 1月, 2016 1 次提交
-
-
由 Cyrille Pitchen 提交于
The non-DT platform that uses this driver (actually the AVR32) was taking a bad branch for determining if the IP would use gpio for CS. Adding the presence of DT as a condition fixes this issue. Fixes: 48203034 ("spi: atmel: add support for the internal chip-select of the spi controller") Reported-by: NMans Rullgard <mans@mansr.com> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com> [nicolas.ferre@atmel.com: extract from ml discussion] Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Tested-by: NMans Rullgard <mans@mansr.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 23 1月, 2016 2 次提交
-
-
由 Hou Zhiqiang 提交于
The maximum length during one transcation is 64KiB. Signed-off-by: NHou Zhiqiang <B48286@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Gao Pan 提交于
In spi_imx_dma_transfer(), when desc_rx = dmaengine_prep_slave_sg() fails, the context goes to label no_dma and then return. However, the memory allocated for desc_tx has not been freed yet, which leads to resource leak. Signed-off-by: NGao Pan <pandy.gao@nxp.com> Reviewed-by: NFugang Duan <B38611@freescale.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 1月, 2016 1 次提交
-
-
由 Arnd Bergmann 提交于
These variables are always used uninitialized: drivers/spi/spi-loopback-test.c: In function 'spi_test_run_iter': drivers/spi/spi-loopback-test.c:768:17: warning: 'rx_count' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/spi/spi-loopback-test.c:762:17: warning: 'tx_count' may be used uninitialized in this function [-Wmaybe-uninitialized] Adding an explicit initialization seems to be the only workable solution here, to make the code behave correctly and build without warning. Fixes: 84e0c4e5 ("spi: add loopback test driver to allow for spi_master regression tests") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 1月, 2016 1 次提交
-
-
由 Dan Carpenter 提交于
There should be an 's' on "dump_message" so it matches the module_param. Fixes: 84e0c4e5 ('spi: add loopback test driver to allow for spi_master regression tests') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 1月, 2016 1 次提交
-
-
由 Marcus Weseloh 提交于
The SPI core calls set_cs before a transfer, but the SUN4I_CTL_CS_MANUAL flag is only set in transfer_one. This leads to the following pattern on the chip-select line (with runtime power-management on every transfer, without it only on the first one): activate, deactivate, activate, transfer, deactivate Moving the configuration of the SUN4I_CTL_CS_MANUAL flag from transfer_one to set_cs removes the double activation. Signed-off-by: NMarcus Weseloh <mweseloh42@gmail.com> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 1月, 2016 4 次提交
-
-
由 Martin Sperl 提交于
The spi_check_rx_ranges can always get executed independent of if we have a real loopback situation. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Martin Sperl 提交于
Rename method spi_test_fill_tx to spi_test_fill_pattern to better describe what it does. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Martin Sperl 提交于
Currently the rx_buf does not get set with the SPI_TEST_PATTERN_UNWRITTEN when tx_buf == NULL in the transfer. Reorder code so that it gets done also under this specific condition. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Michal Suchanek 提交于
The fsl-espi hardware can trasfer at most 64K data so report teh limitation. Based on patch by Heiner Kallweit <hkallweit1@gmail.com> CC: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 1月, 2016 2 次提交
-
-
由 Geliang Tang 提交于
Use to_platform_device() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Reviewed-by: NMoritz Fischer <moritz.fischer@ettus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Geliang Tang 提交于
Use to_platform_device() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Reviewed-by: NMoritz Fischer <moritz.fischer@ettus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 01 1月, 2016 3 次提交
-
-
由 Christophe RICARD 提交于
spi->irq was ignoring GpioInt property setting it to -1. acpi_dev_gpio_irq_get returns and configure the slave IRQ according to the ACPI slave node description. It is now inline with devicetree behavior. Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Leilk Liu 提交于
This patch adds spi support for mt2701 IC. Signed-off-by: NLeilk Liu <leilk.liu@mediatek.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Leilk Liu 提交于
This patch merge all identical compat into on mtk_common_compat and used for all compatible soc. Signed-off-by: NLeilk Liu <leilk.liu@mediatek.com> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 31 12月, 2015 2 次提交
-
-
由 Nicolas Boichat 提交于
In the case where transfer length is not a multiple of 4, KASAN reports 2 out-of-bounds memory accesses: - mtk_spi_interrupt: ioread32_rep writes past the end of trans->rx_buf. - mtk_spi_fifo_transfer: iowrite32_rep reads past the end of xfer->tx_buf. Fix this by using memcpy on the remainder of the bytes. Signed-off-by: NNicolas Boichat <drinkcat@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sylwester Nawrocki 提交于
s5pv210 and exynos4 are now DT only platforms hence these entries can now be safely removed from the match table. Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 23 12月, 2015 3 次提交
-
-
由 Geliang Tang 提交于
Use to_spi_device() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jisheng Zhang 提交于
The TMODE available value is well defined and documented in the header file. Use it and remove the comment. Signed-off-by: NJisheng Zhang <jszhang@marvell.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Zhao Qiang 提交于
ls1 has qe and ls1 has arm cpu. move qe from arch/powerpc to drivers/soc/fsl to adapt to powerpc and arm Signed-off-by: NZhao Qiang <qiang.zhao@freescale.com> Signed-off-by: NScott Wood <scottwood@freescale.com>
-
- 16 12月, 2015 6 次提交
-
-
由 Johan Hovold 提交于
Fix parent-device reference leak due to SPI-core taking an unnecessary reference to the parent when allocating the master structure, a reference that was never released. Note that driver core takes its own reference to the parent when the master device is registered. Fixes: 49dce689 ("spi doesn't need class_device") Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
由 Mark Brown 提交于
We use the spi_lock spinlock to protect against races between the device being removed and file operations on the spidev. This means that in the removal path all references to the device need to be done under lock as in removal we dropping references to the device. Reported-by: NVegard Nossum <vegard.nossum@oracle.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anton Bondarenko 提交于
If SPI device supports DMA mode, but DMA controller is not yet available due to e.g. a delay in the corresponding kernel module initialization, retry to initialize SPI driver later on instead of falling back into PIO only mode. Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anton Bondarenko 提交于
On SDMA initialization return exactly the same error, which is reported by dma_request_slave_channel_reason(), it is a preceding change to defer SPI DMA initialization, if SDMA module is not yet available. Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anton Bondarenko 提交于
Limit SPI_LOOP mode to ECSPI controller (iMX.51, iMX53 and i.MX6) only since there is no support in other families specific code for now. Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anton Bondarenko 提交于
If controller hold in reset it's not possible to write any register except CTRL. So all other registers must be updated only after controller bring out from reset. Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 12月, 2015 3 次提交
-
-
由 Martin Sperl 提交于
Added additional transfer length to test that are not a power of 2. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Martin Sperl 提交于
The test "two tx+rx transfers - alter second" actually modifies the first not the second transfer, which - in conjunction with testing the read data - results also in overwriting data read earlier. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Martin Sperl 提交于
Fixes the reported printk format issues reported by kbuild-test-robot. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 12月, 2015 5 次提交
-
-
由 Martin Sperl 提交于
adding the spi-loopback-test module to Kconfig and Makefile Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Martin Sperl 提交于
This driver is submitting lots of distinct spi-messages messages with all kinds of alignments and length pattern. Also distinct kinds of transfer pattern tests are implemented (rx, tx, rx/tx, tx+tx, tx+rx,...) Right now on a raspberry pi 752 distinct spi_messages are executed in 13 different scenarios. Configuration of additional test-pattern is easy, so that when new bugs in drivers get detected the relevant transfer pattern can also get added to the test framework, so that such situations are detected in other drivers as well. The idea behind this driver is to make it possible to also detect regressions in spi_master implementations when changes occur. Potentially these tests could get executed automatically in a test-server-farm. Signed-off-by: NMartin Sperl <kernel@martin.sperl.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sekhar Nori 提交于
Use dev_err() for reporting errors rather than dev_dbg(). Signed-off-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sekhar Nori 提交于
davinci_spi_bufs() uses wait_for_completion_interruptible() without bothering to handle -ERESTARTSYS. Due to this, sometime, it returns prematurely when a signal is received. Since the return value is never checked, userspace eventually receives a spurious -EIO. To fix this, use un-interruptible wait_for_completion_timeout(). Signed-off-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Bhuvanchandra DV 提交于
DSPI instances in Vybrid have a different amount of chip selects and CTARs (Clock and transfer Attributes Register). In case of DSPI1 we only have 2 CTAR registers and 4 CS. In present driver implementation CTAR offset is derived from CS instance which will lead to out of bound access if chip select instance is greater than CTAR register instance, hence use single CTAR0 register for all CS instances. Since we write the CTAR register anyway before each access, there is no value in using the additional CTAR registers. Also one should not program a value in CTAS for a CTAR register that is not present, hence configure CTAS to use CTAR0. Signed-off-by: NBhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 12月, 2015 4 次提交
-
-
由 Sudip Mukherjee 提交于
Using pr_* macros are more prefferable than using printk. Start using pr_* family of macros and define pr_fmt to be used with it. While at it remove DRVNAME from an existing pr_info() as the name is now being printed by pr_fmt. Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Sudip Mukherjee 提交于
As we have a struct device available it is better to use dev_warn() instead of printk. Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anton Bondarenko 提交于
Similar to other controller type checks add check function for IMX51. It includes IMX53 and IMX6. Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Anton Bondarenko 提交于
There is no need to have different watermarks levels since they are the same. Merge them into one WML parameter. Signed-off-by: NAnton Bondarenko <anton.bondarenko.sama@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-