Skip to content

Commit 99304fd

Browse files
lumagsuperna9999
authored andcommitted
drm/bridge: display-connector: rename dp_pwr to connector_pwr
In preparation to adding support for the hdmi_pwr supply, rename dp_pwr structure field to the generic connector_pwr. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230531000259.3758235-3-dmitry.baryshkov@linaro.org
1 parent 41b7482 commit 99304fd

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/gpu/drm/bridge/display-connector.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct display_connector {
2424
struct gpio_desc *hpd_gpio;
2525
int hpd_irq;
2626

27-
struct regulator *dp_pwr;
27+
struct regulator *supply;
2828
struct gpio_desc *ddc_en;
2929
};
3030

@@ -316,14 +316,14 @@ static int display_connector_probe(struct platform_device *pdev)
316316
if (type == DRM_MODE_CONNECTOR_DisplayPort) {
317317
int ret;
318318

319-
conn->dp_pwr = devm_regulator_get_optional(&pdev->dev, "dp-pwr");
319+
conn->supply = devm_regulator_get_optional(&pdev->dev, "dp-pwr");
320320

321-
if (IS_ERR(conn->dp_pwr)) {
322-
ret = PTR_ERR(conn->dp_pwr);
321+
if (IS_ERR(conn->supply)) {
322+
ret = PTR_ERR(conn->supply);
323323

324324
switch (ret) {
325325
case -ENODEV:
326-
conn->dp_pwr = NULL;
326+
conn->supply = NULL;
327327
break;
328328

329329
case -EPROBE_DEFER:
@@ -335,8 +335,8 @@ static int display_connector_probe(struct platform_device *pdev)
335335
}
336336
}
337337

338-
if (conn->dp_pwr) {
339-
ret = regulator_enable(conn->dp_pwr);
338+
if (conn->supply) {
339+
ret = regulator_enable(conn->supply);
340340
if (ret) {
341341
dev_err(&pdev->dev, "failed to enable DP PWR regulator: %d\n", ret);
342342
return ret;
@@ -386,8 +386,8 @@ static void display_connector_remove(struct platform_device *pdev)
386386
if (conn->ddc_en)
387387
gpiod_set_value(conn->ddc_en, 0);
388388

389-
if (conn->dp_pwr)
390-
regulator_disable(conn->dp_pwr);
389+
if (conn->supply)
390+
regulator_disable(conn->supply);
391391

392392
drm_bridge_remove(&conn->bridge);
393393

0 commit comments

Comments
 (0)