This is a note to let you know that I've just added the patch titled mmc: slot-gpio: Allow non-sleeping GPIO ro to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mmc-slot-gpio-allow-non-sleeping-gpio-ro.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From cc9432c4fb159a3913e0ce3173b8218cd5bad2e0 Mon Sep 17 00:00:00 2001 From: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx> Date: Tue, 6 Feb 2024 09:39:12 +0100 Subject: mmc: slot-gpio: Allow non-sleeping GPIO ro From: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx> commit cc9432c4fb159a3913e0ce3173b8218cd5bad2e0 upstream. This change uses the appropriate _cansleep or non-sleeping API for reading GPIO read-only state. This allows users with GPIOs that never sleepbeing called in atomic context. Implement the same mechanism as in commit 52af318c93e97 ("mmc: Allow non-sleeping GPIO cd"). Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/r/20240206083912.2543142-1-alexander.stein@xxxxxxxxxxxxxxx Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mmc/core/slot-gpio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/mmc/core/slot-gpio.c +++ b/drivers/mmc/core/slot-gpio.c @@ -62,11 +62,15 @@ int mmc_gpio_alloc(struct mmc_host *host int mmc_gpio_get_ro(struct mmc_host *host) { struct mmc_gpio *ctx = host->slot.handler_priv; + int cansleep; if (!ctx || !ctx->ro_gpio) return -ENOSYS; - return gpiod_get_value_cansleep(ctx->ro_gpio); + cansleep = gpiod_cansleep(ctx->ro_gpio); + return cansleep ? + gpiod_get_value_cansleep(ctx->ro_gpio) : + gpiod_get_value(ctx->ro_gpio); } EXPORT_SYMBOL(mmc_gpio_get_ro); Patches currently in stable-queue which might be from alexander.stein@xxxxxxxxxxxxxxx are queue-5.15/clk-imx-clk-imx8qxp-fix-lvds-bypass-pixel-and-phy-cl.patch queue-5.15/arm-dts-imx7s-fix-lcdif-compatible.patch queue-5.15/mmc-slot-gpio-allow-non-sleeping-gpio-ro.patch queue-5.15/arm-dts-imx7s-fix-nand-controller-size-cells.patch queue-5.15/drm-panel-simple-add-missing-bus-flags-for-tianma-tm.patch queue-5.15/arm-dts-imx7d-fix-coresight-funnel-ports.patch