- Jan 21, 2014
-
-
Axel Lin authored
master->transfer_one returns positive value is not a error. So set ret to 0 when master->transfer_one returns positive value. Otherwise, I hit "spi_master spi0: failed to transfer one message from queue" error when my transfer_one callback returns 1. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 17, 2014
-
-
Axel Lin authored
Since commit 543bb255 "spi: add ability to validate xfer->bits_per_word in SPI core", the driver can set bits_per_word_mask for the master then the SPI core will reject transfers that attempt to use an unsupported bits_per_word value. So we can remove the bits_per_word checking in sc18is602_check_transfer() and let SPI core handle the checking. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Acked-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
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:
Axel Lin <axel.lin@ingics.com> Acked-by:
Marek Vasut <marex@denx.de> Acked-by:
Barry Song <Baohua.Song@csr.com> Acked-by:
Guenter Roeck <linux@roeck-us.net> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 16, 2014
-
-
Zhang Rui authored
ACPI enumerated devices has ACPI style _HID and _CID strings, all of these strings can be used for both driver loading and matching. Currently, in Platform, I2C and SPI bus, the ACPI style driver matching is supported by invoking acpi_driver_match_device() in bus .match() callback. But, the module autoloading is still broken. For example, there is any ACPI device with _HID "INTABCD" that is enumerated to platform bus, and we have a driver that can probe it. The driver exports its module_alias as "acpi:INTABCD" use the following code static const struct acpi_device_id xxx_acpi_match[] = { { "INTABCD", 0 }, { } }; MODULE_DEVICE_TABLE(acpi, xxx_acpi_match); But, unfortunately, the device' modalias is shown as "platform:INTABCD:00", please refer to modalias_show() and platform_uevent() in drivers/base/platform.c. This results in that the driver will not be loaded automatically when the device node is created, because their modalias do not match. This also applies to I2C and SPI bus. With this patch, the device' modalias will be shown as "acpi:INTABCD" as well. Signed-off-by:
Zhang Rui <rui.zhang@intel.com> Acked-by:
Mark Brown <broonie@linaro.org> Acked-by:
Wolfram Sang <wsa@the-dreams.de> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Mika Westerberg authored
CONFIG_PM will be set if either or both CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME is set. Compiling the driver with !CONFIG_PM_SLEEP causes following compilation warning: drivers/spi/spi-pxa2xx.c:1270:12: warning: ‘pxa2xx_spi_suspend’ defined but not used [-Wunused-function] Fix this by using CONFIG_PM_SLEEP instead. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 14, 2014
-
-
Axel Lin authored
Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 13, 2014
-
-
Geert Uytterhoeven authored
Add support for specifying the SPI clock phase and polarity, based on the SDK reference code. Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Mika Westerberg authored
Commit cddb339b (spi/pxa2xx: convert to dma_request_slave_channel_compat()) converted the driver to use ACPI provided DMA helpers but it forgot to initialize the platform data for the channels to -1. Failing to do so will result inadvertent match in the filter function because 0 is a valid channel number. Prevent this from happening by initializing both platform data channels correctly to -1. Fixes: cddb339b (spi/pxa2xx: convert to dma_request_slave_channel_compat()) Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
Geert Uytterhoeven authored
Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
On ARM-based SHMOBILE, the rspi driver builds and works fine without the DMA controller driver, hence relax the dependencies. Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
We have a spi_sh_clear_bit() function, there's no reason not to use it. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Geert Uytterhoeven authored
- Rephrase the comments about tx/rx_nbits validity checks, - Remove the stale comment about SPI_3WIRE (the code it refers to was removed in commit 368ca4e0 ("spi: Eliminate 3WIRE spi_transfer check")). Signed-off-by:
Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
The driver name in current code looks like a compatible string which is not the naming convention for platform drivers. Fix it and also add modalias since this driver can be built as a module. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Acked-by:
Sourav Poddar <sourav.poddar@ti.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
Make the unit of wlen to be byte, and simplify the code to avoid duplicate code for different wlen cases. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Acked-by:
Sourav Poddar <sourav.poddar@ti.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
We already has NULL test for master after calling spi_alloc_master(). Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 12, 2014
-
-
Gerhard Sittig authored
after device tree based clock lookup became available, the peripheral driver need no longer construct clock names which include the PSC index, remove the "psc%d_mclk" template and unconditionally use 'mclk' acquire and release the 'ipg' clock item for register access as well Cc: Mark Brown <broonie@kernel.org> Cc: linux-spi@vger.kernel.org Signed-off-by:
Gerhard Sittig <gsi@denx.de> Acked-by:
Mark Brown <broonie@linaro.org> Signed-off-by:
Anatolij Gustschin <agust@denx.de>
-
- Jan 10, 2014
-
-
Alexander Shiyan authored
This patch replaces gpio_request() with devm_ API. As a result this simplifies error path and eliminates "remove" function. Signed-off-by:
Alexander Shiyan <shc_work@mail.ru> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 09, 2014
-
-
Axel Lin authored
Currently we have similar code for (txp && rxp), (txp && !rxp), (!rxp & txp), and (!txp && !rxp) cases. This patch refactors the code a bit to avoid duplicate similar code. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Wenyou Yang authored
Replace the deprecated master->transfer with transfer_one_message() and allow the SPI subsystem handle all the queuing of messages. Signed-off-by:
Wenyou Yang <wenyou.yang@atmel.com> Tested-by:
Richard Genoud <richard.genoud@gmail.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Sekhar Nori authored
There is no need to force selection of TI EDMA DMA engine driver when DaVinci SPI driver is selected. The driver builds just fine even with CONFIG_TI_EDMA disabled. Forcing this selection causes warnings of the sort: warning: (ARCH_KEYSTONE && SPI_DAVINCI) selects TI_EDMA which has unmet direct dependencies (DMADEVICES && (ARCH_DAVINCI || ARCH_OMAP || ARCH_KEYSTONE)) This reverts commit b5f14330. Reported-by:
Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by:
Sekhar Nori <nsekhar@ti.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Mika Westerberg authored
Commit e13ac47b (spi: Use stable dev_name for ACPI enumerated SPI slaves) changed the SPI device naming to be based on ACPI device name instead of carrying bus number and chip select for devices enumerated from ACPI namespace. In case of a buggy BIOS that lists multiple SPI devices sharing the same chip select (even though they should use different) the current code fails to detect that and allows the devices to be added to the bus. Fix this by walking through the bus and comparing spi->chip_select instead of device name. This should work regardless what the device name will be in future. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
For slightly better readability. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 08, 2014
-
-
Sachin Kamat authored
fiq.h contains only a function declaration and is not used by anyone else. Move the declaration to the driver header file and remove the unnecessary platform dependency from the driver. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Richard Genoud authored
The only speed available was max_speed (the maximum speed declared for a device). This patch adds the support for spi_tranfer->speed_hz parameter. We can now set a different speed for each spi message. Signed-off-by:
Richard Genoud <richard.genoud@gmail.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
Make the modalias matches the driver name. Seems the MODULE_ALIAS is copied from drivers/spi/spi-sh-spi.c. So both spi-sh.ko and spi-sh-hspi.ko have the same alias. Fix it. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 07, 2014
-
-
Wei Yongjun authored
It's not necessary to free resources allocated with devm_* and free them may lead to double free. Fixes: 04f421e7 ('spi: dw: use managed resources') Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
Now platform_get_drvdata() returns the address of qspi rather than master. Also drop unneeded spi_unregister_master() call in ti_qspi_remove() because we use devm_spi_register_master() in probe. commit cbcabb7a "spi/qspi: Fix qspi remove path" assumes platform_get_drvdata() returns address of master. However, commit 160a0613 "spi/qspi: set correct platform drvdata in ti_qspi_probe()" pass qspi to platform_set_drvdata(). Signed-off-by:
Axel Lin <axel.lin@ingics.com> Reviewed-by:
Sourav Poddar <sourav.poddar@ti.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 06, 2014
-
-
Daniel Santos authored
This corrects a problem in spi_pump_messages() that leads to an spi message hanging forever when a call to transfer_one_message() fails. This failure occurs in my MCP2210 driver when the cs_change bit is set on the last transfer in a message, an operation which the hardware does not support. Rationale Since the transfer_one_message() returns an int, we must presume that it may fail. If transfer_one_message() should never fail, it should return void. Thus, calls to transfer_one_message() should properly manage a failure. Fixes: ffbbdd21 (spi: create a message queueing infrastructure) Signed-off-by:
Daniel Santos <daniel.santos@pobox.com> Signed-off-by:
Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
Baruch Siach authored
Commit 04f421e7 (spi: dw: use managed resources) introduced a typo in struct field reference. Fix it. Fixes build failure: drivers/spi/spi-dw-pci.c: In function 'spi_pci_probe': drivers/spi/spi-dw-pci.c:50:29: error: 'dev' undeclared (first use in this function) dwpci = devm_kzalloc(&pdev-dev, sizeof(struct dw_spi_pci), GFP_KERNEL); ^ Reported-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Jan 02, 2014
-
-
Axel Lin authored
Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
Axel Lin authored
Use list_first_entry_or_null() to save a few lines. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-
- Dec 31, 2013
-
-
Sourav Poddar authored
Due to the following commit commit 160a0613 Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Date: Mon Nov 11 14:13:41 2013 +0800 spi/qspi: set correct platform drvdata in ti_qspi_probe() The ti_qspi_remove() use the platform drvdata as a type of struct ti_qspi, we should pass correct platform drvdata to platform_set_drvdata() in ti_qspi_probe(). Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by:
Mark Brown <broonie@linaro.org> platform_set_drvdata was changed in the probe, so we need to correspondingly change deferencing of qspi in runtime resume path. Else, this will lead to a NULL dereference pointer. Based on v3.13-rc3 Signed-off-by:
Sourav Poddar <sourav.poddar@ti.com> Signed-off-by:
Mark Brown <broonie@linaro.org>
-