Hi André, Val,
On Sun, Aug 17, 2025 at 07:09:22PM +0200, André Apitzsch via B4 Relay wrote:
> From: Val Packett <[email protected]>
>
> In preparation for adding models with different register sets, start
> assigning the model based on the i2c match data.
>
> Signed-off-by: Val Packett <[email protected]>
> Signed-off-by: André Apitzsch <[email protected]>
> ---
> drivers/media/i2c/dw9719.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
> index
> 5ed0042fce18acd9e6ce9f6cf6c6982e36fed275..7ce66eaede5a2a1ba9c4c30c0efc5fafcca339a0
> 100644
> --- a/drivers/media/i2c/dw9719.c
> +++ b/drivers/media/i2c/dw9719.c
> @@ -282,6 +282,8 @@ static int dw9719_probe(struct i2c_client *client)
> if (!dw9719)
> return -ENOMEM;
>
> + dw9719->model = (enum dw9719_model)i2c_get_match_data(client);
> +
> dw9719->regmap = devm_cci_regmap_init_i2c(client, 8);
> if (IS_ERR(dw9719->regmap))
> return PTR_ERR(dw9719->regmap);
> @@ -361,8 +363,8 @@ static void dw9719_remove(struct i2c_client *client)
> }
>
> static const struct i2c_device_id dw9719_id_table[] = {
> - { "dw9719" },
> - { "dw9761" },
> + { "dw9719", .driver_data = DW9719 },
> + { "dw9761", .driver_data = DW9761 },
Does something still depend on the I²C device ID table? Couldn't we just
remove it?
> { }
> };
> MODULE_DEVICE_TABLE(i2c, dw9719_id_table);
>
--
Kind regards,
Sakari Ailus