[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240208135045.3728927-10-tudor.ambarus@linaro.org>
Date: Thu, 8 Feb 2024 13:50:42 +0000
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: broonie@...nel.org,
robh@...nel.org,
andi.shyti@...nel.org,
semen.protsenko@...aro.org
Cc: krzysztof.kozlowski@...aro.org,
alim.akhtar@...sung.com,
linux-spi@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
andre.draszik@...aro.org,
peter.griffin@...aro.org,
kernel-team@...roid.com,
willmcvicker@...gle.com,
conor+dt@...nel.org,
devicetree@...r.kernel.org,
arnd@...db.de,
Tudor Ambarus <tudor.ambarus@...aro.org>
Subject: [PATCH 09/12] spi: s3c64xx: get rid of the OF alias ID dependency
Compatibles that set ``port_conf->{rx, tx}_fifomask`` are now safe to
get rid of the OF alias ID dependency. Let the driver probe even without
the alias for these.
With this we also protect the FIFO_LVL_MASK calls from
s3c64xx_spi_set_fifomask().
Signed-off-by: Tudor Ambarus <tudor.ambarus@...aro.org>
---
drivers/spi/spi-s3c64xx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 40de325bd094..d2d1c9767145 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1203,8 +1203,12 @@ static inline const struct s3c64xx_spi_port_config *s3c64xx_spi_get_port_config(
static int s3c64xx_spi_set_port_id(struct platform_device *pdev,
struct s3c64xx_spi_driver_data *sdd)
{
+ const struct s3c64xx_spi_port_config *port_conf = sdd->port_conf;
int ret;
+ if (port_conf->rx_fifomask && port_conf->tx_fifomask)
+ return 0;
+
if (pdev->dev.of_node) {
ret = of_alias_get_id(pdev->dev.of_node, "spi");
if (ret < 0)
--
2.43.0.687.g38aa6559b0-goog
Powered by blists - more mailing lists