From: Jonathan Cameron <jic23@kernel.org>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: "Remi Buisson" <remi.buisson@tdk.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: imu: inv_icm45600: Use I2C match data
Date: Wed, 1 Jul 2026 22:33:31 +0100 [thread overview]
Message-ID: <20260701223331.6ff4489a@jic23-huawei> (raw)
In-Reply-To: <20260624053823.73969-1-pengpeng@iscas.ac.cn>
On Wed, 24 Jun 2026 13:38:23 +0800
Pengpeng Hou <pengpeng@iscas.ac.cn> wrote:
> The I2C driver provides chip_info through both the OF match table and
> the I2C id table, but probe reads it with device_get_match_data(). That
> misses id-table driver_data for non-firmware I2C matches and can reject
> a supported device with -ENODEV.
>
> Use i2c_get_match_data() so the id-table chip_info is used when firmware
> match data is not present.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Applied to the testing branch of iio.git.
Thanks,
Jonathan
> ---
> drivers/iio/imu/inv_icm45600/inv_icm45600_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_i2c.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_i2c.c
> index 5ebc18121a11..c65e5501eee7 100644
> --- a/drivers/iio/imu/inv_icm45600/inv_icm45600_i2c.c
> +++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_i2c.c
> @@ -23,7 +23,7 @@ static int inv_icm45600_probe(struct i2c_client *client)
> if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_I2C_BLOCK))
> return -ENODEV;
>
> - chip_info = device_get_match_data(&client->dev);
> + chip_info = i2c_get_match_data(client);
> if (!chip_info)
> return -ENODEV;
>
prev parent reply other threads:[~2026-07-01 21:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 5:38 Pengpeng Hou
2026-06-24 6:56 ` Joshua Crofts
2026-06-24 8:33 ` Jean-Baptiste Maneyrol
2026-06-24 11:13 ` Andy Shevchenko
2026-07-01 21:33 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260701223331.6ff4489a@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pengpeng@iscas.ac.cn \
--cc=remi.buisson@tdk.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®