iio/inv_icm42600: add inv_icm42600 id_table
Subsystems (2)
PATCH 1/1 iio/inv_icm42600: add inv_icm42600 id_table
Add the id_table of inv_icm42600, so the device can probe correctly.
--- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+)
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +15 -0
@@ -71,6 +71,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +118,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);
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +15 -0
@@ -67,6 +67,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +114,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);
Signature · 1 line
2.25.1
Jean-Baptiste Maneyrol
maintainerHello,
I was believing that id tables weren't required anymore when using of tables.
Jonathan,
can you help on this subject?
If we have to add id tables, then we need to add all supported chips (missing here icm42686 and icm42688).
Thanks,
JB
________________________________________
From: Jason Liu <[email protected]>
Sent: Sunday, August 25, 2024 08:39
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; Jason Liu <[email protected]> Subject: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.
Add the id_table of inv_icm42600, so the device can probe correctly.
--- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+)
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +15 -0
@@ -71,6 +71,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +118,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);
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +15 -0
@@ -67,6 +67,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +114,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);
Signature · 1 line
2.25.1
Jonathan Cameron
maintainerQuoted 8 lines · On Mon, 26 Aug 2024 08:22:11 +0000 Jean-Baptiste Maneyrol…
Hello,
I was believing that id tables weren't required anymore when using of tables.
Jonathan,
can you help on this subject?If we have to add id tables, then we need to add all supported chips (missing here icm42686 and icm42688).
There were some oddities around autoloading for some busses a while back but I can't find the reference.
+CC Mark + Wolfram for input.
Do we currently need i2c_device_id and spi_device_id tables for autoprobing on DT only platforms?
A few minor comments inline.
Quoted 27 lines
Thanks,
JB________________________________________
From: Jason Liu <[email protected]>
Sent: Sunday, August 25, 2024 08:39
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; Jason Liu <[email protected]> Subject: [PATCH] iio/inv_icm42600: addinv_icm42600id_table
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.
Add theid_tableofinv_icm42600, so the device can probe correctly.Signed-off-by Jason Liu <[email protected]>--- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+)drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +0
-0
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c static int inv_icm42600_probe(struct i2c_client *client) · line 79
Quoted 9 lines
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +6
-0@@ -71,6 +71,20 @@ 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 },
Spaces after { and before }
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c static int inv_icm42600_probe(struct i2c_client *client) · line 84
Quoted 5 lines
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +5
-0+ {"icm42602", INV_CHIP_ICM42602}, + {"icm42605", INV_CHIP_ICM42605}, + {"icm42622", INV_CHIP_ICM42622}, + {"icm42631", INV_CHIP_ICM42631}, + {}
{ }
I'm trying to standardize this in IIO.
Quoted 47 lines
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +4
-0+}; +MODULE_DEVICE_TABLE (i2c, inv_icm42600_id); +static const struct of_device_id inv_icm42600_of_matches[] = { { .compatible ="invensense,icm42600" ,@@ -104,6 +118,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);drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +15
-0@@ -67,6 +67,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +114,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);
A message that is not in the archive (sent off-list or not yet received): CAJci1vCztZAnmHrVn=4b9hnRmMCQE=6R7uQnznPQ0FSpFHQK5w@mail.gmail.com
Jonathan Cameron
maintainerQuoted 11 lines · On Sun, 1 Sep 2024 13:04:59 +0800 jason liu <[email protected]> wrote:
Hi, I would like to know your current opinion on this patch.
Let me explain the reason for proposing this patch.
First, through
__spi_register_driver, we know that when registering an SPI driver, if anid_tableis present, it matches theid_table; otherwise, it matches the SPI device'sdriver_name.
Then, ininv_icm_42600spi.c, driver name is "inv-icm42600-spi", but the compatible is compatible = "invensense,icm42600".so I think, it's necessary to add an
id_tablein theinv_icm42600driver.
The quest Jean-Baptiste was raising was whether it would match on the of_match_id table instead if it was present. __spi_register_driver does that so I think perhaps what you are actually referring to is the comment in there.
/*
* For Really Good Reasons we use spi: modaliases not of:
* modaliases for DT so module autoloading won't work if we
* don't have a spi_device_id as well as a compatible string. */
The actually matching is done in spi_match_device.
Anyhow, the comment suggests strongly that we do still need the spi_device_id table. I'm not 100% sure on the i2c equivalent, but I'm fine with adding both. Please fix up the formatting as requested below and send a v2.
Quoted 131 lines
Quoted 127 lines · Jonathan Cameron <[email protected]> 于2024年8月26日周一 18:27写道:
Quoted 3 lines · On Mon, 26 Aug 2024 08:22:11 +0000 Jean-Baptiste Maneyrol…
Hello,
I was believing that id tables weren't required anymore when using of
tables.
Quoted 5 lines
Jonathan,
can you help on this subject?If we have to add id tables, then we need to add all supported chips
(missing here icm42686 and icm42688).
There were some oddities around autoloading for some busses a while back but I can't find the reference.
+CC Mark + Wolfram for input.
Do we currently needi2c_device_idandspi_device_idtables for autoprobing on DT only platforms?A few minor comments inline.
Quoted 9 lines
Thanks,
JB________________________________________
From: Jason Liu <[email protected]>
Sent: Sunday, August 25, 2024 08:39
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; Jason Liu < [email protected]>
Quoted 7 lines
Subject: [PATCH] iio/inv_icm42600: add
inv_icm42600id_tableThis Message Is From an Untrusted Sender
You have not previously corresponded with this sender.Add the
id_tableofinv_icm42600, so the device can probe correctly.Review
Quoted 7 lines
Signed-off-by Jason Liu <[email protected]>--- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+)(quoted diff) +0
-0
b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.cdrivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c static int inv_icm42600_probe(struct i2c_client
Quoted 4 lines
index
ebb31b385881..8cc550b8cfc3100644drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +0
-0@@ -71,6 +71,20 @@ static int inv_icm42600_probe(struct i2c_client*client)
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c static int inv_icm42600_probe(struct i2c_client *client) · line 79
Quoted 9 lines
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +6
-0inv_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 },Spaces after { and before }
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c static int inv_icm42600_probe(struct i2c_client *client) · line 84
Quoted 5 lines
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +5
-0+ {"icm42602", INV_CHIP_ICM42602}, + {"icm42605", INV_CHIP_ICM42605}, + {"icm42622", INV_CHIP_ICM42622}, + {"icm42631", INV_CHIP_ICM42631}, + {}{ }
I'm trying to standardize this in IIO.
Review
Quoted 15 lines
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +4
-0+}; +MODULE_DEVICE_TABLE (i2c, inv_icm42600_id); +static const struct of_device_id inv_icm42600_of_matches[] = { { .compatible ="invensense,icm42600" ,@@ -104,6 +118,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);(quoted diff) +0
-0
b/drivers/iio/imu/inv_icm42600/inv_icm42600_spi.cQuoted 32 lines
index
eae5ff7a3cc1..5fe078ddc8a1100644drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +15
-0@@ -67,6 +67,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +114,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);
PATCH 1/1 iio/inv_icm42600: add inv_icm42600 id_table
Add the id_table of inv_icm42600, so the device can probe correctly.
---V1->V2: fix up the formatting as requested
--- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+)
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +15 -0
@@ -71,6 +71,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +118,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);
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +15 -0
@@ -67,6 +67,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +114,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);
Signature · 1 line
2.25.1
Jean-Baptiste Maneyrol
maintainerHello,
this patch is missing chips supported by this driver: icm42686 (INV_ICM_42686) and icm42688 (INV_ICM_42688).
Please add them and in the same order than of_device_id:
{
.compatible = "invensense,icm42600",
.data = (void *)INV_CHIP_ICM42600,
}, {
.compatible = "invensense,icm42602",
.data = (void *)INV_CHIP_ICM42602,
}, {
.compatible = "invensense,icm42605",
.data = (void *)INV_CHIP_ICM42605,
}, {
.compatible = "invensense,icm42686",
.data = (void *)INV_CHIP_ICM42686,
}, {
.compatible = "invensense,icm42622",
.data = (void *)INV_CHIP_ICM42622,
}, {
.compatible = "invensense,icm42688",
.data = (void *)INV_CHIP_ICM42688,
}, {
.compatible = "invensense,icm42631",
.data = (void *)INV_CHIP_ICM42631,
},Thanks.
Best regards,
JB
________________________________________
From: Jason Liu <[email protected]>
Sent: Monday, September 2, 2024 05:11
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; Jason Liu <[email protected]> Subject: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.
Add the id_table of inv_icm42600, so the device can probe correctly.
---V1->V2: fix up the formatting as requested
--- drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 15 +++++++++++++++ 2 files changed, 30 insertions(+)
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +15 -0
@@ -71,6 +71,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +118,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);
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +15 -0
@@ -67,6 +67,20 @@ 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 }, + {"icm42622" ,INV_CHIP_ICM42622 }, + {"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 +114,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);
Signature · 1 line
2.25.1
PATCH 1/1 iio/inv_icm42600: add inv_icm42600 id_table
Add the id_table of inv_icm42600, so the device can probe correctly.
---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(+)
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +17 -0
@@ -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);
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +17 -0
@@ -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);
Signature · 1 line
2.25.1
A message that is not in the archive (sent off-list or not yet received): CAJci1vC9pvdqEpA8sk+uB5jJGn_DKUruXFfY6tbG9mO07YxgHQ@mail.gmail.com
Hello,
looks good for me now, thanks for the patch.
Thanks,
JB
________________________________________
From: jason liu <[email protected]>
Sent: Wednesday, September 4, 2024 11:00
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]> 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 <[email protected]> 于2024年9月2日周一 19:31写道: Add the id_table of inv_icm42600, so the device can probe correctly.
---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(+)
drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +0 -0
@@ -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);
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +0 -0
@@ -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
Quoted 6 lines · On Thu, 5 Sep 2024 09:25:33 +0000 Jean-Baptiste Maneyrol…
Hello,
looks good for me now, thanks for the patch.
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
Quoted 102 lines
Thanks,
JB________________________________________
From: jason liu <[email protected]>
Sent: Wednesday, September 4, 2024 11:00
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]> Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_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 <[email protected]> 于2024年9月2日周一 19:31写道: Add the
id_tableofinv_icm42600, so the device can probe correctly.Signed-off-by Jason Liu <[email protected]>---
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(+)drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +17
-0@@ -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);drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +17
-1@@ -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
A message that is not in the archive (sent off-list or not yet received): SI6PR01MB63197238674C8895885420D8F59E2@SI6PR01MB6319.apcprd01.prod.exchangelabs.com
Jonathan Cameron
maintainerQuoted 4 lines · On Fri, 6 Sep 2024 05:02:59 +0000 jason liu <[email protected]> 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
Quoted 117 lines
Thanks.
________________________________
From: Jean-Baptiste Maneyrol <[email protected]>
Sent: Thursday, September 5, 2024 5:25 PM
To: jason liu <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableHello,
looks good for me now, thanks for the patch.
Thanks,
JB________________________________________
From: jason liu <[email protected]>
Sent: Wednesday, September 4, 2024 11:00
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableThis Message Is From an Untrusted Sender
You have not previously corresponded with this sender.Hello, does patch v3 meet the requirements?
BR.
Jason Liu <[email protected]> 于2024年9月2日周一 19:31写道: Add the
id_tableofinv_icm42600, so the device can probe correctly.Signed-off-by Jason Liu <[email protected]>---
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(+)drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +17
-0@@ -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);drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +17
-1@@ -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
Hi Jonathan,
Quoted 5 lines
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?
Quoted 3 lines
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
________________________________________
From: Jonathan Cameron <[email protected]>
Sent: Sunday, September 8, 2024 6:51 PM
To: jason liu
Cc: Jean-Baptiste Maneyrol; [email protected]; [email protected]; [email protected]
Subject: Re: 回复: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
Quoted 4 lines · On Fri, 6 Sep 2024 05:02:59 +0000 jason liu <[email protected]> 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
Quoted 117 lines
Thanks.
________________________________
From: Jean-Baptiste Maneyrol <[email protected]>
Sent: Thursday, September 5, 2024 5:25 PM
To: jason liu <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableHello,
looks good for me now, thanks for the patch.
Thanks,
JB________________________________________
From: jason liu <[email protected]>
Sent: Wednesday, September 4, 2024 11:00
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableThis Message Is From an Untrusted Sender
You have not previously corresponded with this sender.Hello, does patch v3 meet the requirements?
BR.
Jason Liu <[email protected]> 于2024年9月2日周一 19:31写道: Add the
id_tableofinv_icm42600, so the device can probe correctly.Signed-off-by Jason Liu <[email protected]>---
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(+)drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +17
-0@@ -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);drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +17
-1@@ -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
maintainerQuoted 9 lines · On Mon, 9 Sep 2024 06:43:47 +0000 jason liu <[email protected]> wrote:
Hi Jonathan,
Quoted 5 lines
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,.
Quoted 2 lines
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.
Quoted 6 lines
Quoted 4 lines
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
Quoted 154 lines
Thanks,
Jason
________________________________________
From: Jonathan Cameron <[email protected]>
Sent: Sunday, September 8, 2024 6:51 PM
To: jason liu
Cc: Jean-Baptiste Maneyrol; [email protected]; [email protected]; [email protected]
Subject: Re: 回复: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableQuoted 4 lines · On Fri, 6 Sep 2024 05:02:59 +0000 jason liu <[email protected]> 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
Quoted 117 lines
Thanks.
________________________________
From: Jean-Baptiste Maneyrol <[email protected]>
Sent: Thursday, September 5, 2024 5:25 PM
To: jason liu <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableHello,
looks good for me now, thanks for the patch.
Thanks,
JB________________________________________
From: jason liu <[email protected]>
Sent: Wednesday, September 4, 2024 11:00
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableThis Message Is From an Untrusted Sender
You have not previously corresponded with this sender.Hello, does patch v3 meet the requirements?
BR.
Jason Liu <[email protected]> 于2024年9月2日周一 19:31写道: Add the
id_tableofinv_icm42600, so the device can probe correctly.Signed-off-by Jason Liu <[email protected]>---
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(+)drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +17
-0@@ -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);drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +17
-1@@ -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
Quoted 3 lines
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
________________________________________
From: Jonathan Cameron <[email protected]>
Sent: Monday, September 9, 2024 3:35 PM
To: jason liu
Cc: Jean-Baptiste Maneyrol; [email protected]; [email protected]; [email protected]
Subject: Re: 回复: 回复: [PATCH] iio/inv_icm42600: add inv_icm42600 id_table
Quoted 9 lines · On Mon, 9 Sep 2024 06:43:47 +0000 jason liu <[email protected]> wrote:
Hi Jonathan,
Quoted 5 lines
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,.
Quoted 2 lines
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.
Quoted 6 lines
Quoted 4 lines
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
Quoted 154 lines
Thanks,
Jason
________________________________________
From: Jonathan Cameron <[email protected]>
Sent: Sunday, September 8, 2024 6:51 PM
To: jason liu
Cc: Jean-Baptiste Maneyrol; [email protected]; [email protected]; [email protected]
Subject: Re: 回复: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableQuoted 4 lines · On Fri, 6 Sep 2024 05:02:59 +0000 jason liu <[email protected]> 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
Quoted 117 lines
Thanks.
________________________________
From: Jean-Baptiste Maneyrol <[email protected]>
Sent: Thursday, September 5, 2024 5:25 PM
To: jason liu <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableHello,
looks good for me now, thanks for the patch.
Thanks,
JB________________________________________
From: jason liu <[email protected]>
Sent: Wednesday, September 4, 2024 11:00
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] iio/inv_icm42600: addinv_icm42600id_tableThis Message Is From an Untrusted Sender
You have not previously corresponded with this sender.Hello, does patch v3 meet the requirements?
BR.
Jason Liu <[email protected]> 于2024年9月2日周一 19:31写道: Add the
id_tableofinv_icm42600, so the device can probe correctly.Signed-off-by Jason Liu <[email protected]>---
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(+)drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c +17
-0@@ -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);drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +17
-1@@ -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