[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKLYis79QnAAWUoe@kekkonen.localdomain>
Date: Mon, 18 Aug 2025 07:38:50 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: git@...tzsch.eu
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
Daniel Scally <djrscally@...il.com>,
~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Val Packett <val@...kett.cool>
Subject: Re: [PATCH 3/7] media: i2c: dw9719: Add driver_data matching
Hi André, Val,
On Sun, Aug 17, 2025 at 07:09:22PM +0200, André Apitzsch via B4 Relay wrote:
> From: Val Packett <val@...kett.cool>
>
> In preparation for adding models with different register sets, start
> assigning the model based on the i2c match data.
>
> Signed-off-by: Val Packett <val@...kett.cool>
> Signed-off-by: André Apitzsch <git@...tzsch.eu>
> ---
> 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
Powered by blists - more mailing lists