Age | Commit message (Collapse) | Author | Files | Lines |
|
Use devm_*() functions to make cleanup paths simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
With CONFIG_ARM_LPAE=y spi driver throws below warning
drivers/spi/spi-davinci.c: In function ‘davinci_spi_probe’:
drivers/spi/spi-davinci.c:965:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘resource_size_t’ [-Wformat]
drivers/spi/spi-davinci.c:965:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘resource_size_t’ [-Wformat]
Lets use '%pa' to properly print 'resource_size_t' type variables.
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.
[[email protected]: linux-next resyncs]
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Linus Walleij <[email protected]> (personally at LCE13)
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
|
|
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 <[email protected]>
Suggested-by: Uwe Kleine-Koenig <[email protected]>
Acked-by: Uwe Kleine-Koenig <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
'prescale' contains the return value of davinci_spi_get_prescale()
which is a signed integer. Convert 'prescale' to integer to silence
the following warning:
drivers/spi/spi-davinci.c:318 davinci_spi_setup_transfer() warn:
unsigned 'prescale' is never less than zero.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
|
|
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Commit 048177ce3b3962852fd34a7e04938959271c7e70 (spi: spi-davinci:
convert to DMA engine API) introduced a regression: dma_map_single()
is called with direction DMA_FROM_DEVICE for rx and for tx.
Signed-off-by: Christian Eggers <[email protected]>
Acked-by: Matt Porter <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected] # v3.7.x+
|
|
|
|
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 <[email protected]>
Acked-by: H Hartley Sweeten <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
|
|
Follow DT naming convention for compatible property of the blob.
Use first chip name that introduced the specific version of the
device.
Signed-off-by: Manjunathappa, Prakash <[email protected]>
Acked-by: Grant Likely <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
|
|
Fix below module build error:
CC [M] drivers/spi/spi-davinci.o
drivers/spi/spi-davinci.c:774:1: error: '__mod_of_device_table' aliased
to undefined symbol 'davini_spi_of_match'
drivers/spi/spi-davinci.c:774:1: error: '__mod_of_device_table' aliased
to undefined symbol 'davini_spi_of_match'
make[2]: *** [drivers/spi/spi-davinci.o] Error 1
make[1]: *** [drivers/spi] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2
Signed-off-by: Manjunathappa, Prakash <[email protected]>
Acked-by: Sekhar Nori <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
With RT pre-empt patch applied to Linux kernel, the irq handler will be
force converted to an irq thread. spi driver can get back to back messages
from the slave device. In such cases, IRQ thread doesn't get a chance to
run to read the slave data. Hence the irq handler must be run in hard irq
context to read/write data from slave device. Otherwise, the kernel goes
into a deadlock. This patch fixes this issue when PREEMPT_RT_FULL is
enabled in the kernel. A dummy thread function is provided to satisfy the
request_threaded_irq() API. Passing a NULL for function also causes the
irq handler to be executed in the thread context.
Signed-off-by: Murali Karicheri <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
This adds OF support to DaVinci SPI controller to configure platform
data through device bindings. Also replaces clk_enable() with
of clk_prepare_enable() as well as clk_disable() with
clk_disable_unprepare().
Signed-off-by: Murali Karicheri <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Pull slave-dmaengine updates from Vinod Koul:
"This time we have Andy updates on dw_dmac which is attempting to make
this IP block available as PCI and platform device though not fully
complete this time.
We also have TI EDMA moving the dma driver to use dmaengine APIs, also
have a new driver for mmp-tdma, along with bunch of small updates.
Now for your excitement the merge is little unusual here, while
merging the auto merge on linux-next picks wrong choice for pl330
(drivers/dma/pl330.c) and this causes build failure. The correct
resolution is in linux-next. (DMA: PL330: Fix build error) I didn't
back merge your tree this time as you are better than me so no point
in doing that for me :)"
Fixed the pl330 conflict as in linux-next, along with trivial header
file conflicts due to changed includes.
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (29 commits)
dma: tegra: fix interrupt name issue with apb dma.
dw_dmac: fix a regression in dwc_prep_dma_memcpy
dw_dmac: introduce software emulation of LLP transfers
dw_dmac: autoconfigure data_width or get it via platform data
dw_dmac: autoconfigure block_size or use platform data
dw_dmac: get number of channels from hardware if possible
dw_dmac: fill optional encoded parameters in register structure
dw_dmac: mark dwc_dump_chan_regs as inline
DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources
DMA: PL330: Remove redundant runtime_suspend/resume functions
DMA: PL330: Remove controller clock enable/disable
dmaengine: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
DMA: PL330: Set the capability of pdm0 and pdm1 as DMA_PRIVATE
ARM: EXYNOS: Set the capability of pdm0 and pdm1 as DMA_PRIVATE
dma: tegra: use list_move_tail instead of list_del/list_add_tail
mxs/dma: Enlarge the CCW descriptor area to 4 pages
dw_dmac: utilize slave_id to pass request line
dmaengine: mmp_tdma: add dt support
dmaengine: mmp-pdma support
spi: davici - make davinci select edma
...
|
|
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.
This moves such data out of the davinci include directories
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Mark Brown <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Cc: Sekhar Nori <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: "Ben Dooks" <[email protected]>
Cc: "Wolfram Sang" <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Chris Ball <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: [email protected]
|
|
Removes use of the DaVinci EDMA private DMA API and replaces
it with use of the DMA engine API.
Signed-off-by: Matt Porter <[email protected]>
Tested-by: Tom Rini <[email protected]>
Tested-by: Sekhar Nori <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
The driver uses NULL for dma_unmap_single instead of
the struct device that the API expects.
Signed-off-by: Shubhrajyoti D <[email protected]>
Tested-by: Akshay Shankarmurthy <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
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 <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Magnus Damm <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
|
|
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 blocks
Signed-off-by: Grant Likely <[email protected]>
Acked-by: Wolfram Sang <[email protected]>
Acked-by: Linus Walleij <[email protected]>
|