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
Showing
Please register or sign in to comment