From: Jaewon Kim <jaewon02.kim@samsung.com> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Andi Shyti <andi@etezian.org>, Mark Brown <broonie@kernel.org>, Alim Akhtar <alim.akhtar@samsung.com> Cc: linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chanho Park <chanho61.park@samsung.com>, Jaewon Kim <jaewon02.kim@samsung.com> Subject: [PATCH v3 1/3] spi: s3c64xx: change polling mode to optional Date: Tue, 2 May 2023 15:28:11 +0900 [thread overview] Message-ID: <20230502062813.112434-2-jaewon02.kim@samsung.com> (raw) In-Reply-To: <20230502062813.112434-1-jaewon02.kim@samsung.com> 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> --- drivers/spi/spi-s3c64xx.c | 4 ++-- include/linux/platform_data/spi-s3c64xx.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 71d324ec9a70..66ac94022a1b 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -19,7 +19,6 @@ #include <linux/platform_data/spi-s3c64xx.h> #define MAX_SPI_PORTS 12 -#define S3C64XX_SPI_QUIRK_POLL (1 << 0) #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) #define AUTOSUSPEND_TIMEOUT 2000 @@ -116,7 +115,7 @@ #define S3C64XX_SPI_TRAILCNT S3C64XX_SPI_MAX_TRAILCNT #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) -#define is_polling(x) (x->port_conf->quirks & S3C64XX_SPI_QUIRK_POLL) +#define is_polling(x) (x->cntrlr_info->polling) #define RXBUSY (1<<2) #define TXBUSY (1<<3) @@ -1068,6 +1067,7 @@ static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) } sci->no_cs = of_property_read_bool(dev->of_node, "no-cs-readback"); + sci->polling = !of_property_present(dev->of_node, "dmas"); return sci; } diff --git a/include/linux/platform_data/spi-s3c64xx.h b/include/linux/platform_data/spi-s3c64xx.h index 5df1ace6d2c9..cb7b8ddc899f 100644 --- a/include/linux/platform_data/spi-s3c64xx.h +++ b/include/linux/platform_data/spi-s3c64xx.h @@ -35,6 +35,7 @@ struct s3c64xx_spi_info { int src_clk_nr; int num_cs; bool no_cs; + bool polling; int (*cfg_gpio)(void); }; -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Jaewon Kim <jaewon02.kim@samsung.com> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Andi Shyti <andi@etezian.org>, Mark Brown <broonie@kernel.org>, Alim Akhtar <alim.akhtar@samsung.com> Cc: linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chanho Park <chanho61.park@samsung.com>, Jaewon Kim <jaewon02.kim@samsung.com> Subject: [PATCH v3 1/3] spi: s3c64xx: change polling mode to optional Date: Tue, 2 May 2023 15:28:11 +0900 [thread overview] Message-ID: <20230502062813.112434-2-jaewon02.kim@samsung.com> (raw) In-Reply-To: <20230502062813.112434-1-jaewon02.kim@samsung.com> 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> --- drivers/spi/spi-s3c64xx.c | 4 ++-- include/linux/platform_data/spi-s3c64xx.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 71d324ec9a70..66ac94022a1b 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -19,7 +19,6 @@ #include <linux/platform_data/spi-s3c64xx.h> #define MAX_SPI_PORTS 12 -#define S3C64XX_SPI_QUIRK_POLL (1 << 0) #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) #define AUTOSUSPEND_TIMEOUT 2000 @@ -116,7 +115,7 @@ #define S3C64XX_SPI_TRAILCNT S3C64XX_SPI_MAX_TRAILCNT #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) -#define is_polling(x) (x->port_conf->quirks & S3C64XX_SPI_QUIRK_POLL) +#define is_polling(x) (x->cntrlr_info->polling) #define RXBUSY (1<<2) #define TXBUSY (1<<3) @@ -1068,6 +1067,7 @@ static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) } sci->no_cs = of_property_read_bool(dev->of_node, "no-cs-readback"); + sci->polling = !of_property_present(dev->of_node, "dmas"); return sci; } diff --git a/include/linux/platform_data/spi-s3c64xx.h b/include/linux/platform_data/spi-s3c64xx.h index 5df1ace6d2c9..cb7b8ddc899f 100644 --- a/include/linux/platform_data/spi-s3c64xx.h +++ b/include/linux/platform_data/spi-s3c64xx.h @@ -35,6 +35,7 @@ struct s3c64xx_spi_info { int src_clk_nr; int num_cs; bool no_cs; + bool polling; int (*cfg_gpio)(void); }; -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-05-02 6:50 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20230502065025epcas2p16f5a02e6990d6f2b2257f001979ebcf9@epcas2p1.samsung.com> 2023-05-02 6:28 ` [PATCH v3 0/3] Improve polling mode of s3c64xx driver Jaewon Kim 2023-05-02 6:28 ` Jaewon Kim [not found] ` <CGME20230502065025epcas2p4143c8ff3d44b7676ea8667c14618f2cd@epcas2p4.samsung.com> 2023-05-02 6:28 ` Jaewon Kim [this message] 2023-05-02 6:28 ` [PATCH v3 1/3] spi: s3c64xx: change polling mode to optional Jaewon Kim 2023-05-05 9:09 ` Krzysztof Kozlowski 2023-05-05 9:09 ` Krzysztof Kozlowski [not found] ` <CGME20230502065025epcas2p11549db7400e6707c61bbb1cff1b22252@epcas2p1.samsung.com> 2023-05-02 6:28 ` [PATCH v3 2/3] spi: s3c64xx: add sleep during transfer Jaewon Kim 2023-05-02 6:28 ` Jaewon Kim 2023-05-05 9:09 ` Krzysztof Kozlowski 2023-05-05 9:09 ` Krzysztof Kozlowski [not found] ` <CGME20230502065025epcas2p34507ffad60b32e091ff0efeced9bc12f@epcas2p3.samsung.com> 2023-05-02 6:28 ` [PATCH v3 3/3] spi: s3c64xx: support interrupt based pio mode Jaewon Kim 2023-05-02 6:28 ` Jaewon Kim 2023-05-05 9:47 ` Krzysztof Kozlowski 2023-05-05 9:47 ` Krzysztof Kozlowski 2023-05-08 1:42 ` Jaewon Kim 2023-05-08 1:42 ` Jaewon Kim 2023-05-09 13:03 ` Marek Szyprowski 2023-05-10 4:05 ` Jaewon Kim 2023-05-10 6:54 ` Marek Szyprowski 2023-05-08 13:27 ` [PATCH v3 0/3] Improve polling mode of s3c64xx driver Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230502062813.112434-2-jaewon02.kim@samsung.com \ --to=jaewon02.kim@samsung.com \ --cc=alim.akhtar@samsung.com \ --cc=andi@etezian.org \ --cc=broonie@kernel.org \ --cc=chanho61.park@samsung.com \ --cc=krzysztof.kozlowski@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.