Age | Commit message (Collapse) | Author | Files | Lines |
|
s5pv210 and exynos4 are now DT only platforms hence these
entries can now be safely removed from the match table.
Signed-off-by: Sylwester Nawrocki <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use to_spi_device() instead of open-coding it.
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The TMODE available value is well defined and documented in the header
file. Use it and remove the comment.
Signed-off-by: Jisheng Zhang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Zhao Qiang <[email protected]>
Signed-off-by: Scott Wood <[email protected]>
|
|
spi-linus
|
|
|
|
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: 49dce689ad4e ("spi doesn't need class_device")
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
|
|
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: Vegard Nossum <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Anton Bondarenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Vladimir Zapolskiy <[email protected]>
Signed-off-by: Anton Bondarenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Anton Bondarenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Anton Bondarenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Added additional transfer length to test that are not a power of 2.
Signed-off-by: Martin Sperl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Martin Sperl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Fixes the reported printk format issues reported by kbuild-test-robot.
Signed-off-by: Martin Sperl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
adding the spi-loopback-test module to Kconfig and Makefile
Signed-off-by: Martin Sperl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Martin Sperl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use dev_err() for reporting errors rather than
dev_dbg().
Signed-off-by: Sekhar Nori <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Sekhar Nori <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Bhuvanchandra DV <[email protected]>
Acked-by: Stefan Agner <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
As we have a struct device available it is better to use dev_warn()
instead of printk.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Similar to other controller type checks add check function for
IMX51. It includes IMX53 and IMX6.
Signed-off-by: Anton Bondarenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
There is no need to have different watermarks levels since they are the same.
Merge them into one WML parameter.
Signed-off-by: Anton Bondarenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The overflow may happen due to rescheduling for another task and/or interrupt
if we enable SPI HW before starting RX DMA. So RX DMA enabled first to make
sure data would be read out from FIFO ASAP. TX DMA enabled next to start
filling TX FIFO with new data. And finaly SPI HW enabled to start actual
data transfer.
The risk rise in case of heavy system load and high SPI clock.
Signed-off-by: Anton Bondarenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Not only TX DMA should be terminated, but RX DMA also. It's required
to avoid accidential DMA memory writes from RX DMA channel and properly
terminate transaction.
Signed-off-by: Anton Bondarenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Modify spi-lm70llp driver to use the new parallel port device model.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
checkpatch complains about space before closing brace.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
checkpatch complains about the allignment with open parenthesis.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
checkpatch was complaining about space after cast. But the cast to void
is not required at that place.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
checkpatch complains about missing blank line after declaration.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
checkpatch complains about multiple blank lines.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Loopback mode can be activated by setting bit LBC (LoopBack
Control) of register ECSPI_TESTREG.
Add support for it.
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Modify spi-butterfly driver to use the new parallel port device model.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
checkpatch complains about the allignment with open parenthesis.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
checkpatch was complaining about space after cast. But the cast to void
is not required at that place.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
checkpatch complains about multiple blank lines.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Mark (and unmark) device nodes with the POPULATE flag as appropriate.
This is required to avoid multi probing when enabling and populating SPI
buses in DT overlays.
Based on commit 4f001fd30145a6a8 ("i2c: Mark instantiated device nodes
with OF_POPULATE").
Suggested-by: Mark Brown <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Uninline spi_unregister_device() in preparation of adding more code to
it. Add kerneldoc documentation while we're at it.
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Occasionally the setup function will be called multiple times. Only request
the gpio the first time otherwise -EBUSY will occur on subsequent calls to
setup.
Reported-by: Joseph Bell <[email protected]>
Signed-off-by: Michael Welling <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Allow the topcliff-pch driver to be built for MIPS platforms, in
preparation for use on the MIPS Boston board.
Signed-off-by: Paul Burton <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
On 64-bit with CONFIG_SPI_DEBUG=y and #define VERBOSE:
drivers/spi/spidev.c:287:3: warning: format '%zd' expects argument of type 'signed size_t', but argument 4 has type '__u32' [-Wformat=]
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
'spi/fix/mediatek' and 'spi/fix/pl022' into spi-linus
|
|
The dw_spi_dma_ops structure is never modified, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <[email protected]>
Acked-by: Andy Shevchenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
When submitting an identical spi_message multiple times via spi_sync
the spi_message.frame_length does not get reset to 0 in __spi_validate
before adding up all spi_transfer.len resulting in
frame_length > actual_length on all but the first spi_sync call.
Signed-off-by: Martin Sperl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
mtk_spi_probe() calls pm_runtime_enable(), after
pm_runtime_enable() is called, it should call
pm_runtime_disable() in the failure flow.
Signed-off-by: Leilk Liu <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-mtk
|
|
Handle EPROBE_DEFER explicitly so that we ensure that we get the DMA
channel specified in the device tree, instead of depending on the DMA
controller getting probed before us.
Signed-off-by: Rabin Vincent <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
It's not need to re-read and re-write SPI_CMD_REG, so remove it.
Signed-off-by: Leilk Liu <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Commit 8b136baa5892 ("spi: pxa2xx: Detect number of enabled Intel LPSS SPI
chip select signals") added a block where lpss_ssp_setup() gets called
again for Intel LPSS SPI host controllers before checking number of chip
selects from the capabilities register.
There is no point in calling the function twice in probe so remove the
first call.
Reported-by: Aaron Lu <[email protected]>
Signed-off-by: Mika Westerberg <[email protected]>
Acked-by: Jarkko Nikula <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|