]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/bridge: anx7625: change the gpiod_set_value API
authorAyushi Makhija <quic_amakhija@quicinc.com>
Mon, 5 May 2025 09:42:45 +0000 (15:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:28 +0000 (11:05 +0100)
[ Upstream commit 50935044e58e563cdcfd556d62f27bc8744dd64e ]

Use gpiod_set_value_cansleep() instead of gpiod_set_value()
to fix the below call trace in the boot log:

[    5.690534] Call trace:
[    5.690536]  gpiod_set_value+0x40/0xa4
[    5.690540]  anx7625_runtime_pm_resume+0xa0/0x324 [anx7625]
[    5.690545]  __rpm_callback+0x48/0x1d8
[    5.690549]  rpm_callback+0x6c/0x78

Certain GPIO controllers require access via message-based buses
such as I2C or SPI, which may cause the GPIOs to enter a sleep
state. Therefore, use the gpiod_set_value_cansleep().

Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250505094245.2660750-7-quic_amakhija@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/analogix/anx7625.c

index 01612d2c034afb40b102d2304708e26e4ab32e9f..257f69b5e17837b226537f9e6f221f2d41ffe188 100644 (file)
@@ -920,10 +920,10 @@ static void anx7625_power_on(struct anx7625_data *ctx)
        usleep_range(11000, 12000);
 
        /* Power on pin enable */
-       gpiod_set_value(ctx->pdata.gpio_p_on, 1);
+       gpiod_set_value_cansleep(ctx->pdata.gpio_p_on, 1);
        usleep_range(10000, 11000);
        /* Power reset pin enable */
-       gpiod_set_value(ctx->pdata.gpio_reset, 1);
+       gpiod_set_value_cansleep(ctx->pdata.gpio_reset, 1);
        usleep_range(10000, 11000);
 
        DRM_DEV_DEBUG_DRIVER(dev, "power on !\n");
@@ -943,9 +943,9 @@ static void anx7625_power_standby(struct anx7625_data *ctx)
                return;
        }
 
-       gpiod_set_value(ctx->pdata.gpio_reset, 0);
+       gpiod_set_value_cansleep(ctx->pdata.gpio_reset, 0);
        usleep_range(1000, 1100);
-       gpiod_set_value(ctx->pdata.gpio_p_on, 0);
+       gpiod_set_value_cansleep(ctx->pdata.gpio_p_on, 0);
        usleep_range(1000, 1100);
 
        ret = regulator_bulk_disable(ARRAY_SIZE(ctx->pdata.supplies),