Commit graph

996216 commits

Author SHA1 Message Date
Jay Fang 9d53768721
spi: pl022: Fix trailing whitespace
Fix checkpatch error:

  ERROR: trailing whitespace
  #1198: FILE: spi-pl022.c:1198:

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-12-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:12 +00:00
Jay Fang 0262179996
spi: rockchip: Fix code indent should use tabs where possible
Fix checkpatch errors:

  ERROR: code indent should use tabs where possible
  #484: FILE: spi-rockchip.c:484:
  +^I        | CR0_BHT_8BIT << CR0_BHT_OFFSET$
  ERROR: code indent should use tabs where possible
  #485: FILE: spi-rockchip.c:485:
  +^I        | CR0_SSD_ONE  << CR0_SSD_OFFSET$
  ERROR: code indent should use tabs where possible
  #486: FILE: spi-rockchip.c:486:
  +^I        | CR0_EM_BIG   << CR0_EM_OFFSET;$

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-11-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:11 +00:00
Jay Fang 6ca6ad908e
spi: spi-mem: Fix code indent should use tabs where possible
Fix checkpatch errors:

  ERROR: code indent should use tabs where possible
  #624: FILE: spi-mem.c:624:
  ERROR: code indent should use tabs where possible
  #626: FILE: spi-mem.c:626:
  ERROR: code indent should use tabs where possible
  #627: FILE: spi-mem.c:627:

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-10-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:10 +00:00
Jay Fang 45793de7bf
spi: jcore: Fix trailing statements should be on next line
Fix checkpatch error:

  ERROR: trailing statements should be on next line
  #85: FILE: spi-jcore.c:85:
  +	if (speed == hw->speed_hz) return;

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-9-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:09 +00:00
Jay Fang f96c19fab3
spi: spi-bitbang: Fix open brace following function definitions go on the next line
Fix checkpatch errors:

  ERROR: open brace '{' following function definitions go on the next line
  #54: FILE: spi-bitbang.c:54:
  ERROR: open brace '{' following function definitions go on the next line
  #82: FILE: spi-bitbang.c:82:
  ERROR: open brace '{' following function definitions go on the next line
  #110: FILE: spi-bitbang.c:110:

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-8-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:08 +00:00
Jay Fang 211f8a0a39
spi: dln2: Fix open brace following function definitions go on the next line
Fix checkpatch error:

  ERROR: open brace '{' following function definitions go on the next line
  #545: FILE: spi-dln2.c:545:
  +static int dln2_spi_rdwr(struct dln2_spi *dln2, const u8 *tx_data,
  +			 u8 *rx_data, u16 data_len, u8 attr) {

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-7-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:08 +00:00
Jay Fang 99b3a36204
spi: spi-mtk-nor: Fix checkpatch spacing error
Fix checkpatch error:

  ERROR: space required before the open parenthesis '('
  #295: FILE: spi-mtk-nor.c:295:
  +		switch(op->data.dir) {

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-6-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:07 +00:00
Jay Fang f2edb98e80
spi: omap-100k: Fix checkpatch spacing errors
Fix checkpatch errors:

  ERROR: space prohibited before that ',' (ctx:WxW)
  #113: FILE: spi-omap-100k.c:113:
  +	writew(data , spi100k->base + SPI_TX_MSB);
 	            ^
  ERROR: space prohibited before that ',' (ctx:WxW)
  #249: FILE: spi-omap-100k.c:249:
  +	writew(0x3e , spi100k->base + SPI_SETUP1);
 	            ^
  ERROR: space prohibited before that ',' (ctx:WxW)
  #250: FILE: spi-omap-100k.c:250:
  +	writew(0x00 , spi100k->base + SPI_STATUS);
 	            ^
  ERROR: space prohibited before that ',' (ctx:WxW)
  #251: FILE: spi-omap-100k.c:251:
  +	writew(0x3e , spi100k->base + SPI_CTRL);
 	            ^

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-5-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:06 +00:00
Jay Fang c07caca3ce
spi: pxa2xx: Fix checkpatch spacing errors
Fix checkpatch errors:

  ERROR: space prohibited before that ',' (ctx:WxW)
  #255: FILE: spi-pxa2xx-pci.c:255:
  +	ssp->clk = clk_register_fixed_rate(&dev->dev, buf , NULL, 0,
 	                                                  ^
  ERROR: "foo* bar" should be "foo *bar"
  #621: FILE: spi-pxa2xx.c:621:
  +static void int_error_stop(struct driver_data *drv_data, const char* msg)

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-4-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:05 +00:00
Jay Fang e13a870ffa
spi: sprd: Fix checkpatch spacing error
Fix checkpatch error:

  ERROR: space prohibited before that close parenthesis ')'
  #213: FILE: spi-sprd-adi.c:213:
  +	rd_addr = (val & RD_ADDR_MASK ) >> RD_ADDR_SHIFT;

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-3-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:04 +00:00
Jay Fang c983108735
spi: spi-topcliff-pch: Fix checkpatch spacing error
Fix checkpatch error:

  ERROR: space prohibited before that '++' (ctx:WxB)
  #1204: FILE: spi-topcliff-pch.c:1204:
  +			for (i = 0; i < cnt; i ++) {
 			                       ^

Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1616566602-13894-2-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24 19:51:03 +00:00
Leilk Liu 1527b09bc8
spi: mediatek: add mt8195 spi slave support
this patch adds mt8195 spi slave compatible support.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Link: https://lore.kernel.org/r/20210322055244.30179-5-leilk.liu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-23 17:19:45 +00:00
Leilk Liu d666a833b0
spi: mediatek: add mtk_spi_compatible support
this patch adds max_fifo_size and must_rx compat support.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Link: https://lore.kernel.org/r/20210322055244.30179-4-leilk.liu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-23 17:19:44 +00:00
Leilk Liu f42698a8dc
spi: update spi slave bindings for MT8195 SoC
Add a DT binding documentation for the MT8195 soc.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Link: https://lore.kernel.org/r/20210322055244.30179-3-leilk.liu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-23 17:19:43 +00:00
Leilk Liu 08b020d3e9
spi: update spi master bindings for MT8195 SoC
Add a DT binding documentation for the MT8195 soc.

Signed-off-by: leilk.liu <leilk.liu@mediatek.com>
Link: https://lore.kernel.org/r/20210322055244.30179-2-leilk.liu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-23 17:19:43 +00:00
Alain Volmat 79c6246ae8
spi: stm32: Fix use-after-free on unbind
stm32_spi_remove() accesses the driver's private data after calling
spi_unregister_master() even though that function releases the last
reference on the spi_master and thereby frees the private data.

Fix by switching over to the new devm_spi_alloc_master() helper which
keeps the private data accessible until the driver has unbound.

Fixes: 8d559a64f0 ("spi: stm32: drop devres version of spi_register_master")

Reported-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/1616052290-10887-1-git-send-email-alain.volmat@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-19 12:24:09 +00:00
Fabio Estevam 92bad4a4c7
spi: imx: Improve driver description
"SPI Controller driver" is a too generic description.

Make it i.MX specific instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210316180922.239805-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-17 13:10:49 +00:00
Colin Ian King 9d902c2a9a
spi: Fix spelling mistake "softwade" -> "software"
There is a spelling mistake in a dev_err message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210317093936.5572-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-17 13:10:48 +00:00
Mark Brown 4152c4d0d9
Merge series "spi: Adding support for software nodes" from Heikki Krogerus <heikki.krogerus@linux.intel.com>:
Hi,

The older API used to supply additional device properties for the
devices - so mainly the function device_add_properties() - is going to
be removed. The reason why the API will be removed is because it gives
false impression that the properties are assigned directly to the
devices, which has actually never been the case - the properties have
always been assigned to a software fwnode which was then just directly
linked with the device when the old API was used. By only accepting
device properties instead of complete software nodes, the subsystems
remove any change of taking advantage of the other features the
software nodes have.

The change that is required from the spi subsystem and the drivers is
trivial. Basically only the "properties" member in struct
spi_board_info, which was a pointer to struct property_entry, is
replaced with a pointer to a complete software node.

thanks,

Heikki Krogerus (4):
  spi: Add support for software nodes
  ARM: pxa: icontrol: Constify the software node
  ARM: pxa: zeus: Constify the software node
  spi: Remove support for dangling device properties

 arch/arm/mach-pxa/icontrol.c | 12 ++++++++----
 arch/arm/mach-pxa/zeus.c     |  6 +++++-
 drivers/spi/spi.c            | 21 ++++++---------------
 include/linux/spi/spi.h      |  7 +++----
 4 files changed, 22 insertions(+), 24 deletions(-)

--
2.30.1

base-commit: a38fd87484
2021-03-16 17:55:41 +00:00
Heikki Krogerus df41a5dad5
spi: Remove support for dangling device properties
>From now on only accepting complete software nodes.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210303152814.35070-5-heikki.krogerus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-16 13:29:44 +00:00
Heikki Krogerus d4272a7adf
ARM: pxa: zeus: Constify the software node
When device properties are supplied to the devices, in
reality a software fwnode that holds those properties is
created which is then assigned to the device. If the device
properties are constant the software node can also be
constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Link: https://lore.kernel.org/r/20210303152814.35070-4-heikki.krogerus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-16 13:29:43 +00:00
Heikki Krogerus 2df0c4a640
ARM: pxa: icontrol: Constify the software node
When device properties are supplied to the devices, in
reality a software fwnode that holds those properties is
created which is then assigned to the device. If the device
properties are constant the software node can also be
constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Link: https://lore.kernel.org/r/20210303152814.35070-3-heikki.krogerus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-16 13:29:42 +00:00
Heikki Krogerus 47afc77bbf
spi: Add support for software nodes
Making it possible for the drivers to assign complete
software fwnodes to the devices instead of only the device
properties in those nodes.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210303152814.35070-2-heikki.krogerus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-16 13:29:41 +00:00
Mark Brown d11233e0de
Merge series "spi: finalize 'delay_usecs' removal/transition" from Alexandru Ardelean <aardelean@deviqon.com>:
A while back I started the introduction of the 'spi_delay' data type:
  https://lore.kernel.org/linux-spi/20190926105147.7839-1-alexandru.ardelean@analog.com/

Users of the 'delay_usecs' were removed from drivers.

Now it's time to remove the 'delay_usecs' from the SPI subsystem and use
only the 'delay' field.

This changeset adapts all SPI drivers to do without 'delay_usecs'.
Additionally, for greybus we need to adapt it to use the 'delay' in
nano-seconds and convert it to micro-seconds.

Alexandru Ardelean (10):
  spi: spi-axi-spi-engine: remove usage of delay_usecs
  spi: bcm63xx-spi: don't check 'delay_usecs' field
  spi: spi-bcm-qspi: replace 'delay_usecs' with 'delay.value' check
  spi: spi-sh: replace 'delay_usecs' with 'delay.value' in pr_debug
  spi: spi-tegra20-flash: don't check 'delay_usecs' field for spi
    transfer
  staging: greybus: spilib: use 'spi_delay_to_ns' for getting xfer delay
  spi: spi-falcon: remove check for 'delay_usecs'
  spi: fsl-espi: remove usage of 'delay_usecs' field
  spi: core: remove 'delay_usecs' field from spi_transfer
  spi: docs: update info about 'delay_usecs'

 Documentation/spi/spi-summary.rst |  7 +++++--
 drivers/spi/spi-axi-spi-engine.c  | 12 ++++--------
 drivers/spi/spi-bcm-qspi.c        |  2 +-
 drivers/spi/spi-bcm63xx.c         |  2 +-
 drivers/spi/spi-falcon.c          |  2 +-
 drivers/spi/spi-fsl-espi.c        | 17 +++++------------
 drivers/spi/spi-sh.c              |  4 ++--
 drivers/spi/spi-tegra20-sflash.c  |  3 +--
 drivers/spi/spi.c                 |  1 -
 drivers/staging/greybus/spilib.c  |  5 ++++-
 include/linux/spi/spi.h           | 12 ------------
 11 files changed, 24 insertions(+), 43 deletions(-)

--
2.29.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
2021-03-12 18:23:16 +00:00
Alain Volmat 12ef51b116
spi: stm32: avoid ifdef CONFIG_PM for pm callbacks
Avoid CONFIG_PM preprocessor check for pm suspend/resume
callbacks and identify the functions with __maybe_unused.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/1615545329-5496-1-git-send-email-alain.volmat@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:53 +00:00
Alexandru Ardelean 05d8a019eb
spi: docs: update info about 'delay_usecs'
The 'delay_usecs' field is no longer present on the spi_transfer struct.
This change updates the doc to mention the usage of the (relatively) new
'delay' field.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-11-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:51 +00:00
Alexandru Ardelean 3ab1cce553
spi: core: remove 'delay_usecs' field from spi_transfer
The 'delay' field in the spi_transfer struct is meant to replace the
'delay_usecs' field. However some cleanup was required to remove the
uses of 'delay_usecs'. Now that it's been cleaned up, we can remove it
from the kernel tree.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-10-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:50 +00:00
Alexandru Ardelean 55a47532fa
spi: fsl-espi: remove usage of 'delay_usecs' field
The 'delay_usecs' field is being removed from the spi_transfer struct.
This change removes it from the SPI FSL ESPI driver.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-9-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:49 +00:00
Alexandru Ardelean a886010c69
spi: spi-falcon: remove check for 'delay_usecs'
The 'delay_usecs' field is being removed from the spi_transfer struct.
This change removes it from the SPI Falcon driver.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-8-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:48 +00:00
Alexandru Ardelean 33a23423ca
staging: greybus: spilib: use 'spi_delay_to_ns' for getting xfer delay
The intent is the removal of the 'delay_usecs' field from the
spi_transfer struct, as there is a 'delay' field that does the same
thing.

The spi_delay_to_ns() can be used to get the transfer delay. It works by
using the 'delay_usecs' field first (if it is non-zero), and finally
uses the 'delay' field.

Since the 'delay_usecs' field is going away, this change makes use of the
spi_delay_to_ns() function. This also means dividing the return value of
the function by 1000, to convert it to microseconds.
To prevent any potential faults when converting to microseconds and since
the result of spi_delay_to_ns() is int, the delay is being computed in 32
bits and then clamped between 0 & U16_MAX.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210308145502.1075689-7-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:47 +00:00
Alexandru Ardelean 7ca660f821
spi: spi-tegra20-flash: don't check 'delay_usecs' field for spi transfer
The 'delay_usecs' field was handled for backwards compatibility in case
there were some users that still configured SPI delay transfers with
this field.

They should all be removed by now. So we can remove the 'delay_usecs'
handling in this driver.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-6-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:46 +00:00
Alexandru Ardelean 506d1a1b44
spi: spi-sh: replace 'delay_usecs' with 'delay.value' in pr_debug
The 'delay_usecs' field is going away. The replacement for it is the
'delay' field. So, we should print the 'delay.value' value instead.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-5-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:45 +00:00
Alexandru Ardelean 66a3aadec4
spi: spi-bcm-qspi: replace 'delay_usecs' with 'delay.value' check
The 'delay_usecs' field is going away. The replacement for it is the
'delay' field. So, we should check for 'delay.value' being non-zero.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-4-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:44 +00:00
Alexandru Ardelean e7f2d4c6aa
spi: bcm63xx-spi: don't check 'delay_usecs' field
The 'delay_usecs' field was handled for backwards compatibility in case
there were some users that still configured SPI delay transfers with
this field.

They should all be removed by now.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-3-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:43 +00:00
Alexandru Ardelean 93c9414489
spi: spi-axi-spi-engine: remove usage of delay_usecs
The 'delay_usecs' field was handled for backwards compatibility in case
there were some users that still configured SPI delay transfers with
this field.

They should all be removed by now.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-2-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12 14:30:42 +00:00
Jay Fang 31890269c0
spi: cadence-quadspi: Silence shiftTooManyBitsSigned warning
drivers/spi/spi-cadence-quadspi.c:267:18: warning: Shifting signed 32-bit
value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
    return reg & (1 << CQSPI_REG_CONFIG_IDLE_LSB);
                    ^

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1614854872-8694-1-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:47:01 +00:00
Mark Brown 2c94b1b7dd
Merge series "parport: Introduce module_parport_driver() and use it" from Andy Shevchenko <andriy.shevchenko@linux.intel.com>:
Introduce module_parport_driver() and use it.
Greg or Mark, since we have this series tagged, can somebody of you pick it up?

Changelog v3:
- added tag on patch 1 (Sudip)
- Cc'ed to Greg

Andy Shevchenko (3):
  parport: Introduce module_parport_driver() helper macro
  spi: butterfly: Switch to use module_parport_driver()
  spi: lm70llp: Switch to use module_parport_driver()

 drivers/spi/spi-butterfly.c | 13 +------------
 drivers/spi/spi-lm70llp.c   | 13 +------------
 include/linux/parport.h     | 12 +++++++++++-
 3 files changed, 13 insertions(+), 25 deletions(-)

base-commit: fe07bfda2f

--
2.30.1
2021-03-10 12:47:00 +00:00
Mason Zhang 260864f797
spi: mt6779: update spi document
this patch update spi document for MT6779 SOC.

Signed-off-by: Mason Zhang <Mason.Zhang@mediatek.com>
Link: https://lore.kernel.org/r/20210226110109.30500-1-Mason.Zhang@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:59 +00:00
Kuldeep Singh 32f298481a
spi: spi-nxp-fspi: Add imx8dxl support
Add support for nxp,imx8dxl-fspi, do the bindings document.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Link: https://lore.kernel.org/r/20210302124936.1972546-3-kuldeep.singh@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:58 +00:00
Kuldeep Singh 82ce7d0e74
spi: spi-nxp-fspi: Implement errata workaround for LS1028A
Errata ERR050568 description says that "Flash access by FlexSPI AHB
command may not work with platform frequency equal to 300 MHz" on
LS1028A.

By default, smaller length reads(equal to RX FIFO size) are done by IP
bus and larger length reads using AHB bus. For adding errata workaround,
use IP bus to read entire flash contents and disable AHB path when
platform frequency is 300Mhz.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Link: https://lore.kernel.org/r/20210302124936.1972546-5-kuldeep.singh@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:57 +00:00
Han Xu c791e3c31c
spi: spi-nxp-fspi: Add imx8dxl driver support
Add driver support for imx8dxl which support read through IP bus only
and disable AHB bus due to an IC errata. Use the pre-defined quirk
FSPI_QUIRK_USE_IP_ONLY directly in device-type data to disable AHB read.

Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Link: https://lore.kernel.org/r/20210302124936.1972546-4-kuldeep.singh@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:56 +00:00
Kuldeep Singh 31e92cbfb9
spi: spi-nxp-fspi: Add support for IP read only
Add support for disabling AHB bus and read entire flash contents via IP
bus only. Please note, this enables IP bus read using a quirk which can
be enabled directly in device-type data or in existence of an errata
where AHB bus may need to be disabled.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Link: https://lore.kernel.org/r/20210302124936.1972546-2-kuldeep.singh@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:55 +00:00
Junlin Yang 87d62d8fa6
spi: cadence-quadspi: add missing of_node_put
Fix OF node leaks by calling of_node_put in
for_each_available_child_of_node when the cycle returns.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Link: https://lore.kernel.org/r/20210215110425.1012-1-angkery@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:54 +00:00
Tudor Ambarus 120a9e8155
spi: atmel: Drop unused variable
The DMA cap mask is no longer used since:
commit 7758e39069 ("spi: atmel: remove compat for non DT board when requesting dma chan")
Drop it now.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20210218132840.131898-1-tudor.ambarus@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:53 +00:00
Arnd Bergmann e50989527f
spi: rockchip: avoid objtool warning
Building this file with clang leads to a an unreachable code path
causing a warning from objtool:

drivers/spi/spi-rockchip.o: warning: objtool: rockchip_spi_transfer_one()+0x2e0: sibling call from callable instruction with modified stack frame

Change the unreachable() into an error return that can be
handled if it ever happens, rather than silently crashing
the kernel.

Fixes: 65498c6ae2 ("spi: rockchip: support 4bit words")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20210226140109.3477093-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:52 +00:00
Alexander Sverdlin abdc5db39d
spi: omap2-mcspi: Activate pinctrl idle state during runtime suspend
Set the (optional) idle pinctrl state during runtime suspend. This is the
same schema used in PL022 driver and can help with HW designs sharing
the SPI lines for different purposes.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://lore.kernel.org/r/20210222023243.491432-1-alexander.sverdlin@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:51 +00:00
Mark Brown d098738eb3
Merge existing fixes from spi/for-5.12 2021-03-10 12:46:50 +00:00
Andy Shevchenko 529bee9ed1
spi: lm70llp: Switch to use module_parport_driver()
Switch to use module_parport_driver() to reduce boilerplate code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210303091642.23929-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:06 +00:00
Andy Shevchenko 8c7e98f74c
spi: butterfly: Switch to use module_parport_driver()
Switch to use module_parport_driver() to reduce boilerplate code.
Note, device_initcall() is a default for module_init().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210303091642.23929-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:05 +00:00
Andy Shevchenko a0521f70ae
parport: Introduce module_parport_driver() helper macro
Introduce module_parport_driver() helper macro to reduce boilerplate
in the existing and new code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210303091642.23929-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10 12:46:04 +00:00