30 Dec, 2020
1 commit
-
[ Upstream commit 763eab7074f6e71babd85d796156f05a675f9510 ]
pm_runtime_get_sync will increment pm usage counter even it
failed. Forgetting to pm_runtime_put_noidle will result in
reference leak in two callers(tegra_slink_setup and
tegra_slink_resume), so we should fix it.Fixes: dc4dc36056392 ("spi: tegra: add spi driver for SLINK controller")
Signed-off-by: Zhang Qilong
Link: https://lore.kernel.org/r/20201103141345.6188-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown
Signed-off-by: Sasha Levin
09 Sep, 2020
1 commit
-
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.Signed-off-by: Krzysztof Kozlowski
Link: https://lore.kernel.org/r/20200901152713.18629-11-krzk@kernel.org
Signed-off-by: Mark Brown
28 May, 2020
1 commit
-
pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.Signed-off-by: Dinghao Liu
Link: https://lore.kernel.org/r/20200523122909.25247-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown
15 Nov, 2019
2 commits
-
The driver misses calling clk_unprepare in probe failure and remove.
Add the calls to fix it.Signed-off-by: Chuhong Yuan
Link: https://lore.kernel.org/r/20191115083122.12278-1-hslester96@gmail.com
Signed-off-by: Mark Brown -
dma_request_slave_channel_reason() is:
#define dma_request_slave_channel_reason(dev, name) \
dma_request_chan(dev, name)Signed-off-by: Peter Ujfalusi
Acked-by: Jon Hunter
Link: https://lore.kernel.org/r/20191113094256.1108-10-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown
31 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms and conditions of the gnu general public license
version 2 as published by the free software foundation this program
is distributed in the hope it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not see http www gnu org
licensesextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 228 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Steve Winslow
Reviewed-by: Richard Fontana
Reviewed-by: Alexios Zavras
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528171438.107155473@linutronix.de
Signed-off-by: Greg Kroah-Hartman
27 Mar, 2019
1 commit
-
To transfer via SPI the tegra20-slink driver first sets the command
register, which contains the chip select value, and after that the
command2 register, which contains the chip select line. This leads to a
small spike in the chip selct 0 line between the set of the value and
the selection of the chip select line.This commit changes the order of the register writes so that first the
chip select line is chosen and then the value is set, removing the
spike.Signed-off-by: Randolph Maaßen
Reviewed-by: Sowjanya Komatineni
Signed-off-by: Mark Brown
03 Sep, 2018
1 commit
-
Depending on the SPI instance one may get an interrupt storm upon
requesting resp. interrupt unless the clock is explicitly enabled
beforehand. This has been observed trying to bring up instance 4 on
T20.Signed-off-by: Marcel Ziswiler
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
06 Mar, 2018
1 commit
-
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
Acked-by: Laxman Dewangan
Signed-off-by: Mark Brown
20 Jul, 2017
1 commit
-
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.No functional changes.
Cc: Laxman Dewangan
Cc: Mark Brown
Cc: Thierry Reding
Cc: Jonathan Hunter
Cc: linux-spi@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Philipp Zabel
Signed-off-by: Mark Brown
25 Apr, 2017
1 commit
-
trivial fix to spelling mistake in dbg_err messages
Signed-off-by: Colin Ian King
Signed-off-by: Mark Brown
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
08 May, 2014
1 commit
-
Make of_device_id array const, because all OF functions
handle it as const.Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
30 Mar, 2014
2 commits
-
…512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next
-
…pic/clps711x', 'spi/topic/coldfire', 'spi/topic/completion' and 'spi/topic/davinci' into spi-next
16 Feb, 2014
1 commit
-
The purpose of commit 1e8a52e18cfb
"spi: By default setup spi_masters with 1 chipselect and dynamics bus number"
is to avoid setting default value for bus_num and num_chipselect in spi master
drivers. So let's remove the duplicate code.Signed-off-by: Axel Lin
Acked-by: Uwe Kleine-König
Acked-By: David Daney
Acked-by: Stephen Warren
Signed-off-by: Mark Brown
13 Feb, 2014
1 commit
-
In spi_add_device(), we have the code to validate spi->chip_select.
So remove the duplicate code in various drivers.Signed-off-by: Axel Lin
Acked-by: Stephen Warren
Signed-off-by: Mark Brown
11 Feb, 2014
1 commit
-
Use master->max_speed_hz instead of tspi->spi_max_frequency, so spi core will
handle checking transfer speed.In additional, since commit 052eb2d49006 'spi: core: Set max_speed_hz of
spi_device default to max_speed_hz of controller',
spi core will also set default spi->max_speed_hz if it is not set.
So remove the duplicate code in tegra_slink_setup.Signed-off-by: Axel Lin
Acked-by: Stephen Warren
Signed-off-by: Mark Brown
03 Feb, 2014
1 commit
-
None of these files are actually using any __init type directives
and hence don't need to include . Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.Signed-off-by: Paul Gortmaker
Signed-off-by: Mark Brown
26 Jan, 2014
1 commit
-
Pull spi updates from Mark Brown:
"A respun version of the merges for the pull request previously sent
with a few additional fixes. The last two merges were fixed up by
hand since the branches have moved on and currently have the prior
merge in them.Quite a busy release for the SPI subsystem, mostly in cleanups big and
small scattered through the stack rather than anything else:- New driver for the Broadcom BC63xx HSSPI controller
- Fix duplicate device registration for ACPI
- Conversion of s3c64xx to DMAEngine (this pulls in platform and DMA
changes upon which the transiton depends)
- Some small optimisations to reduce the amount of time we hold locks
in the datapath, eliminate some redundant checks and the size of a
spi_transfer
- Lots of fixes, cleanups and general enhancements to drivers,
especially the rspi and Atmel drivers"* tag 'spi-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (112 commits)
spi: core: Fix transfer failure when master->transfer_one returns positive value
spi: Correct set_cs() documentation
spi: Clarify transfer_one() w.r.t. spi_finalize_current_transfer()
spi: Spelling s/finised/finished/
spi: sc18is602: Convert to use bits_per_word_mask
spi: Remove duplicate code to set default bits_per_word setting
spi/pxa2xx: fix compilation warning when !CONFIG_PM_SLEEP
spi: clps711x: Add MODULE_ALIAS to support module auto-loading
spi: rspi: Add missing clk_disable() calls in error and cleanup paths
spi: rspi: Spelling s/transmition/transmission/
spi: rspi: Add support for specifying CPHA/CPOL
spi/pxa2xx: initialize DMA channels to -1 to prevent inadvertent match
spi: rspi: Add more QSPI register documentation
spi: rspi: Add more RSPI register documentation
spi: rspi: Remove dependency on DMAE for SHMOBILE
spi/s3c64xx: Correct indentation
spi: sh: Use spi_sh_clear_bit() instead of open-coded
spi: bitbang: Grammar s/make to make/to make/
spi: sh-hspi: Spelling s/recive/receive/
spi: core: Improve tx/rx_nbits check comments
...
17 Dec, 2013
1 commit
-
dma_request_slave_channel() returns NULL on error and not ERR_PTRs.
I've fixed this by using dma_request_slave_channel_reason() which does
return ERR_PTRs.Fixes: a915d150f68d ('spi: tegra: convert to standard DMA DT bindings')
Signed-off-by: Dan Carpenter
Signed-off-by: Stephen Warren
12 Dec, 2013
2 commits
-
By using dma_request_slave_channel_or_err(), the DMA slave ID can be
looked up from standard DT properties, and squirrelled away during
channel allocation. Hence, there's no need to use a custom DT property
to store the slave ID.Signed-off-by: Stephen Warren
Acked-by: Mark Brown -
Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.Signed-off-by: Stephen Warren
Acked-by: Mark Brown
Reviewed-by: Thierry Reding
10 Dec, 2013
1 commit
-
Previously used “unsigned long” may lead to confusion should the code
be compiled for 64-bit machine.Signed-off-by: Michal Nazarewicz
Signed-off-by: Mark Brown
15 Nov, 2013
1 commit
-
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang
Acked-by: Linus Walleij (personally at LCE13)
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Oct, 2013
2 commits
17 Oct, 2013
2 commits
-
This is more idiomatic for the factored out message processing and gives a
small simplification of the code since we always set the per-transfer
parameters in the same fashion.Signed-off-by: Mark Brown
Tested-by: Stephen Warren -
This is a half done conversion with minimal code reorganisation provided
for bisection purposes. A further patch will move the first transfer
preparation into tegra_slink_prepare_message().The cs_change and udelay handling is removed, these should be
implemented by the framework and in any case are buggy - the two fields
should not be related and the cs_change handling appears to at best only
work the first time it's used in a message.Signed-off-by: Mark Brown
Tested-by: Stephen Warren
15 Oct, 2013
1 commit
-
Fix the following checkpatch warning.
WARNING: space prohibited before semicolon
Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
08 Oct, 2013
1 commit
-
Currently transfer_one_message() checks to see if the message consists of
a single spi_transfer and tells _start_transfer_one() but it just ignores
this. Don't bother.Signed-off-by: Mark Brown
Acked-by: Laxman Dewangan
26 Sep, 2013
1 commit
-
Use devm_spi_register_master() to make cleanup paths simpler.
Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
17 Sep, 2013
1 commit
-
This also makes the intention more clear.
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
30 Jul, 2013
2 commits
-
Signed-off-by: Mark Brown
Reviewed-by: Stephen Warren -
Currently the tegra slink driver acquires a runtime PM reference for the
duration of each transfer. This may result in the IP being powered down
between transfers which would be at best wasteful. Instead it is better
to do this in the callbacks that are generated before and after starting
a series of transfers, keeping the IP powered throughout.Signed-off-by: Mark Brown
Acked-by: Laxman Dewangan
23 May, 2013
1 commit
-
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
08 Apr, 2013
1 commit
-
Neither tegra20_spi_cdata nor tegra30_spi_cdata are used outside this
file so they can, and should, be static.Signed-off-by: Wei Yongjun
Reviewed-by: Thierry Reding
Signed-off-by: Mark Brown
07 Apr, 2013
2 commits
-
Tegra only supports, and always enables, device tree. Remove all ifdefs
and runtime checks for DT support from the driver. Platform data is
therefore no longer required. Rework the driver to parse the device tree
directly into struct tegra_slink_data.Signed-off-by: Stephen Warren
Signed-off-by: Grant Likely -
There is no code to set spi->controller_data, and hence the HW CS logic
can never trigger. Remove the unused code.Signed-off-by: Stephen Warren
Signed-off-by: Grant Likely
04 Apr, 2013
1 commit
-
This reverts commit faa98f7ea6c720beec8a800c9ac6975f760467e2 which was
applied in error due to discussion ending up in the wrong thread.