- 28 Feb, 2022 12 commits
-
-
Yun Zhou authored
Commit d40f0b6f instroduced last_cs_enable to avoid setting chipselect if it's not necessary, but it also introduces a bug. The chipselect may not be set correctly on multi-device SPI busses. The reason is that we can't judge the chipselect by bool last_cs_enable, since chipselect may be modified after other devices were accessed. So we should record the specific state of chipselect in case of confusion. Signed-off-by: Yun Zhou <yun.zhou@windriver.com> Link: https://lore.kernel.org/r/20220217141234.72737-1-yun.zhou@windriver.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Now when there are no dynamical changes required, we may constify struct pxa_spi_info variables. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-11-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Instead of using temporary storage, assign the values directly to the corresponding struct pxa2xx_spi_controller members. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-10-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Extract pxa2xx_spi_pci_clk_register() from ->probe() in order to reuse it later on for getting rid of max_clk_rate temporary storage. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-9-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
All of the LPSS devices are using DMA and set the parameters up, hence no need to test for that. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-8-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Instead of creating an abstraction on top of PCI IDs, just use them directly. The corresponding enum can be dropped. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-7-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Move max_clk_rate to the corresponding ->setup() function to unify with the rest. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-6-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Instead of using conditional, move dma_burst_size to the corresponding ->setup() function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-5-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Instead of using conditional, move port_id to the corresponding ->setup() functions. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-4-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Since all platforms are using ->setup() function, drop unneeded check. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-3-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Refactor Quark X1000 handling code to use ->setup() instead of using the configuration data structure directly. It will allow to refactor further to avoid intermediate storage for the used configuration parameters. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-2-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Refactor CE4100 handling code to use ->setup() instead of spreading potentially confusing conditional. Besides that, it will allow to refactor further to avoid intermediate storage for the used configuration parameters. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220225172350.69797-1-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 25 Feb, 2022 1 commit
-
-
Li-hao Kuo authored
fix issue /builds/robherring/linux-dt/Documentation/devicetree/bindings/spi/spi-sunplus-sp7021.example.dt.yaml: spi@9C002D80: 'clocks-names' is a required property From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/spi/spi-sunplus-sp7021.yaml delete unused required(clock-name) Fixes: 3b8ab4da ("spi: Fix test error for sp7021") Reported-by: Rob Herring <robh+dt@kernel.org> Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com> Link: https://lore.kernel.org/r/097bbc8b703b17e8fb3e3f6f6d2f97fe668bd5c5.1645770648.git.lhjeff911@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 24 Feb, 2022 6 commits
-
-
Mark Brown authored
Merge series from Krishna Yarlagadda <kyarlagadda@nvidia.com>: Add ACPI support for Tegra210 QUAD SPI driver and a new compatilbe.
-
Krishna Yarlagadda authored
Add support for Tegra234 and soc data to select capabilities. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20220222175611.58051-4-kyarlagadda@nvidia.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krishna Yarlagadda authored
Add compatible string for Tegra234 for Tegra QUAD SPI Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20220222175611.58051-3-kyarlagadda@nvidia.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krishna Yarlagadda authored
Use device_reset api to replace duplicate code in driver to call reset_control_get api with reset handle. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/20220222175611.58051-2-kyarlagadda@nvidia.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
The pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put(). Fixes: 743485ea ("spi: pxa2xx-pci: Do a specific setup in a separate function") Fixes: 25014521 ("spi: pxa2xx-pci: Enable DMA for Intel Merrifield") Reported-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220223191637.31147-1-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
In order to make the underneath API easier to change in the future, prevent users from dereferencing fwnode from struct device. Instead, use the specific dev_fwnode() API for that. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220223191948.31325-1-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 23 Feb, 2022 1 commit
-
-
Wang Qing authored
pci_get_slot() increases its reference count, the caller must decrement the reference count by calling pci_dev_put() Signed-off-by: Wang Qing <wangqing@vivo.com> Link: https://lore.kernel.org/r/1644890407-65167-1-git-send-email-wangqing@vivo.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 22 Feb, 2022 2 commits
-
-
Andreas Färber authored
Add support for slave DT property spi-lsb-first, i.e., SPI_LSB_FIRST mode. Duplicate the inline helpers bitbang_txrx_be_cpha{0,1} as LE versions. Conditionally call them from all the spi-gpio txrx_word callbacks. Some alternatives to this implementation approach were discussed back then [0], but eventually it was considered reasonable. [0] https://lore.kernel.org/linux-arm-kernel/20191212033952.5967-8-afaerber@suse.de/Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Tested-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/feac3377-4ad1-77d8-9a18-3588d80fb909@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ahmad Fatoum authored
STM32F4_SPI_SR_RXNE and STM32F4_SPI_SR_OVR are distinct bits in the same status register. ~STM32F4_SPI_SR_OVR | STM32F4_SPI_SR_RXNE is thus equal to ~STM32F4_SPI_SR_OVR. The original intention was likely for transmission-only transfers to ignore interrupts both for when the Rx queue has bytes (RXNE) as well as when these bytes haven't been read in time (OVR). Fix the typo by adding the missing parenthesis. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.kernel.org/r/20220201115142.3999860-1-a.fatoum@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 21 Feb, 2022 5 commits
-
-
Mark Brown authored
Merge series from Miquel Raynal <miquel.raynal@bootlin.com>: DT bindings for stacked and parallel flash/memory devices. base-commit: e783362e
-
Minghao Chi (CGEL ZTE) authored
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Link: https://lore.kernel.org/r/20220221020233.1925154-1-chi.minghao@zte.com.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Miquel Raynal authored
Provide an example of how to describe two flashes in eg. stacked mode. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220126112608.955728-4-miquel.raynal@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Miquel Raynal authored
Describe two new memories modes: - A stacked mode when the bus is common but the address space extended with an additinals wires. - A parallel mode with parallel busses accessing parallel flashes where the data is spread. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220126112608.955728-3-miquel.raynal@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Miquel Raynal authored
The Xilinx QSPI controller has two advanced modes which allow the controller to behave differently and consider two flashes as one single storage. One of these two modes is quite complex to support from a binding point of view and is the dual parallel memories. In this mode, each byte of data is stored in both devices: the even bits in one, the odd bits in the other. The split is automatically handled by the QSPI controller and is transparent for the user. The other mode is simpler to support, it is called dual stacked memories. The controller shares the same SPI bus but each of the devices contain half of the data. Once in this mode, the controller does not follow CS requests but instead internally wires the two CS levels with the value of the most significant address bit. Supporting these two modes will involve core changes which include the possibility of providing two CS for a single SPI device Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Link: https://lore.kernel.org/r/20220126112608.955728-2-miquel.raynal@bootlin.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 18 Feb, 2022 2 commits
-
-
Heiner Kallweit authored
Use dedicated function sysfs_emit() that does some extra checking, e.g. to ensure that no more than PAGESIZE bytes are written. In addition add a trailing newline to the output, that makes it better readable from the console. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/56e1588d-d53b-73e9-fdc8-7fe30bf91f11@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Li authored
Eliminate the follow smatch warning: drivers/spi/spi-sunplus-sp7021.c:379 sp7021_spi_slave_transfer_one() warn: inconsistent indenting Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20220217010024.111904-1-yang.lee@linux.alibaba.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 17 Feb, 2022 7 commits
-
-
Mark Brown authored
Merge series from Jon Lin <jon.lin@rock-chips.com>: A collection of fixes and support for new features in the Rockchip driver. base-commit: 80808768
-
Jon Lin authored
The interrupt status bit of the previous error data transmition will affect the next operation and cause continuous SPI transmission failure. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://lore.kernel.org/r/20220216014028.8123-7-jon.lin@rock-chips.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
shengfei Xu authored
the wakeup interrupt handler which is guaranteed not to run while @resume noirq() is being executed. the patch can help to avoid the wakeup source try to access spi when the spi is in suspend mode. Signed-off-by: shengfei Xu <xsf@rock-chips.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://lore.kernel.org/r/20220216014028.8123-6-jon.lin@rock-chips.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jon Lin authored
After power up, the cs and clock is in default status, and the cs-high and clock polarity dts property configuration will take no effect until the calling of rockchip_spi_config in the first transmission. So preset them to make sure a correct voltage before the first transmission coming. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://lore.kernel.org/r/20220216014028.8123-5-jon.lin@rock-chips.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jon Lin authored
The spi which's version is higher than ver 2 will automatically enable this feature. If the length of master transmission is uncertain, the RK spi slave is better to automatically stop after cs inactive instead of waiting for xfer_completion forever. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://lore.kernel.org/r/20220216014028.8123-4-jon.lin@rock-chips.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jon Lin authored
After slave abort, all DMA should be stopped, or it will affect the next transmission and maybe abort again. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://lore.kernel.org/r/20220216014028.8123-3-jon.lin@rock-chips.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jon Lin authored
Get num-cs u32 from dts of_node property rather than u16. Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Link: https://lore.kernel.org/r/20220216014028.8123-2-jon.lin@rock-chips.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 16 Feb, 2022 3 commits
-
-
Jarkko Nikula authored
Add support for LPSS SPI on Intel Raptor Lake PCH-S. It has four controllers each having two chip selects. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20220216091317.1302254-1-jarkko.nikula@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
André Almeida authored
Commit 20904355 ("spi: amd: Add support for version AMDI0062") removed the cast ACPI_PTR() for no good reason. This wrapper is important to make sure that the driver can be compiled with or without CONFIG_ACPI enabled, useful for compiling test. Give back the cast so compilation works again. Fixes: 20904355 ("spi: amd: Add support for version AMDI0062") Signed-off-by: André Almeida <andrealmeid@collabora.com> Link: https://lore.kernel.org/r/20220216162719.116062-1-andrealmeid@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Intel Ice Lake-N has the same SPI serial flash controller as Ice Lake-LP. Add Ice Lake-N PCI ID to the driver list of supported devices. The device can be found on MacBookPro16,2 [1]. [1]: https://linux-hardware.org/?probe=f1c5cf0c43Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Link: https://lore.kernel.org/r/20220215135139.4328-1-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 15 Feb, 2022 1 commit
-
-
Mark Brown authored
Merge series from André Almeida <andrealmeid@collabora.com>: This series do some cleanup and add support for new controller version, AMDI0062.
-