17 Jul, 2017
1 commit
-
This patch fixes the checkpatch.pl warnings on the driver
file.Signed-off-by: Aravind Thokala
Signed-off-by: Mark Brown
15 Dec, 2016
2 commits
-
Signed-off-by: Felix Fietkau
Signed-off-by: Mark Brown -
Several devices with multiple flash chips use the internal chip select
lines. Don't assume that chip select 1 and above are GPIO lines.Signed-off-by: Felix Fietkau
Signed-off-by: Mark Brown
24 Nov, 2016
1 commit
-
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/spi/spi-ath79.ko | grep alias
alias: platform:ath79-spiAfter this patch:
$ modinfo drivers/spi/spi-ath79.ko | grep alias
alias: platform:ath79-spi
alias: of:N*T*Cqca,ar7100-spiC*
alias: of:N*T*Cqca,ar7100-spiSigned-off-by: Javier Martinez Canillas
Signed-off-by: Mark Brown
01 Oct, 2015
1 commit
-
Simplify the code by switching from devm_ioremap to devm_ioremap_resource.
Checking the result of platform_get_resource is not needed as
devm_ioremap_resource checks the provided resource argument for NULL.Signed-off-by: Heiner Kallweit
Signed-off-by: Mark Brown
27 Apr, 2015
3 commits
-
The internal chip select CS0 wasn't initialized properly to work with
CS HIGH chips.Signed-off-by: Alban Bedel
Signed-off-by: Mark Brown -
Clocks should be prepared and unprepared, fix this by using
clk_prepare_enable() and clk_disable_unprepare() instead of
clk_enable() and clk_disable().Signed-off-by: Alban Bedel
Signed-off-by: Mark Brown -
Set the OF node of the spi controller and use the generic GPIO based
chip select instead of the custom controller data. As the controller
data isn't used by any board just drop it.Signed-off-by: Alban Bedel
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
1 commit
-
…512x-psc', 'spi/topic/mpc52xx', 'spi/topic/mxs', 'spi/topic/nuc900', 'spi/topic/oc-tiny' and 'spi/topic/octeon' into spi-next
03 Mar, 2014
1 commit
-
The 'ath79_spi_setup_cs' function initializes the chip
select line of a given SPI device in order to make sure
that the device is inactive.If the SPI_CS_HIGH bit is set for a given device, it
means that the CS line of that device is active HIGH
so it must be set to LOW initially. In case of GPIO
CS lines, the 'ath79_spi_setup_cs' function does the
opposite of that due to the wrong GPIO flags.Fix the code to use the correct GPIO flags.
Reported-by: Ronald Wahl
Signed-off-by: Gabor Juhos
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
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
18 Dec, 2013
1 commit
-
Use devm_*() functions to make cleanup paths simpler.
Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
17 Sep, 2013
1 commit
-
Many drivers that use bitbang library have a leak on probe error paths.
This is because once a spi_master_get() call succeeds, we need an additional
spi_master_put() call to free the memory.Fix this issue by moving the code taking a reference to master to
spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
success. With this change, the caller is responsible for calling
spi_bitbang_stop() to decrement the reference and spi_master_put() as
counterpart of spi_alloc_master() to prevent a memory leak.So now we have below patten for drivers using bitbang library:
probe:
spi_alloc_master -> Init reference count to 1
spi_bitbang_start -> Increment reference count
remove:
spi_bitbang_stop -> Decrement reference count
spi_master_put -> Decrement reference count (reference count reaches 0)Fixup all users accordingly.
Signed-off-by: Axel Lin
Suggested-by: Uwe Kleine-Koenig
Acked-by: Uwe Kleine-Koenig
Signed-off-by: Mark Brown
29 Aug, 2013
1 commit
-
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
26 Jun, 2013
1 commit
30 May, 2013
1 commit
-
Fill in the recently added spi_master.bits_per_word_mask field in as
many drivers as possible. Make related cleanups, such as removing any
redundant error-checking, or empty setup callbacks.Signed-off-by: Stephen Warren
Acked-by: H Hartley Sweeten
Signed-off-by: Mark Brown
13 May, 2013
1 commit
-
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by: Jingoo Han
Acked-by: Grant Likely
Signed-off-by: Mark Brown
06 Feb, 2013
1 commit
-
The SPI controller of the AR7xxx/AR9xxx SoCs
have a special mode which allows the SoC to
directly read data from SPI flash chips. In
this mode, the content of the SPI flash chip
can be accessed via a memory mapped region.During early init time, the kernel expects
that the flash chip is accessible through
that memory region because it reads board
specific values (e.g. MAC address, WiFi
calibration data) from the flash on various
boards.This is working if the kernel is loaded
directly by the bootloader because that
leaves the SPI controller in the special
mode. However it is not working in a kexec'd
kernel because the SPI driver does not restore
the special mode during shutdown.The patch adds a shutdown handler to fix this
issue.Signed-off-by: Gabor Juhos
Signed-off-by: Grant Likely
05 Feb, 2013
5 commits
-
Currently we are initializing the SPI controller in
the chip select line function, and that function is
called once for each SPI device on the bus. If a
board has multiple SPI devices, the controller will
be initialized multiple times.Introduce ath79_spi_{en,dis}able helper functions,
and call those from probe/response in order to avoid
the mutliple initialization of the controller.Signed-off-by: Gabor Juhos
Signed-off-by: Grant Likely -
Use gpio_request_one() instead of multiple gpiolib calls.
Signed-off-by: Gabor Juhos
Signed-off-by: Grant Likely -
The spi_bitbang driver calls the chipselect function
of the driver from spi_bitbang_setup in order to
deselect the given SPI chip, so we don't have to
initialize the CS line here.Signed-off-by: Gabor Juhos
Signed-off-by: Grant Likely -
The 'ath79_spi_txrx_mode0' function does not
set the SCK signal to LOW at the end of a word
transfer. This causes communications errors with
certain devices (e.g. the PCF2123 RTC chip).The patch ensures that the SCK signal will be LOW.
Signed-off-by: Gabor Juhos
Signed-off-by: Grant Likely -
The driver uses the "as fast as it can" approach
to drive the SCK signal. However this does not
work with certain low speed SPI chips (e.g. the
PCF2123 RTC chip).The patch adds per-bit slowdowns in order to be
able to use the driver with such chips as well.Signed-off-by: Gabor Juhos
Signed-off-by: Grant Likely
08 Dec, 2012
1 commit
-
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.Bill Pemberton has done most of the legwork on this series. I've used
his script to purge the attributes from the drivers/gpio tree.Reported-by: Bill Pemberton
Signed-off-by: Grant Likely
20 May, 2012
1 commit
-
Trivial simplification. Instead of requiring spi master drivers to
always set the bus number (even when a dynamic number is desired),
this patch modifies spi_alloc_master() to initialize num_chipselect to
1 (because there will always be at least one CS) and bus_num to -1 for
dynamic allocation. This simplifies the code needed to be written for
drivers.Signed-off-by: Grant Likely
08 Dec, 2011
1 commit
-
Whithout including 'linux/module.h' spi-ath79 driver fails to compile
with the these errors:drivers/spi/spi-ath79.c:273:12: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/spi/spi-ath79.c:278:20: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-ath79.c:278:1: warning: data definition has no type or storage class
drivers/spi/spi-ath79.c:278:1: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/spi/spi-ath79.c:278:20: warning: function declaration isn't a prototype
drivers/spi/spi-ath79.c:279:15: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-ath79.c:279:1: warning: data definition has no type or storage class
drivers/spi/spi-ath79.c:279:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/spi/spi-ath79.c:279:15: warning: function declaration isn't a prototype
drivers/spi/spi-ath79.c:280:16: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-ath79.c:280:1: warning: data definition has no type or storage class
drivers/spi/spi-ath79.c:280:1: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/spi/spi-ath79.c:280:16: warning: function declaration isn't a prototype
drivers/spi/spi-ath79.c:281:14: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-ath79.c:281:1: warning: data definition has no type or storage class
drivers/spi/spi-ath79.c:281:1: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS'
drivers/spi/spi-ath79.c:281:14: warning: function declaration isn't a prototypeSigned-off-by: Gabor Juhos
Signed-off-by: Wolfram Sang
25 Oct, 2011
1 commit
-
For simple modules that contain a single platform_driver without any
additional setup code then ends up being a block of duplicated
boilerplate. This patch adds a new macro, module_platform_driver(),
which replaces the module_init()/module_exit() registrations with
template functions.Signed-off-by: Grant Likely
Acked-by: Greg Kroah-Hartman
Reviewed-by: Magnus Damm
Reviewed-by: Mark Brown
Reviewed-by: Stephen Boyd
11 Jun, 2011
1 commit
-
Done via coccinelle scripts like:
@@
struct resource *ptr;
@@- ptr->end - ptr->start + 1
+ resource_size(ptr)and some grep and typing.
Mostly uncompiled, no cross-compilers.
Signed-off-by: Joe Perches
Signed-off-by: Grant Likely
06 Jun, 2011
1 commit
-
Sort the SPI makefile and enforce the naming convention spi_*.c for
spi drivers.This change also rolls the contents of atmel_spi.h into the .c file
since there is only one user of that particular include file.v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be
be the predominant pattern for subsystem prefixes.
- Clean up filenames in Kconfig and header comment blocksSigned-off-by: Grant Likely
Acked-by: Wolfram Sang
Acked-by: Linus Walleij