- 04 4月, 2013 2 次提交
-
-
由 Wei Yongjun 提交于
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
This reverts commit faa98f7e which was applied in error due to discussion ending up in the wrong thread.
-
- 01 4月, 2013 19 次提交
-
-
由 Jingoo Han 提交于
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/spi/spi-s3c64xx.c:1362:12: warning: 's3c64xx_spi_suspend' defined but not used [-Wunused-function] drivers/spi/spi-s3c64xx.c:1381:12: warning: 's3c64xx_spi_resume' defined but not used [-Wunused-function] Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
-
由 Nicolas Ferre 提交于
The status of transfer is stored in controller data structure so that it can be used not only by atmel_spi_msg_done() function. This will be useful for upcoming dmaengine enabled driver. Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NWenyou Yang <wenyou.yang@atmel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Nicolas Ferre 提交于
Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NWenyou Yang <wenyou.yang@atmel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Wenyou Yang 提交于
Signed-off-by: NWenyou Yang <wenyou.yang@atmel.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Wenyou Yang 提交于
The "has_dma_support" needed for future use with dmaengine driver. [Fixed some unneded ternery operators -- broonie] Signed-off-by: NWenyou Yang <wenyou.yang@atmel.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Laxman Dewangan 提交于
Spi starts transfer using dma with DMA_CTRL_ACK which is not require becasue spi driver does not use completed dma_desc after transfer done and so it does not ack the dma descriptor. Removing the DMA_CTRL_ACK flag to avoid memory leak in dma driver. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Alexandru Gheorghiu 提交于
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function. Patch found using coccinelle. Signed-off-by: NAlexandru Gheorghiu <gheorghiuandru@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Alexandru Gheorghiu 提交于
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function. Patch found using coccinelle. Signed-off-by: NAlexandru Gheorghiu <gheorghiuandru@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Anatolij Gustschin 提交于
Some SPI slave devices require asserted chip select signal across multiple transfer segments of an SPI message. Currently the driver always de-asserts the internal SS signal for every single transfer segment of the message and ignores the 'cs_change' flag of the transfer description. Disable the internal chip select (SS) only if this is needed and indicated by the 'cs_change' flag. Without this change, each partial transfer of a surrounding multi-part SPI transaction might erroneously change the SS signal, which might prevent slaves from answering the request that was sent in a previous transfer segment because the transaction could be considered aborted (SS was de-asserted before reading the response). Reported-by: NGerhard Sittig <gerhard.sittig@ifm.com> Signed-off-by: NAnatolij Gustschin <agust@denx.de> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
-
由 Wei Yongjun 提交于
The variable bits_per_word is initialized but never used otherwise, so remove the unused variable. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-By: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Sachin Kamat 提交于
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Sachin Kamat 提交于
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Acked-by: NThomas Chou <thomas@wytron.com.tw> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Bryan Freed 提交于
spi_pump_messages() calls into a controller driver with unprepare_transfer_hardware() which is documented as "This may sleep". As in the prepare_transfer_hardware() call below, we should release the queue_lock spinlock before making the call. Rework the logic a bit to hold queue_lock to protect the 'busy' flag, then release it to call unprepare_transfer_hardware(). Signed-off-by: NBryan Freed <bfreed@chromium.org> Reviewed-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NDoug Anderson <dianders@chromium.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
It is possible that the handler gets interrupted after checking the status. After it resumes the time out is due but the condition it was waiting for might be true as well. Therefore it is necessary to check the condition in case of an time out to be sure that the condition is not true after the time passed by. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
The core can do the validation for us. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
This driver only supports bits_per_word==8, so inform the SPI core of this. Remove all the open-coded validation that's no longer needed. Signed-off-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
Allow SPI masters to define the set of bits_per_word values they support. If they do this, then the SPI core will reject transfers that attempt to use an unsupported bits_per_word value. This eliminates the need for each SPI driver to implement this checking in most cases. Signed-off-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Girish K S 提交于
The status of the interrupt is available in the status register, so reading the clear pending register and writing back the same value will not actually clear the pending interrupts. This patch modifies the interrupt handler to read the status register and clear the corresponding pending bit in the clear pending register. Modified the hwInit function to clear all the pending interrupts. Signed-off-by: NGirish K S <ks.giri@samsung.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
-
- 26 3月, 2013 1 次提交
-
-
由 Matthias Brugger 提交于
The pointer to the driver data is never used to get the slave controller data. We can delete the unused argument from the function. Signed-off-by: NMatthias Brugger <matthias.bgg@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 13 3月, 2013 18 次提交
-
-
由 Jonas Gorski 提交于
Use devm_ioremap_resource() which provides its own error messages. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
bcm63xx_spi_setup_transfer is called from only one place, and that has t always set, to hz will always be t->speed_hz - just use it directly in the two places instead of moving it in a local variable. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
It only does one check, so just do the check directly in the caller. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
The check would belong in bcm63xx_spi_setup if the spi subsystem weren't already doing the check for us, so just drop it. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
bcm63xx_spi_check_transfer is only called from one place that has t always set, so directly check the transfer's bits_per_word. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
Instead of fixing up the bits_per_word (which the spi subsystem already does for us), check it for supported values. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
It is only written, but never read. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
The spi subsystem already provides this info in a more extensive debug print except for the nsecs/bit - which wasn't calculated anyway and fixed to 0. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
The spi subsystem already checks the mode bits before calling setup. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Jonas Gorski 提交于
Use proper clk_prepare/unprepare calls in preparation for switching to the generic clock framework. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
-
由 Jonas Gorski 提交于
When msg_ctl_width is set to an invalid value we try to disable the clock despite it never being enabled. Fix it by jumping to the correct label. Signed-off-by: NJonas Gorski <jogo@openwrt.org> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Kevin Cernekee 提交于
This fixes the following warning: drivers/spi/spi-bcm63xx.c: In function 'bcm63xx_spi_setup': drivers/spi/spi-bcm63xx.c:157:6: warning: unused variable 'ret' Signed-off-by: NKevin Cernekee <cernekee@gmail.com> Acked-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Laxman Dewangan 提交于
The prepare_transfer_hardware() is called in atomic context and calling synchronous runtime pm calls can create scheduling deadlock. Therefore, in place of calling runtime PM calls from prepare/unprepare message transfer, calling this in transfer_one_message(). Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Tested-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mika Westerberg 提交于
Intel LPSS SPI controllers need to have bit 0 (disable_ssp_dma_finish) set in SSP_REG in order to properly perform DMA transfers spanning over multiple blocks. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mika Westerberg 提交于
The function returns 0 on success and negative errno in case of failure. Fix this. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Chris Boot 提交于
The BCM2835 contains two forms of SPI master controller (one known simply as SPI0, and the other known as the "Universal SPI Master", in the auxilliary block) and one form of SPI slave controller. This patch adds support for the SPI0 controller. This driver is taken from Chris Boot's repository at git://github.com/bootc/linux.git rpi-linear as of commit 6de2905 "spi-bcm2708: fix printf with spurious %s". In the first SPI-related commit there, Chris wrote: Thanks to csoutreach / A Robinson for his driver which I used as an inspiration. You can find his version here: http://piface.openlx.org.uk/raspberry-pi-spi-kernel-driver-available-for Changes made during upstreaming: * Renamed bcm2708 to bcm2835 as per upstream naming for this SoC. * Removed support for brcm,realtime property. * Increased transfer timeout to 30 seconds. * Return IRQ_NONE from the IRQ handler if no interrupt was handled. * Disable TA (Transfer Active) and clear FIFOs on a transfer timeout. * Wrote device tree binding documentation. * Request unnamed clock rather than "sys_pclk"; the DT will provide the correct clock. * Assume that tfr->speed_hz and tfr->bits_per_word are always set in bcm2835_spi_start_transfer(), bcm2835_spi_transfer_one(), so no need to check spi->speed_hz or tft->bits_per_word. * Re-ordered probe() to remove the need for temporary variables. * Call clk_disable_unprepare() rather than just clk_unprepare() on probe() failure. * Don't use devm_request_irq(), to ensure that the IRQ doesn't fire after we've torn down the device, but not unhooked the IRQ. * Moved probe()'s call to clk_prepare_enable() so we can be sure the clock is enabled if the IRQ handler fires immediately. * Remove redundant checks from bcm2835_spi_check_transfer() and bcm2835_spi_setup(). * Re-ordered IRQ handler to check for RXR before DONE. Added comments to ISR. * Removed empty prepare/unprepare implementations. * Removed use of devinit/devexit. * Added BCM2835_ prefix to defines. Signed-off-by: NChris Boot <bootc@bootc.net> Signed-off-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Wei Yongjun 提交于
In case of error, the function platform_device_register_full() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-