[PATCH v2 1/3] memory: omap-gpmc: allow shared wait pins

B. Niedermayr
2022-09-05T07:22:02Z

From: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>

Newer kernels refuse to probe when using the same wait pin for
different chipselect regions.

But this may be a usecase when connecting for example FPGA or ASIC
modules to the gpmc, which only got one wait pin installed.

Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
---
drivers/memory/omap-gpmc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 2351f2708da2..579903457415 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2215,9 +2215,13 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
GPIO_ACTIVE_HIGH,
GPIOD_IN);
if (IS_ERR(waitpin_desc)) {
- dev_err(&pdev->dev, "invalid wait-pin: %d\n", wait_pin);
ret = PTR_ERR(waitpin_desc);
- goto err;
+ if (ret == -EBUSY) {
+ dev_info(&pdev->dev, "shared wait-pin: %d\n", wait_pin);
+ } else {
+ dev_err(&pdev->dev, "invalid wait-pin: %d\n", wait_pin);
+ goto err;
+ }
}
}

--
2.25.1