]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm: adv7511: Add struct adv7511_chip_info and use i2c_get_match_data()
authorBiju Das <biju.das.jz@bp.renesas.com>
Wed, 30 Aug 2023 14:23:51 +0000 (15:23 +0100)
committerRobert Foss <rfoss@kernel.org>
Mon, 16 Oct 2023 09:08:21 +0000 (11:08 +0200)
commit19e77c7aef5754e680ac77013538e2a3c0c173e4
tree13e8c10823c33e76fd6938167e317b793d373762
parent0ddd30471a5dd78ff762ffb9eeae1d573283243a
drm: adv7511: Add struct adv7511_chip_info and use i2c_get_match_data()

Add struct adv7511_chip_info to handle hw differences between various
chips rather checking against the 'type' variable in various places.
Replace 'adv->type'->'info->type' by moving variable 'type' from
struct adv7511 to struct adv7511_chip_info and add adv7511_chip_info as
device data for both OF and ID tables instead of the device type.

Simplify the probe() by replacing of_device_get_match_data() and ID lookup
for retrieving match data with i2c_get_match_data().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@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-2-biju.das.jz@bp.renesas.com
drivers/gpu/drm/bridge/adv7511/adv7511.h
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
drivers/gpu/drm/bridge/adv7511/adv7533.c