Skip to content

Commit e02b526

Browse files
julienchauveaumartinezjavier
authored andcommitted
drm/bridge: it66121: acquire reset GPIO in probe
The it66121_ctx structure has a gpio_reset field, and it66121_hw_reset() calls gpiod_set_value() on it. However, the GPIO descriptor is never acquired via devm_gpiod_get(), leaving gpio_reset as NULL throughout the driver lifetime. gpiod_set_value() silently returns when passed a NULL descriptor, so the hardware reset sequence in it66121_hw_reset() is a no-op. This leaves the chip in an undefined state at probe time, which can prevent it from responding on the I2C bus. The DT binding marks reset-gpios as a required property, so all compliant device trees provide this GPIO. Add the missing devm_gpiod_get() call after enabling power supplies and before the hardware reset, so the chip is properly reset with power applied. Fixes: 988156d ("drm: bridge: add it66121 driver") Cc: stable@vger.kernel.org Signed-off-by: Julien Chauveau <chauveau.julien@gmail.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260324193011.16583-1-chauveau.julien@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
1 parent 0a9c56d commit e02b526

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/gpu/drm/bridge/ite-it66121.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,11 @@ static int it66121_probe(struct i2c_client *client)
15591559
return ret;
15601560
}
15611561

1562+
ctx->gpio_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
1563+
if (IS_ERR(ctx->gpio_reset))
1564+
return dev_err_probe(dev, PTR_ERR(ctx->gpio_reset),
1565+
"Failed to get reset GPIO\n");
1566+
15621567
it66121_hw_reset(ctx);
15631568

15641569
ctx->regmap = devm_regmap_init_i2c(client, &it66121_regmap_config);

0 commit comments

Comments
 (0)