On Tue, Oct 28, 2025 at 05:49:29PM +0200, Laurent Pinchart wrote:
> On Tue, Oct 28, 2025 at 08:56:50PM +0530, Prahlad Valluru wrote:
> > In some cases, need gpio to be set for the connector
> > enable. Add optional enable gpio to display-connector.
> > 
> > Signed-off-by: Prahlad Valluru <[email protected]>
> > ---
> >  drivers/gpu/drm/bridge/display-connector.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/bridge/display-connector.c 
> > b/drivers/gpu/drm/bridge/display-connector.c
> > index e9f16dbc9535..52f5e4175e64 100644
> > --- a/drivers/gpu/drm/bridge/display-connector.c
> > +++ b/drivers/gpu/drm/bridge/display-connector.c
> > @@ -21,6 +21,7 @@ struct display_connector {
> >     struct drm_bridge       bridge;
> >  
> >     struct gpio_desc        *hpd_gpio;
> > +   struct gpio_desc        *enable_gpio;
> >     int                     hpd_irq;
> >  
> >     struct regulator        *supply;
> > @@ -298,6 +299,12 @@ static int display_connector_probe(struct 
> > platform_device *pdev)
> >                                          "Unable to retrieve HPD GPIO\n");
> >  
> >             conn->hpd_irq = gpiod_to_irq(conn->hpd_gpio);
> > +
> > +           conn->enable_gpio = devm_gpiod_get_optional(&pdev->dev, 
> > "enable",
> > +                                                    GPIOD_OUT_HIGH);
> 
> What does it mean to "enable the connector" ? Given that you don't set
> the GPIO value at runtime, this seems to be a hack that is probably
> better handled with GPIO hogs in the device tree.
DP_PWR 3.3v for the connector is enabled by a gpio. gpio hog will perfectly
work for this scenario, thanks for the suggestion.
> 
> > +           if (IS_ERR(conn->enable_gpio))
> > +                   return dev_err_probe(&pdev->dev, 
> > PTR_ERR(conn->enable_gpio),
> > +                                        "Unable to retrieve enable 
> > GPIO\n");
> >     } else {
> >             conn->hpd_irq = -EINVAL;
> >     }
> 
> -- 
> Regards,
> 
> Laurent Pinchart

Reply via email to