Skip to content

Commit

Permalink
drm: adv7511: Add link_config variable to struct adv7511_chip_info
Browse files Browse the repository at this point in the history
The ADV7511 needs link configuration whereas ADV75{33,35} does not need
it. Add a variable link_config to struct adv7511_chip_info to handle
this difference.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230830142358.275459-8-biju.das.jz@bp.renesas.com
  • Loading branch information
Biju Das authored and Robert Foss committed Oct 16, 2023
1 parent c755512 commit 7618aa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/bridge/adv7511/adv7511.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ struct adv7511_chip_info {
unsigned int num_supplies;
unsigned int reg_cec_offset;
bool has_dsi;
bool link_config;
};

struct adv7511 {
Expand Down
5 changes: 3 additions & 2 deletions drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ static int adv7511_probe(struct i2c_client *i2c)

memset(&link_config, 0, sizeof(link_config));

if (adv7511->info->type == ADV7511)
if (adv7511->info->link_config)
ret = adv7511_parse_dt(dev->of_node, &link_config);
else
ret = adv7533_parse_dt(dev->of_node, adv7511);
Expand Down Expand Up @@ -1292,7 +1292,7 @@ static int adv7511_probe(struct i2c_client *i2c)

i2c_set_clientdata(i2c, adv7511);

if (adv7511->info->type == ADV7511)
if (adv7511->info->link_config)
adv7511_set_link_config(adv7511, &link_config);

ret = adv7511_cec_init(dev, adv7511);
Expand Down Expand Up @@ -1358,6 +1358,7 @@ static const struct adv7511_chip_info adv7511_chip_info = {
.type = ADV7511,
.supply_names = adv7511_supply_names,
.num_supplies = ARRAY_SIZE(adv7511_supply_names),
.link_config = true,
};

static const struct adv7511_chip_info adv7533_chip_info = {
Expand Down

0 comments on commit 7618aa3

Please sign in to comment.