- 22 1月, 2014 2 次提交
-
-
由 Axel Lin 提交于
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: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 1月, 2014 3 次提交
-
-
由 Axel Lin 提交于
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: NAxel Lin <axel.lin@ingics.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 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>
-
由 Zhang Rui 提交于
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: NZhang Rui <rui.zhang@intel.com> Acked-by: NMark Brown <broonie@linaro.org> Acked-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 16 1月, 2014 1 次提交
-
-
由 Mika Westerberg 提交于
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: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 14 1月, 2014 4 次提交
-
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Add support for specifying the SPI clock phase and polarity, based on the SDK reference code. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 13 1月, 2014 13 次提交
-
-
由 Mika Westerberg 提交于
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: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
On ARM-based SHMOBILE, the rspi driver builds and works fine without the DMA controller driver, hence relax the dependencies. Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
We have a spi_sh_clear_bit() function, there's no reason not to use it. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Geert Uytterhoeven 提交于
- 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: NGeert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
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: NAxel Lin <axel.lin@ingics.com> Acked-by: NSourav Poddar <sourav.poddar@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Make the unit of wlen to be byte, and simplify the code to avoid duplicate code for different wlen cases. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Acked-by: NSourav Poddar <sourav.poddar@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
We already has NULL test for master after calling spi_alloc_master(). Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Gerhard Sittig 提交于
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: NGerhard Sittig <gsi@denx.de> Acked-by: NMark Brown <broonie@linaro.org> Signed-off-by: NAnatolij Gustschin <agust@denx.de>
-
- 10 1月, 2014 4 次提交
-
-
由 Alexander Shiyan 提交于
This patch replaces gpio_request() with devm_ API. As a result this simplifies error path and eliminates "remove" function. Signed-off-by: NAlexander Shiyan <shc_work@mail.ru> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
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: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Wenyou Yang 提交于
Replace the deprecated master->transfer with transfer_one_message() and allow the SPI subsystem handle all the queuing of messages. Signed-off-by: NWenyou Yang <wenyou.yang@atmel.com> Tested-by: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 09 1月, 2014 3 次提交
-
-
由 Sekhar Nori 提交于
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: NRussell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mika Westerberg 提交于
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: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
For slightly better readability. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 08 1月, 2014 3 次提交
-
-
由 Sachin Kamat 提交于
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: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Richard Genoud 提交于
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: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
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: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 07 1月, 2014 2 次提交
-
-
由 Wei Yongjun 提交于
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: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
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: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NSourav Poddar <sourav.poddar@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 06 1月, 2014 2 次提交
-
-
由 Daniel Santos 提交于
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: NDaniel Santos <daniel.santos@pobox.com> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
由 Baruch Siach 提交于
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: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 02 1月, 2014 2 次提交
-
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Use list_first_entry_or_null() to save a few lines. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 31 12月, 2013 1 次提交
-
-
由 Sourav Poddar 提交于
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: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NMark 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: NSourav Poddar <sourav.poddar@ti.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-