- 02 8月, 2014 2 次提交
-
-
由 Grygorii Strashko 提交于
Rework Davinci SPI driver to store GPIO CS number in cs_gpio field of SPI device structure (spi_device) for both DT and non-DT cases. This will make Davinci SPI driver code simpler and allows to reuse more SPI core functionality. Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Murali Karicheri 提交于
Currently driver supports only configuration of GPIO CS through platform data. This patch enhances the driver to configure GPIO CS through DT. Also update the DT binding documentation to reflect the availability of cs-gpios. Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com> Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 8月, 2014 1 次提交
-
-
由 Murali Karicheri 提交于
Currently, the driver defines SPI_MAX_CHIPSELECT as 2 and use per device array bytes_per_word based on this. This breaks if num_chipselect per device is greater than 2. This patch fix this and allocate memory for this array based on num_chipselect. It's preparation patch to enable GPIO CS feature for Davinci SPI. Signed-off-by: NMurali Karicheri <m-karicheri2@ti.com> Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 06 2月, 2014 2 次提交
-
-
由 Axel Lin 提交于
It's pointless to use of_match_ptr within CONFIG_OF guard. Use of_match_ptr around davinci_spi_of_match when setting .of_match_table. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
spi_master_get_devdata() never returns NULL when spi_alloc_master() success, so remove NULL test for dspi. We have ensured master is not NULL before assigning it to dspi->bitbang.master. So also remove NULL test for dspi->bitbang.master. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 1月, 2014 1 次提交
-
-
由 Axel Lin 提交于
The implementation in spi_setup() already set spi->bits_per_word = 8 when spi->bits_per_word is 0 before calling spi->master->setup. So we don't need to do it again in setup() callback. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NMarek Vasut <marex@denx.de> Acked-by: NBarry Song <Baohua.Song@csr.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 18 12月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use devm_*() functions to make cleanup paths simpler. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 11月, 2013 1 次提交
-
-
由 Santosh Shilimkar 提交于
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: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 15 11月, 2013 1 次提交
-
-
由 Wolfram Sang 提交于
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: NWolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 07 10月, 2013 1 次提交
-
-
由 Axel Lin 提交于
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: NAxel Lin <axel.lin@ingics.com> Suggested-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Acked-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 9月, 2013 2 次提交
-
-
由 Axel Lin 提交于
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: NAxel Lin <axel.lin@ingics.com> Suggested-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Acked-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Sachin Kamat 提交于
'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: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 29 8月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 7月, 2013 1 次提交
-
-
由 Christian Eggers 提交于
Commit 048177ce (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: NChristian Eggers <ceggers@gmx.de> Acked-by: NMatt Porter <mporter@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org # v3.7.x+
-
- 30 5月, 2013 1 次提交
-
-
由 Stephen Warren 提交于
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: NStephen Warren <swarren@wwwdotorg.org> Acked-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 23 5月, 2013 1 次提交
-
-
由 Jingoo Han 提交于
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: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 18 4月, 2013 1 次提交
-
-
由 Manjunathappa, Prakash 提交于
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: NManjunathappa, Prakash <prakash.pm@ti.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
- 07 4月, 2013 1 次提交
-
-
由 Manjunathappa, Prakash 提交于
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: NManjunathappa, Prakash <prakash.pm@ti.com> Acked-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 06 2月, 2013 1 次提交
-
-
由 Murali Karicheri 提交于
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: NMurali Karicheri <m-karicheri2@ti.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 05 2月, 2013 1 次提交
-
-
由 Murali Karicheri 提交于
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: NMurali Karicheri <m-karicheri2@ti.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 08 12月, 2012 1 次提交
-
-
由 Grant Likely 提交于
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: NBill Pemberton <wfp5p@virginia.edu> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 14 9月, 2012 1 次提交
-
-
由 Arnd Bergmann 提交于
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: NArnd Bergmann <arnd@arndb.de> Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NNicolas Pitre <nico@linaro.org> Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com> Acked-by: NFelipe Balbi <balbi@ti.com> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Kevin Hilman <khilman@ti.com> Cc: "Ben Dooks" <ben-linux@fluff.org> Cc: "Wolfram Sang" <w.sang@pengutronix.de> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Chris Ball <cjb@laptop.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Liam Girdwood <lrg@ti.com> Cc: davinci-linux-open-source@linux.davincidsp.com
-
- 01 9月, 2012 1 次提交
-
-
由 Matt Porter 提交于
Removes use of the DaVinci EDMA private DMA API and replaces it with use of the DMA engine API. Signed-off-by: NMatt Porter <mporter@ti.com> Tested-by: NTom Rini <trini@ti.com> Tested-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
-
- 31 3月, 2012 1 次提交
-
-
由 Shubhrajyoti D 提交于
The driver uses NULL for dma_unmap_single instead of the struct device that the API expects. Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Tested-by: NAkshay Shankarmurthy <akshay.s@ti.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 25 10月, 2011 1 次提交
-
-
由 Grant Likely 提交于
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: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Reviewed-by: NMagnus Damm <magnus.damm@gmail.com> Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 06 6月, 2011 1 次提交
-
-
由 Grant Likely 提交于
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: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 15 3月, 2011 2 次提交
-
-
由 Michael Williamson 提交于
The current davinci SPI driver, in DMA mode, is limited to 65535 words for a single transfer. Modify the driver by configuring a 3 dimensional EDMA transfer to support up to 65535x65535 words. Signed-off-by: NMichael Williamson <michael.williamson@criticallink.com> Tested-by: NStefano Babic <sbabic@denx.de> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Michael Williamson 提交于
The davinci spi driver provides an option to use DMA transfers for data. In the dma_map_single() call, the driver is passing the number of words to be transfered for the mapping size. It should be the number of bytes. Signed-off-by: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 01 3月, 2011 1 次提交
-
-
由 Michael Williamson 提交于
For DMA operation, the davinci spi driver needs an event queue number. Currently, this number is passed as a IORESOURCE_DMA. This is not correct, as the event queue is not a DMA channel. Pass the event queue via the platform data structure instead. On dm355 and dm365, move the eventq assignment for spi0 out of resources array and into platform data. Signed-off-by: NMichael Williamson <michael.williamson@criticallink.com> Acked-by: NSekhar Nori <nsekhar@ti.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NKevin Hilman <khilman@ti.com>
-
- 18 11月, 2010 11 次提交
-
-
由 Sekhar Nori 提交于
Shorten names of local variables and structure members where possible. Local variables: * 'davinci_spi' is being renamed 'dspi' * 'davinci_spi_dma' is being renamed 'dma' Structure members: * 'dma_{tx|rx}_channel' is being renamed '{tx|rx}_channel' since the structure containing them is already called 'davinci_spi_dma' * 'davinci_spi_dma' in 'davinci_spi' structure is being renamed 'dma' Tested-By: NBrian Niebuhr <bniebuhr@efjohnson.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Sekhar Nori 提交于
Remove unnecesary private data member 'region_size' being used to store the size of SPI memory region. Instead, get the memory resource size directly from the platform data. Tested-By: NBrian Niebuhr <bniebuhr@efjohnson.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Add copyright for EF Johnson Technologies since the driver has been majorly overhauled by Brian. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Add comments describing the platform data members and per-chip-select SPI configuration structure. Also, add some comments describing the what happens during the driver probe. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Setup the owner member of the platform driver to THIS_MODULE instead of leaving it NULL. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Enable SPI only when active transfers are in progress. Keep it in local low power when not in use. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
The "clk_internal" platform data member which contols the CLKMOD bit in Global Control Register 1 is not useful since CLKMOD needs be set to 1 *always* to ensure master mode operation. Remove this platform data. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Let DMA operation be specified on a per-device basis instead of selecting it once during probe. A side effect of this is the need to combine the PIO and DMA buffer txrx_bufs routine. This is good since they anyway share some common functionality. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
The DMA code does not use the existing completion variable 'done' which is being used for interrupt mode transfers. Instead it uses two different completion variables specific to DMA mode transfers. Eliminate the usage of new completion variables for DMA mode and use the existing completion variable. [nsekhar@ti.com: To make this process easy, eliminate the two different DMA completion callback functions for tx and rx and use a single callback function instead] Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Do not simply clean the DMA channel on a DMA completion error. Instead, use wcount and rcount members of davinci_spi to detecion non-completion of DMA and signal EIO to the application. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-
由 Brian Niebuhr 提交于
Use a dummy param slot linked to itself to take care of the extra "sync event" that gets sent to EDMA controller after the last byte has been transferred. The dummy PaRAM slot that is linked to the actual DMA PaRAM slot "absorbs" this event and prevents a EDMA CC error to be asserted. Without this provision, the EDMA CC error would be asserted because the channel PaRAM would be empty after the transfer and EDMA would not know what to make out of the extra sync event. Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com> Tested-By: NMichael Williamson <michael.williamson@criticallink.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com>
-