diff mbox series

iio/inv_icm42600: add inv_icm42600 id_table

Message ID 20240902113101.3135-1-jasonliu10041728@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series iio/inv_icm42600: add inv_icm42600 id_table | expand

Commit Message

jason liu Sept. 2, 2024, 11:31 a.m. UTC
Add the id_table of inv_icm42600, so the device can probe correctly.

Signed-off-by: Jason Liu <jasonliu10041728@gmail.com>
---
V1->V2: fix up the formatting as requested
---
V2->V3: add icm42686 (INV_ICM_42686) and icm42688 (INV_ICM_42688)
---
 drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 17 +++++++++++++++++
 drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)

Comments

Jean-Baptiste Maneyrol Sept. 5, 2024, 9:25 a.m. UTC | #1
Hello,

looks good for me now, thanks for the patch.

Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>

Thanks,
JB
Jonathan Cameron Sept. 7, 2024, 1:48 p.m. UTC | #2
On Thu, 5 Sep 2024 09:25:33 +0000
Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com> wrote:

> Hello,
> 
> looks good for me now, thanks for the patch.
> 
> Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
> 
Hi Jason,

I've picked this up, but the patch submission has a number of issues
you should be sure to fix in future patches.

1) Patch version is not in the patch title.  I initially picked up a different
   version that was in a later thread in my email.
2) Patch title has wrong style - look at other patches for this driver and
   similar.  Should start with iio: imu: inv...
3) Never send a new patch in reply to a previous one.  Whilst that is accepted
   practice in some opensource communities it scales very badly and mostly
   reduces the chance anyone will read your patches as they will be off the
   top of the screen of their most recent emails.
   I have never come across a kernel maintainer asking for this style and
   many including myself actively ask people to not do this.
   Each version should be a new email thread. 

Anyhow, stuff to watch out for next time.

Applied, but given timing I'm not sure if this will be in my final pull request
for this kernel cycle or not.


Jonathan


> Thanks,
> JB
> 
> ________________________________________
> From: jason liu <jasonliu10041728@gmail.com>
> Sent: Wednesday, September 4, 2024 11:00
> To: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
> Cc: jic23@kernel.org <jic23@kernel.org>; lars@metafoo.de <lars@metafoo.de>; linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
>  
> This Message Is From an Untrusted Sender
> You have not previously corresponded with this sender.
>  
> Hello, does patch v3 meet the requirements?
> 
> BR.
> 
> Jason Liu <jasonliu10041728@gmail.com> 于2024年9月2日周一 19:31写道:
> Add the id_table of inv_icm42600, so the device can probe correctly.
> 
> Signed-off-by: Jason Liu <jasonliu10041728@gmail.com>
> ---
> V1->V2: fix up the formatting as requested
> ---
> V2->V3: add icm42686 (INV_ICM_42686) and icm42688 (INV_ICM_42688)
> ---
>  drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 17 +++++++++++++++++
>  drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 17 +++++++++++++++++
>  2 files changed, 34 insertions(+)
> 
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> index ebb31b385881..9e65fef04c39 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> @@ -71,6 +71,22 @@ static int inv_icm42600_probe(struct i2c_client *client)
>                                        inv_icm42600_i2c_bus_setup);
>  }
> 
> +/*
> + * device id table is used to identify what device can be
> + * supported by this driver
> + */
> +static const struct i2c_device_id inv_icm42600_id[] = {
> +       { "icm42600", INV_CHIP_ICM42600 },
> +       { "icm42602", INV_CHIP_ICM42602 },
> +       { "icm42605", INV_CHIP_ICM42605 },
> +       { "icm42686", INV_CHIP_ICM42686 },
> +       { "icm42622", INV_CHIP_ICM42622 },
> +       { "icm42688", INV_CHIP_ICM42688 },
> +       { "icm42631", INV_CHIP_ICM42631 },
> +       {}
> +};
> +MODULE_DEVICE_TABLE(i2c, inv_icm42600_id);
> +
>  static const struct of_device_id inv_icm42600_of_matches[] = {
>         {
>                 .compatible = "invensense,icm42600",
> @@ -104,6 +120,7 @@ static struct i2c_driver inv_icm42600_driver = {
>                 .of_match_table = inv_icm42600_of_matches,
>                 .pm = pm_ptr(&inv_icm42600_pm_ops),
>         },
> +       .id_table = inv_icm42600_id,
>         .probe = inv_icm42600_probe,
>  };
>  module_i2c_driver(inv_icm42600_driver);
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> index eae5ff7a3cc1..75441b2be174 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> @@ -67,6 +67,22 @@ static int inv_icm42600_probe(struct spi_device *spi)
>                                        inv_icm42600_spi_bus_setup);
>  }
> 
> +/*
> + * device id table is used to identify what device can be
> + * supported by this driver
> + */
> +static const struct spi_device_id inv_icm42600_id[] = {
> +       { "icm42600", INV_CHIP_ICM42600 },
> +       { "icm42602", INV_CHIP_ICM42602 },
> +       { "icm42605", INV_CHIP_ICM42605 },
> +       { "icm42686", INV_CHIP_ICM42686 },
> +       { "icm42622", INV_CHIP_ICM42622 },
> +       { "icm42688", INV_CHIP_ICM42688 },
> +       { "icm42631", INV_CHIP_ICM42631 },
> +       {}
> +};
> +MODULE_DEVICE_TABLE(spi, inv_icm42600_id);
> +
>  static const struct of_device_id inv_icm42600_of_matches[] = {
>         {
>                 .compatible = "invensense,icm42600",
> @@ -100,6 +116,7 @@ static struct spi_driver inv_icm42600_driver = {
>                 .of_match_table = inv_icm42600_of_matches,
>                 .pm = pm_ptr(&inv_icm42600_pm_ops),
>         },
> +       .id_table = inv_icm42600_id,
>         .probe = inv_icm42600_probe,
>  };
>  module_spi_driver(inv_icm42600_driver);
> --
> 2.25.1
Jonathan Cameron Sept. 8, 2024, 10:51 a.m. UTC | #3
On Fri, 6 Sep 2024 05:02:59 +0000
jason liu <jasonliu10041728@gmail.com> wrote:

> Hello,
> 
> I'm glad this patch could help. And I would like to know, how will the patch to be handled moving forward?
> 
It is queued up on the IIO tree.  Given timing it's queued for 6.13.
Note that for now that is only pushed out as testing because I will
be rebasing the IIO togreg branch on 6.12-rc1.
One that is done it will appear in linux-next.

It should go upstream and appear in char-misc/char-misc-next
in about 6 weeks.  After that Greg KH will send a pull request during
the 6.13 merge window in about 12 weeks time and it will then hopefully
get merged into Linus' tree before 6.13-rc1 

I haven't treated this as a fix because it was never there, but
it may make sense to request a backport to stable after it is upstream.

Thanks,

Jonathan

> Thanks.
> 
> ________________________________
> From: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
> Sent: Thursday, September 5, 2024 5:25 PM
> To: jason liu <jasonliu10041728@gmail.com>
> Cc: jic23@kernel.org <jic23@kernel.org>; lars@metafoo.de <lars@metafoo.de>; linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
> 
> Hello,
> 
> looks good for me now, thanks for the patch.
> 
> Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
> 
> Thanks,
> JB
> 
> ________________________________________
> From: jason liu <jasonliu10041728@gmail.com>
> Sent: Wednesday, September 4, 2024 11:00
> To: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
> Cc: jic23@kernel.org <jic23@kernel.org>; lars@metafoo.de <lars@metafoo.de>; linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
> 
> This Message Is From an Untrusted Sender
> You have not previously corresponded with this sender.
> 
> Hello, does patch v3 meet the requirements?
> 
> BR.
> 
> Jason Liu <jasonliu10041728@gmail.com> 于2024年9月2日周一 19:31写道:
> Add the id_table of inv_icm42600, so the device can probe correctly.
> 
> Signed-off-by: Jason Liu <jasonliu10041728@gmail.com>
> ---
> V1->V2: fix up the formatting as requested
> ---
> V2->V3: add icm42686 (INV_ICM_42686) and icm42688 (INV_ICM_42688)
> ---
>  drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 17 +++++++++++++++++
>  drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 17 +++++++++++++++++
>  2 files changed, 34 insertions(+)
> 
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> index ebb31b385881..9e65fef04c39 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> @@ -71,6 +71,22 @@ static int inv_icm42600_probe(struct i2c_client *client)
>                                        inv_icm42600_i2c_bus_setup);
>  }
> 
> +/*
> + * device id table is used to identify what device can be
> + * supported by this driver
> + */
> +static const struct i2c_device_id inv_icm42600_id[] = {
> +       { "icm42600", INV_CHIP_ICM42600 },
> +       { "icm42602", INV_CHIP_ICM42602 },
> +       { "icm42605", INV_CHIP_ICM42605 },
> +       { "icm42686", INV_CHIP_ICM42686 },
> +       { "icm42622", INV_CHIP_ICM42622 },
> +       { "icm42688", INV_CHIP_ICM42688 },
> +       { "icm42631", INV_CHIP_ICM42631 },
> +       {}
> +};
> +MODULE_DEVICE_TABLE(i2c, inv_icm42600_id);
> +
>  static const struct of_device_id inv_icm42600_of_matches[] = {
>         {
>                 .compatible = "invensense,icm42600",
> @@ -104,6 +120,7 @@ static struct i2c_driver inv_icm42600_driver = {
>                 .of_match_table = inv_icm42600_of_matches,
>                 .pm = pm_ptr(&inv_icm42600_pm_ops),
>         },
> +       .id_table = inv_icm42600_id,
>         .probe = inv_icm42600_probe,
>  };
>  module_i2c_driver(inv_icm42600_driver);
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> index eae5ff7a3cc1..75441b2be174 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> @@ -67,6 +67,22 @@ static int inv_icm42600_probe(struct spi_device *spi)
>                                        inv_icm42600_spi_bus_setup);
>  }
> 
> +/*
> + * device id table is used to identify what device can be
> + * supported by this driver
> + */
> +static const struct spi_device_id inv_icm42600_id[] = {
> +       { "icm42600", INV_CHIP_ICM42600 },
> +       { "icm42602", INV_CHIP_ICM42602 },
> +       { "icm42605", INV_CHIP_ICM42605 },
> +       { "icm42686", INV_CHIP_ICM42686 },
> +       { "icm42622", INV_CHIP_ICM42622 },
> +       { "icm42688", INV_CHIP_ICM42688 },
> +       { "icm42631", INV_CHIP_ICM42631 },
> +       {}
> +};
> +MODULE_DEVICE_TABLE(spi, inv_icm42600_id);
> +
>  static const struct of_device_id inv_icm42600_of_matches[] = {
>         {
>                 .compatible = "invensense,icm42600",
> @@ -100,6 +116,7 @@ static struct spi_driver inv_icm42600_driver = {
>                 .of_match_table = inv_icm42600_of_matches,
>                 .pm = pm_ptr(&inv_icm42600_pm_ops),
>         },
> +       .id_table = inv_icm42600_id,
>         .probe = inv_icm42600_probe,
>  };
>  module_spi_driver(inv_icm42600_driver);
> --
> 2.25.1
jason liu Sept. 9, 2024, 6:43 a.m. UTC | #4
Hi Jonathan,

> Hi Jason,

> I've picked this up, but the patch submission has a number of issues
> you should be sure to fix in future patches.
>
I am sorry for the issues, and I will keep your suggestions in mind.
So, do I still need to submit a new patch to fix these issues?
My understanding is that since you've picked it up, there's no need for me to resubmit.
Is it right?

> I haven't treated this as a fix because it was never there, but
> it may make sense to request a backport to stable after it is upstream.
>
Sorry, I didn’t quite understand what you meant.
Why did you say 'it was never there'? Do you mean that this issue doesn't exist?

Thanks,

Jason
Jonathan Cameron Sept. 9, 2024, 7:35 a.m. UTC | #5
On Mon, 9 Sep 2024 06:43:47 +0000
jason liu <jasonliu10041728@gmail.com> wrote:

> Hi Jonathan,
> 
> > Hi Jason,  
> 
> > I've picked this up, but the patch submission has a number of issues
> > you should be sure to fix in future patches.
> >  
> I am sorry for the issues, and I will keep your suggestions in mind.
> So, do I still need to submit a new patch to fix these issues?
No need,.
> My understanding is that since you've picked it up, there's no need for me to resubmit.
> Is it right?

Yes that's right.

> 
> > I haven't treated this as a fix because it was never there, but
> > it may make sense to request a backport to stable after it is upstream.
> >  
> Sorry, I didn’t quite understand what you meant.
> Why did you say 'it was never there'? Do you mean that this issue doesn't exist?

The autoprobing never worked, hence this is an improvement not a regression.
As such I've not rushed it in as a fix, but instead it can take a slower
path upstream.

Jonathan

> 
> Thanks,
> 
> Jason
> 
> ________________________________________
> From: Jonathan Cameron <jic23@kernel.org>
> Sent: Sunday, September 8, 2024 6:51 PM
> To: jason liu
> Cc: Jean-Baptiste Maneyrol; lars@metafoo.de; linux-iio@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: 回复: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
> 
> On Fri, 6 Sep 2024 05:02:59 +0000
> jason liu <jasonliu10041728@gmail.com> wrote:
> 
> > Hello,
> >
> > I'm glad this patch could help. And I would like to know, how will the patch to be handled moving forward?
> >  
> It is queued up on the IIO tree.  Given timing it's queued for 6.13.
> Note that for now that is only pushed out as testing because I will
> be rebasing the IIO togreg branch on 6.12-rc1.
> One that is done it will appear in linux-next.
> 
> It should go upstream and appear in char-misc/char-misc-next
> in about 6 weeks.  After that Greg KH will send a pull request during
> the 6.13 merge window in about 12 weeks time and it will then hopefully
> get merged into Linus' tree before 6.13-rc1
> 
> I haven't treated this as a fix because it was never there, but
> it may make sense to request a backport to stable after it is upstream.
> 
> Thanks,
> 
> Jonathan
> 
> > Thanks.
> >
> > ________________________________
> > From: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
> > Sent: Thursday, September 5, 2024 5:25 PM
> > To: jason liu <jasonliu10041728@gmail.com>
> > Cc: jic23@kernel.org <jic23@kernel.org>; lars@metafoo.de <lars@metafoo.de>; linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
> > Subject: Re: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
> >
> > Hello,
> >
> > looks good for me now, thanks for the patch.
> >
> > Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
> >
> > Thanks,
> > JB
> >
> > ________________________________________
> > From: jason liu <jasonliu10041728@gmail.com>
> > Sent: Wednesday, September 4, 2024 11:00
> > To: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
> > Cc: jic23@kernel.org <jic23@kernel.org>; lars@metafoo.de <lars@metafoo.de>; linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
> > Subject: Re: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
> >
> > This Message Is From an Untrusted Sender
> > You have not previously corresponded with this sender.
> >
> > Hello, does patch v3 meet the requirements?
> >
> > BR.
> >
> > Jason Liu <jasonliu10041728@gmail.com> 于2024年9月2日周一 19:31写道:
> > Add the id_table of inv_icm42600, so the device can probe correctly.
> >
> > Signed-off-by: Jason Liu <jasonliu10041728@gmail.com>
> > ---
> > V1->V2: fix up the formatting as requested
> > ---
> > V2->V3: add icm42686 (INV_ICM_42686) and icm42688 (INV_ICM_42688)
> > ---
> >  drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 17 +++++++++++++++++
> >  drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 17 +++++++++++++++++
> >  2 files changed, 34 insertions(+)
> >
> > diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> > index ebb31b385881..9e65fef04c39 100644
> > --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> > +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
> > @@ -71,6 +71,22 @@ static int inv_icm42600_probe(struct i2c_client *client)
> >                                        inv_icm42600_i2c_bus_setup);
> >  }
> >
> > +/*
> > + * device id table is used to identify what device can be
> > + * supported by this driver
> > + */
> > +static const struct i2c_device_id inv_icm42600_id[] = {
> > +       { "icm42600", INV_CHIP_ICM42600 },
> > +       { "icm42602", INV_CHIP_ICM42602 },
> > +       { "icm42605", INV_CHIP_ICM42605 },
> > +       { "icm42686", INV_CHIP_ICM42686 },
> > +       { "icm42622", INV_CHIP_ICM42622 },
> > +       { "icm42688", INV_CHIP_ICM42688 },
> > +       { "icm42631", INV_CHIP_ICM42631 },
> > +       {}
> > +};
> > +MODULE_DEVICE_TABLE(i2c, inv_icm42600_id);
> > +
> >  static const struct of_device_id inv_icm42600_of_matches[] = {
> >         {
> >                 .compatible = "invensense,icm42600",
> > @@ -104,6 +120,7 @@ static struct i2c_driver inv_icm42600_driver = {
> >                 .of_match_table = inv_icm42600_of_matches,
> >                 .pm = pm_ptr(&inv_icm42600_pm_ops),
> >         },
> > +       .id_table = inv_icm42600_id,
> >         .probe = inv_icm42600_probe,
> >  };
> >  module_i2c_driver(inv_icm42600_driver);
> > diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> > index eae5ff7a3cc1..75441b2be174 100644
> > --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> > +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
> > @@ -67,6 +67,22 @@ static int inv_icm42600_probe(struct spi_device *spi)
> >                                        inv_icm42600_spi_bus_setup);
> >  }
> >
> > +/*
> > + * device id table is used to identify what device can be
> > + * supported by this driver
> > + */
> > +static const struct spi_device_id inv_icm42600_id[] = {
> > +       { "icm42600", INV_CHIP_ICM42600 },
> > +       { "icm42602", INV_CHIP_ICM42602 },
> > +       { "icm42605", INV_CHIP_ICM42605 },
> > +       { "icm42686", INV_CHIP_ICM42686 },
> > +       { "icm42622", INV_CHIP_ICM42622 },
> > +       { "icm42688", INV_CHIP_ICM42688 },
> > +       { "icm42631", INV_CHIP_ICM42631 },
> > +       {}
> > +};
> > +MODULE_DEVICE_TABLE(spi, inv_icm42600_id);
> > +
> >  static const struct of_device_id inv_icm42600_of_matches[] = {
> >         {
> >                 .compatible = "invensense,icm42600",
> > @@ -100,6 +116,7 @@ static struct spi_driver inv_icm42600_driver = {
> >                 .of_match_table = inv_icm42600_of_matches,
> >                 .pm = pm_ptr(&inv_icm42600_pm_ops),
> >         },
> > +       .id_table = inv_icm42600_id,
> >         .probe = inv_icm42600_probe,
> >  };
> >  module_spi_driver(inv_icm42600_driver);
> > --
> > 2.25.1  
>
jason liu Sept. 9, 2024, 7:39 a.m. UTC | #6
> The autoprobing never worked, hence this is an improvement not a regression.
> As such I've not rushed it in as a fix, but instead it can take a slower
> path upstream.
Alright, I understand. Thank you for your explanation.

I will definitely do better the next time I submit a patch. Thank you for your correction.

Thanks,
Jason
diff mbox series

Patch

diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
index ebb31b385881..9e65fef04c39 100644
--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
+++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
@@ -71,6 +71,22 @@  static int inv_icm42600_probe(struct i2c_client *client)
 				       inv_icm42600_i2c_bus_setup);
 }
 
+/*
+ * device id table is used to identify what device can be
+ * supported by this driver
+ */
+static const struct i2c_device_id inv_icm42600_id[] = {
+	{ "icm42600", INV_CHIP_ICM42600 },
+	{ "icm42602", INV_CHIP_ICM42602 },
+	{ "icm42605", INV_CHIP_ICM42605 },
+	{ "icm42686", INV_CHIP_ICM42686 },
+	{ "icm42622", INV_CHIP_ICM42622 },
+	{ "icm42688", INV_CHIP_ICM42688 },
+	{ "icm42631", INV_CHIP_ICM42631 },
+	{}
+};
+MODULE_DEVICE_TABLE(i2c, inv_icm42600_id);
+
 static const struct of_device_id inv_icm42600_of_matches[] = {
 	{
 		.compatible = "invensense,icm42600",
@@ -104,6 +120,7 @@  static struct i2c_driver inv_icm42600_driver = {
 		.of_match_table = inv_icm42600_of_matches,
 		.pm = pm_ptr(&inv_icm42600_pm_ops),
 	},
+	.id_table = inv_icm42600_id,
 	.probe = inv_icm42600_probe,
 };
 module_i2c_driver(inv_icm42600_driver);
diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
index eae5ff7a3cc1..75441b2be174 100644
--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
+++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c
@@ -67,6 +67,22 @@  static int inv_icm42600_probe(struct spi_device *spi)
 				       inv_icm42600_spi_bus_setup);
 }
 
+/*
+ * device id table is used to identify what device can be
+ * supported by this driver
+ */
+static const struct spi_device_id inv_icm42600_id[] = {
+	{ "icm42600", INV_CHIP_ICM42600 },
+	{ "icm42602", INV_CHIP_ICM42602 },
+	{ "icm42605", INV_CHIP_ICM42605 },
+	{ "icm42686", INV_CHIP_ICM42686 },
+	{ "icm42622", INV_CHIP_ICM42622 },
+	{ "icm42688", INV_CHIP_ICM42688 },
+	{ "icm42631", INV_CHIP_ICM42631 },
+	{}
+};
+MODULE_DEVICE_TABLE(spi, inv_icm42600_id);
+
 static const struct of_device_id inv_icm42600_of_matches[] = {
 	{
 		.compatible = "invensense,icm42600",
@@ -100,6 +116,7 @@  static struct spi_driver inv_icm42600_driver = {
 		.of_match_table = inv_icm42600_of_matches,
 		.pm = pm_ptr(&inv_icm42600_pm_ops),
 	},
+	.id_table = inv_icm42600_id,
 	.probe = inv_icm42600_probe,
 };
 module_spi_driver(inv_icm42600_driver);