17 Jun, 2020
1 commit
-
bcm63xx arch resets the SPI controller at early boot. However, bmips arch
needs to perform a reset when probing the driver.Signed-off-by: Álvaro Fernández Rojas
Reviewed-by: Philipp Zabel
Reviewed-by: Florian Fainelli
Link: https://lore.kernel.org/r/20200616173235.3473149-2-noltari@gmail.com
Signed-off-by: Mark Brown
15 Oct, 2019
1 commit
-
The driver errors out if `delay_usecs` is non-zero. This error condition
should be extended to the new `delay` field, to account for when it will be
used.Signed-off-by: Alexandru Ardelean
Link: https://lore.kernel.org/r/20190926105147.7839-19-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown
02 Aug, 2019
1 commit
-
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.//
@@
expression ret;
struct platform_device *E;
@@ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);if ( \( ret < 0 \| ret
While we're here, remove braces on if statements that only have one
statement (manually).Cc: Mark Brown
Cc: linux-spi@vger.kernel.org
Cc: Greg Kroah-Hartman
Signed-off-by: Stephen Boyd
Link: https://lore.kernel.org/r/20190730181557.90391-42-swboyd@chromium.org
Signed-off-by: Mark Brown
31 May, 2019
1 commit
-
Based on 3 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that 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 detailsthis program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] this program is distributed in the hope that
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 detailsthis program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] this program is distributed in the hope
that 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 detailsextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1105 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Richard Fontana
Reviewed-by: Kate Stewart
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman
08 Aug, 2017
1 commit
-
platform_get_irq() returns an error code, but the spi-bcm63xx driver
ignores it and always returns -ENXIO. This is not correct and,
prevents -EPROBE_DEFER from being propagated properly.Notice that platform_get_irq() no longer returns 0 on error:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92afPrint and propagate the return value of platform_get_irq on failure.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Mark Brown
21 Jun, 2017
1 commit
-
This patch fixes the checkpatch.pl warnings on the driver
file.Signed-off-by: Aravind Thokala
Reviewed-by: Florian Fainelli
Signed-off-by: Mark Brown
22 Feb, 2017
3 commits
-
Fix compilation by renaming argument dev to spi as expected by the code.
Fixes the following error:
drivers/spi/spi-bcm63xx.c: In function ‘bcm63xx_spi_max_length’:
drivers/spi/spi-bcm63xx.c:434:50: error: ‘spi’ undeclared (first use in this function)
struct bcm63xx_spi *bs = spi_master_get_devdata(spi->master);
^~~Fixes: 0135c03df914 ("spi/bcm63xx: make spi subsystem aware of message size limits")
Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown -
Add required binding support to probe through device tree.
Use the compatible instead of the resource size for identifiying the
block type, and allow reducing the number of cs lines through OF.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown -
The bcm63xx SPI controller does not allow manual control of the CS
lines and will toggle it automatically before and after sending data,
so we are limited to messages that fit in the FIFO buffer. Since the CS
lines aren't available as GPIOs either, we will need to make slave
drivers aware of this limitation so they can handle them accordingly.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown
12 Jan, 2016
1 commit
-
…topic/cadence' and 'spi/topic/davinci' into spi-next
17 Nov, 2015
2 commits
-
With a 64-bit resource_size_t, we get a build warning on bcm63xx_spi_probe:
drivers/spi/spi-bcm63xx.c:565:16: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=]
As we are printing a resource, we can just use the %pr format
specifier that pretty-prints the address and avoids the warning.Signed-off-by: Arnd Bergmann
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
drivers/spi/spi-bcm63xx.c: In function ‘bcm63xx_spi_setup_transfer’:
drivers/spi/spi-bcm63xx.c:207: warning: ‘clk_cfg’ may be used uninitialized in this functionWhile this is a false positive, it can easily be avoided by selecting
the default clock configuration first.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Mark Brown
23 Oct, 2015
1 commit
-
Move all register definitions and structs into the driver. This allows
us dropping the platform_data struct and drop any arch specific
includes. Make use of different device names to identify the version of
the block we have.Since we now have full control over the message width, we can drop the
size check, which was broken anyway, since it never set ret to any error
code.Also since we now have no arch depedendent resources, we can now allow
compiling it for any arch, hidden behind COMPILE_TEST.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown
13 Oct, 2015
2 commits
-
Make the message control word parameters part of the register offsets
array so we have them all in one struct.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown -
Use the correct guard CONFIG_CPU_BIG_ENDIAN and the *be accessors to
follow native endianness on big endian systems.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown
15 Sep, 2015
4 commits
-
Replace all bcm_read* with (io)read. Due to this block following
system endianness, make sure we match that.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown -
We always pass 0 as the spi bus number, so we might as well hard code
it.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown -
We always pass 8 for the number of chip selects, so we can as well
hardcode it to this number.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown -
Fixes the following warning:
drivers/spi/spi-bcm63xx.c:125:5: warning: unused variable 'rx_tail' [-Wunused-variable]
u8 rx_tail;
^Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown
22 Dec, 2014
1 commit
-
Signed-off-by: Jarkko Nikula
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
15 Apr, 2014
1 commit
-
Signed-off-by: Axel Lin
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
26 Mar, 2014
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
10 Feb, 2014
1 commit
-
Calling init_completion() once is enough.
For the rest of the iterations, call reinit_completion() instead.Signed-off-by: Axel Lin
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
23 Jan, 2014
1 commit
-
…pic/bcm63xx-hsspi', 'spi/topic/bitbang', 'spi/topic/bpw', 'spi/topic/clps711x', 'spi/topic/coldfire', 'spi/topic/davinci', 'spi/topic/dw' and 'spi/topic/falcon' into spi-linus
18 Dec, 2013
6 commits
-
Once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory, otherwise we will
leak a reference to master. Fix by removing the unnecessary
spi_master_get() call.Fixes: 247263dba208 ('spi: bcm63xx: use devm_spi_register_master()')
Signed-off-by: Wei Yongjun
Signed-off-by: Mark Brown -
Use the correct symbol to guard the callbacks and use appropriate defines
for setting up the ops struct.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown -
Ensure we notice if the clock cannot be enabled for any reason and pass
the error down.Signed-off-by: Jonas Gorski
Signed-off-by: Mark Brown -
The rx_tail register is only 8 bit wide, so it will wrap around
after 256 read bytes. This makes it rather meaningless, so drop any
usage of it to not treat reads over 256 as failed.Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown -
Use devm_clk_get() to make cleanup paths simpler.
Signed-off-by: Jingoo Han
Acked-by: Jonas Gorski
Signed-off-by: Mark Brown -
The spi command must include the full message length including any
prepended writes, else transfers larger than 256 bytes will be
incomplete.Signed-off-by: Jonas Gorski
Acked-by: Florian Fainelli
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
15 Nov, 2013
1 commit
-
Once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory, otherwise we will
leak a reference to master. Fix by removing the unnecessary
spi_master_get() call.Fixes: 247263dba208 ('spi: bcm63xx: use devm_spi_register_master()')
Signed-off-by: Wei Yongjun
Signed-off-by: Mark Brown
26 Sep, 2013
1 commit
-
Use devm_spi_register_master() to make cleanup paths simpler,
and remove a duplicate put.Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
01 Sep, 2013
2 commits
29 Aug, 2013
2 commits
-
Use dev_get_drvdata() instead of platform_get_drvdata(to_platform_device(dev)).
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown -
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown