Skip to content

Commit 9dab1af

Browse files
lumagsuperna9999
authored andcommitted
drm/panel: novatek-nt36672e: stop calling regulator_set_load manually
Use .init_load_uA part of the bulk regulator API instead of calling register_set_load() manually. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com> Link: https://lore.kernel.org/r/20240404-drop-panel-unregister-v1-4-9f56953c5fb9@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240404-drop-panel-unregister-v1-4-9f56953c5fb9@linaro.org
1 parent 302aeb9 commit 9dab1af

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

drivers/gpu/drm/panel/panel-novatek-nt36672e.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,17 +343,7 @@ static int nt36672e_1080x2408_60hz_init(struct mipi_dsi_device *dsi)
343343
static int nt36672e_power_on(struct nt36672e_panel *ctx)
344344
{
345345
struct mipi_dsi_device *dsi = ctx->dsi;
346-
int ret, i;
347-
348-
for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) {
349-
ret = regulator_set_load(ctx->supplies[i].consumer,
350-
regulator_enable_loads[i]);
351-
if (ret) {
352-
dev_err(&dsi->dev, "regulator set load failed for supply %s: %d\n",
353-
ctx->supplies[i].supply, ret);
354-
return ret;
355-
}
356-
}
346+
int ret;
357347

358348
ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
359349
if (ret < 0) {
@@ -550,8 +540,10 @@ static int nt36672e_panel_probe(struct mipi_dsi_device *dsi)
550540
return -ENODEV;
551541
}
552542

553-
for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++)
543+
for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) {
554544
ctx->supplies[i].supply = regulator_names[i];
545+
ctx->supplies[i].init_load_uA = regulator_enable_loads[i];
546+
}
555547

556548
ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies),
557549
ctx->supplies);

0 commit comments

Comments
 (0)