[PATCH v16 04/10] iio: imu: inv_icm42607: Add inv_icm42607 Core Driver

Uwe Kleine-König u.kleine-koenig at baylibre.com
Tue Jul 14 05:18:53 PDT 2026


Hello,

On Mon, Jul 13, 2026 at 04:58:34PM -0500, Chris Morgan wrote:
> +#include <linux/i2c.h>
> +#include <linux/mod_devicetable.h>

Please don't use <linux/mod_devicetable.h>, to get i2c_device_id and
of_device_id it's enough to have <linux/i2c.h>.

> +static const struct i2c_device_id inv_icm42607_id[] = {
> +	{
> +		.name = "icm42607",
> +		.driver_data = (kernel_ulong_t)&inv_icm42607_hw_data,
> +	}, {
> +		.name = "icm42607p",
> +		.driver_data = (kernel_ulong_t)&inv_icm42607p_hw_data,
> +	},
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(i2c, inv_icm42607_id);
> +
> +static const struct of_device_id inv_icm42607_of_matches[] = {
> +	{
> +		.compatible = "invensense,icm42607",
> +		.data = &inv_icm42607_hw_data,
> +	}, {
> +		.compatible = "invensense,icm42607p",
> +		.data = &inv_icm42607p_hw_data,
> +	},
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, inv_icm42607_of_matches);

It would be enough to provide the driver_data pointers in the
i2c_device_id array only.

Best regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20260714/2b55b7ad/attachment.sig>


More information about the Linux-rockchip mailing list