Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: s3c64xx: change polling mode to optional

Previously, Polling mode was supported as quirk for SOC without DMA.
To provide more flexible support for polling mode, it changed to polling
mode when the 'dmas' property is not present in the devicetree, rather than
using a quirk.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Link: https://lore.kernel.org/r/20230502062813.112434-2-jaewon02.kim@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org

authored by

Jaewon Kim and committed by
Mark Brown
d1a7718e ac9a7868

+3 -2
+2 -2
drivers/spi/spi-s3c64xx.c
··· 19 19 #include <linux/platform_data/spi-s3c64xx.h> 20 20 21 21 #define MAX_SPI_PORTS 12 22 - #define S3C64XX_SPI_QUIRK_POLL (1 << 0) 23 22 #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) 24 23 #define AUTOSUSPEND_TIMEOUT 2000 25 24 ··· 115 116 #define S3C64XX_SPI_TRAILCNT S3C64XX_SPI_MAX_TRAILCNT 116 117 117 118 #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) 118 - #define is_polling(x) (x->port_conf->quirks & S3C64XX_SPI_QUIRK_POLL) 119 + #define is_polling(x) (x->cntrlr_info->polling) 119 120 120 121 #define RXBUSY (1<<2) 121 122 #define TXBUSY (1<<3) ··· 1067 1068 } 1068 1069 1069 1070 sci->no_cs = of_property_read_bool(dev->of_node, "no-cs-readback"); 1071 + sci->polling = !of_property_present(dev->of_node, "dmas"); 1070 1072 1071 1073 return sci; 1072 1074 }
+1
include/linux/platform_data/spi-s3c64xx.h
··· 36 36 int src_clk_nr; 37 37 int num_cs; 38 38 bool no_cs; 39 + bool polling; 39 40 int (*cfg_gpio)(void); 40 41 }; 41 42