[PATCH v2 1/5] spi: spi-gpio: actually delay in spidelay()
Sascha Hauer
s.hauer at pengutronix.de
Thu Sep 26 04:21:37 PDT 2024
spidelay() currently only is a no-op dummy function. Actually delay in
this function to avoid spi-gpio being faster than specified.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/spi/gpio_spi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/gpio_spi.c b/drivers/spi/gpio_spi.c
index e5664df3fe..dc9f46ca45 100644
--- a/drivers/spi/gpio_spi.c
+++ b/drivers/spi/gpio_spi.c
@@ -48,7 +48,10 @@ static inline int getmiso(const struct spi_device *spi)
return !!gpio_get_value(priv->data->miso);
}
-#define spidelay(nsecs) do { } while (0)
+static inline void spidelay(unsigned int nsecs)
+{
+ ndelay(nsecs);
+}
#include "spi-bitbang-txrx.h"
--
2.39.5
More information about the barebox
mailing list