Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/bridge: anx7625: change the gpiod_set_value API

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>

authored by

Ayushi Makhija and committed by
Dmitry Baryshkov
50935044 366ca0bc

+4 -4
+4 -4
drivers/gpu/drm/bridge/analogix/anx7625.c
··· 1257 1257 usleep_range(11000, 12000); 1258 1258 1259 1259 /* Power on pin enable */ 1260 - gpiod_set_value(ctx->pdata.gpio_p_on, 1); 1260 + gpiod_set_value_cansleep(ctx->pdata.gpio_p_on, 1); 1261 1261 usleep_range(10000, 11000); 1262 1262 /* Power reset pin enable */ 1263 - gpiod_set_value(ctx->pdata.gpio_reset, 1); 1263 + gpiod_set_value_cansleep(ctx->pdata.gpio_reset, 1); 1264 1264 usleep_range(10000, 11000); 1265 1265 1266 1266 DRM_DEV_DEBUG_DRIVER(dev, "power on !\n"); ··· 1280 1280 return; 1281 1281 } 1282 1282 1283 - gpiod_set_value(ctx->pdata.gpio_reset, 0); 1283 + gpiod_set_value_cansleep(ctx->pdata.gpio_reset, 0); 1284 1284 usleep_range(1000, 1100); 1285 - gpiod_set_value(ctx->pdata.gpio_p_on, 0); 1285 + gpiod_set_value_cansleep(ctx->pdata.gpio_p_on, 0); 1286 1286 usleep_range(1000, 1100); 1287 1287 1288 1288 ret = regulator_bulk_disable(ARRAY_SIZE(ctx->pdata.supplies),