WSL2-Linux-Kernel/drivers/staging
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
..
android driver: staging: count ashmem_range into SLAB_RECLAIMBLE 2020-12-28 15:06:06 +01:00
axis-fifo staging: axis-fifo: Fix parenthesis alignment 2020-04-13 08:55:30 +02:00
board Revert "staging: board: Remove macro board_staging" 2021-01-04 15:55:40 +01:00
clocking-wizard staging: Replace lkml.org links with lore 2021-02-11 12:13:53 +01:00
comedi staging: comedi: Switch from strlcpy to strscpy 2021-02-04 17:16:06 +01:00
emxx_udc staging: emxx_udc: Make incorrectly defined global static 2021-02-07 10:15:05 +01:00
fbtft staging: fbtft: add tearing signal detect 2021-02-12 09:48:29 +01:00
fieldbus staging: fieldbus: arcx-anybus: constify static structs 2021-02-08 15:22:34 +01:00
fsl-dpaa2 Staging/IIO driver patches for 5.12-rc1 2021-02-20 21:36:51 -08:00
fwserial staging: fwserial: Fix error handling in fwserial_create 2020-12-28 15:11:52 +01:00
gasket staging: gasket: fix indentation and lines ending with open parenthesis 2021-02-08 15:24:40 +01:00
gdm724x staging: gdm724x: Fix DMA from stack 2021-02-11 11:08:17 +01:00
greybus staging: greybus: spilib: use 'spi_delay_to_ns' for getting xfer delay 2021-03-12 14:30:47 +00:00
gs_fpgaboot staging: Replace HTTP links with HTTPS ones 2020-07-20 10:22:47 +02:00
hikey9xx staging: hikey9xx: Fix alignment of function parameters 2021-02-13 22:37:51 +01:00
iio staging: iio: adis16240: add blank line before struct definition 2020-10-26 06:53:09 +01:00
kpc2000 staging: kpc2000: kpc_dma: rename show function per convention 2020-10-27 12:23:59 +01:00
ks7010 staging: ks7010: fix missing destroy_workqueue() on error in ks7010_sdio_probe 2020-11-06 11:02:53 +01:00
media Simple Firmware Interface (SFI) support removal for v5.12-rc1 2021-02-24 10:35:29 -08:00
most staging: most: Switch from strlcpy to strscpy 2021-02-04 17:16:06 +01:00
mt7621-dma staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c 2021-01-31 13:39:53 +01:00
mt7621-dts staging: mt7621-dts: remove obsolete switch node 2021-01-26 18:46:35 +01:00
mt7621-pci staging: mt7621-pci: remove 'RALINK_PCI_IMBASEBAR0_ADDR' register 2020-11-26 09:12:18 +01:00
netlogic staging: netlogic: clear alignment style issues 2020-08-02 12:47:37 +02:00
nvec staging: nvec: minor coding style fix 2021-02-12 09:49:43 +01:00
octeon staging: octeon: remove braces from single-line block 2021-02-07 10:05:29 +01:00
octeon-usb drivers: staging: octeon-usb: fixed codestyle check warning 2020-09-13 09:21:15 +02:00
olpc_dcon staging: olpc_dcon: Switch from strlcpy to strscpy 2021-02-04 17:16:06 +01:00
pi433 staging: pi433: break long lines 2020-09-04 15:39:07 +02:00
qlge staging: qlge: Remove duplicate word in comment 2021-02-11 21:32:35 +01:00
ralink-gdma staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK 2020-11-06 11:12:49 +01:00
rtl8188eu staging:r8188eu: use IEEE80211_FCTL_* kernel definitions 2021-02-13 22:37:50 +01:00
rtl8192e staging: rtl8192e: remove multiple blank lines 2021-02-13 22:37:49 +01:00
rtl8192u staging: rtl8192u: Switch from strlcpy to strscpy 2021-02-04 17:16:07 +01:00
rtl8712 staging: rtl8712: Remove multiple blank lines 2021-02-09 18:42:16 +01:00
rtl8723bs Staging/IIO driver patches for 5.12-rc1 2021-02-20 21:36:51 -08:00
rts5208 staging: rts5208: rtsx_transport.c: Fix lines ending with parentheses 2020-09-13 09:20:31 +02:00
sm750fb staging: sm750fb: Switch from strlcpy to strscpy 2021-02-04 17:16:07 +01:00
unisys staging: unisys: visorhba: enhance visorhba to use channel_interrupt 2021-01-07 16:57:50 +01:00
vc04_services staging: Replace lkml.org links with lore 2021-02-11 12:13:53 +01:00
vme Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-02-27 08:07:12 -08:00
vt6655 Staging: vt6655: Replace a camel case variable name 2021-02-11 12:13:53 +01:00
vt6656 staging: vt6656: Fixed issue with alignment in rf.c 2021-02-12 09:47:13 +01:00
wfx staging: wfx: remove unused included header files 2021-02-12 09:53:57 +01:00
wimax staging: wimax/i2400m: fix some byte order issues found by sparse 2021-02-13 22:37:50 +01:00
wlan-ng staging:wlan-ng: use memdup_user instead of kmalloc/copy_from_user 2021-02-13 22:37:50 +01:00
Kconfig Staging / IIO driver patches for 5.11-rc1 2020-12-15 14:18:40 -08:00
Makefile Staging / IIO driver patches for 5.11-rc1 2020-12-15 14:18:40 -08:00