RE: [PATCH 6/7] drm: adv7511: Add link_config feature bit to struct adv7511_chip_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,

Thanks for the feedback.

> Subject: Re: [PATCH 6/7] drm: adv7511: Add link_config feature bit to
> struct adv7511_chip_info
> 
> Hi Biju,
> 
> Thank you for the patch.
> 
> On Sun, Aug 13, 2023 at 07:05:11PM +0100, Biju Das wrote:
> > The ADV7511 needs link configuration whereas ADV75{33,35} does not
> > need it. Add a feature bit link_config to struct adv7511_chip_info to
> > handle this difference.
> >
> > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/bridge/adv7511/adv7511.h     | 1 +
> >  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 7 ++++---
> >  2 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> > b/drivers/gpu/drm/bridge/adv7511/adv7511.h
> > index 2a017bb31a14..627531f48f84 100644
> > --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h
> > @@ -340,6 +340,7 @@ struct adv7511_chip_info {
> >  	const char * const *supply_names;
> >  	unsigned int num_supplies;
> >  	unsigned has_dsi:1;
> > +	unsigned link_config:1;
> 
> I would use a bool here too.

OK, will use Boolean.

Cheers,
Biju

> 
> I'm not entirely sure about this particular patch, it seems that testing
> the chip type would be better. I'm not totally against it though, so
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> 
> >  };
> >
> >  struct adv7511 {
> > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > index 66b3f8fcf67d..6974c267b1d5 100644
> > --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > @@ -1208,7 +1208,7 @@ static int adv7511_probe(struct i2c_client *i2c)
> >
> >  	memset(&link_config, 0, sizeof(link_config));
> >
> > -	if (adv7511->info->type == ADV7511)
> > +	if (info->link_config)
> >  		ret = adv7511_parse_dt(dev->of_node, &link_config);
> >  	else
> >  		ret = adv7533_parse_dt(dev->of_node, adv7511); @@ -1297,7
> +1297,7
> > @@ static int adv7511_probe(struct i2c_client *i2c)
> >
> >  	i2c_set_clientdata(i2c, adv7511);
> >
> > -	if (info->type == ADV7511)
> > +	if (info->link_config)
> >  		adv7511_set_link_config(adv7511, &link_config);
> >
> >  	ret = adv7511_cec_init(dev, adv7511); @@ -1362,7 +1362,8 @@ static
> > void adv7511_remove(struct i2c_client *i2c)  static const struct
> > adv7511_chip_info adv7511_chip_info = {
> >  	.type = ADV7511,
> >  	.supply_names = adv7511_supply_names,
> > -	.num_supplies = ARRAY_SIZE(adv7511_supply_names)
> > +	.num_supplies = ARRAY_SIZE(adv7511_supply_names),
> > +	.link_config = 1
> >  };
> >
> >  static const struct adv7511_chip_info adv7533_chip_info = {
> 
> --
> Regards,
> 
> Laurent Pinchart




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux