FAILED: patch "[PATCH] iio: imu: inv_icm42600: fix spi burst write not supported" failed to apply to 6.6-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x c0f866de4ce447bca3191b9cefac60c4b36a7922
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025011346-empty-yoyo-e301@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c0f866de4ce447bca3191b9cefac60c4b36a7922 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Maneyrol <[email protected]>
Date: Tue, 12 Nov 2024 10:30:10 +0100
Subject: [PATCH] iio: imu: inv_icm42600: fix spi burst write not supported
Burst write with SPI is not working for all icm42600 chips. It was only used for setting user offsets with regmap_bulk_write.
Add specific SPI regmap config for using only single write with SPI.
drivers/iio/imu/inv_icm42600/inv_icm42600.h +1 -0
@@ -403,6 +403,7 @@ struct inv_icm42600_sensor_state {typedef int (*inv_icm42600_bus_setup )(struct inv_icm42600_state *);extern const struct regmap_config inv_icm42600_regmap_config; +extern const struct regmap_config inv_icm42600_spi_regmap_config;extern const struct dev_pm_ops inv_icm42600_pm_ops; const struct iio_mount_matrix *
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +15 -0
@@ -87,6 +87,21 @@ const struct regmap_config inv_icm42600_regmap_config = { };EXPORT_SYMBOL_NS_GPL (inv_icm42600_regmap_config,"IIO_ICM42600" ); +/* define specific regmap for SPI not supporting burst write */ +const struct regmap_config inv_icm42600_spi_regmap_config = { + .name ="inv_icm42600" , + .reg_bits =8 , + .val_bits =8 , + .max_register =0x4FFF , + .ranges = inv_icm42600_regmap_ranges, + .num_ranges =ARRAY_SIZE (inv_icm42600_regmap_ranges), + .volatile_table = inv_icm42600_regmap_volatile_accesses, + .rd_noinc_table = inv_icm42600_regmap_rd_noinc_accesses, + .cache_type =REGCACHE_RBTREE , + .use_single_write = true, +}; +EXPORT_SYMBOL_NS_GPL (inv_icm42600_spi_regmap_config,"IIO_ICM42600" ); +struct inv_icm42600_hw {uint8_t whoami;const char *name;
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +2 -1
@@ -59,7 +59,8 @@ static int inv_icm42600_probe(struct spi_device *spi)return -EINVAL ; chip = (uintptr_t )match; - regmap =devm_regmap_init_spi (spi, &inv_icm42600_regmap_config); +/* use SPI specific regmap */ + regmap =devm_regmap_init_spi (spi, &inv_icm42600_spi_regmap_config);if (IS_ERR (regmap))return PTR_ERR (regmap);
PATCH 1/1 iio: imu: inv_icm42600: fix spi burst write not supported
From: Jean-Baptiste Maneyrol <[email protected]>
Burst write with SPI is not working for all icm42600 chips. It was only used for setting user offsets with regmap_bulk_write.
Add specific SPI regmap config for using only single write with SPI.
--- drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 + drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 ++- 3 files changed, 18 insertions(+), 1 deletion(-)
drivers/iio/imu/inv_icm42600/inv_icm42600.h +1 -0
@@ -362,6 +362,7 @@ struct inv_icm42600_state {typedef int (*inv_icm42600_bus_setup )(struct inv_icm42600_state *);extern const struct regmap_config inv_icm42600_regmap_config; +extern const struct regmap_config inv_icm42600_spi_regmap_config;extern const struct dev_pm_ops inv_icm42600_pm_ops; const struct iio_mount_matrix *
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +15 -0
@@ -43,6 +43,21 @@ const struct regmap_config inv_icm42600_regmap_config = { };EXPORT_SYMBOL_NS_GPL (inv_icm42600_regmap_config,IIO_ICM42600 ); +/* define specific regmap for SPI not supporting burst write */ +const struct regmap_config inv_icm42600_spi_regmap_config = { + .name ="inv_icm42600" , + .reg_bits =8 , + .val_bits =8 , + .max_register =0x4FFF , + .ranges = inv_icm42600_regmap_ranges, + .num_ranges =ARRAY_SIZE (inv_icm42600_regmap_ranges), + .volatile_table = inv_icm42600_regmap_volatile_accesses, + .rd_noinc_table = inv_icm42600_regmap_rd_noinc_accesses, + .cache_type =REGCACHE_RBTREE , + .use_single_write = true, +}; +EXPORT_SYMBOL_NS_GPL (inv_icm42600_spi_regmap_config,"IIO_ICM42600" ); +struct inv_icm42600_hw {uint8_t whoami;const char *name;
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +2 -1
@@ -59,7 +59,8 @@ static int inv_icm42600_probe(struct spi_device *spi)return -EINVAL ; chip = (uintptr_t )match; - regmap =devm_regmap_init_spi (spi, &inv_icm42600_regmap_config); +/* use SPI specific regmap */ + regmap =devm_regmap_init_spi (spi, &inv_icm42600_spi_regmap_config);if (IS_ERR (regmap))return PTR_ERR (regmap);
Signature · 1 line
2.25.1
Sasha Levin
maintainerRe: [PATCH 6.6.y] iio: imu: inv_icm42600: fix spi burst write not supported
[ Sasha's backport helper bot ]
Hi,
Found matching upstream commit: c0f866de4ce447bca3191b9cefac60c4b36a7922
WARNING: Author mismatch between patch and found commit:
Backport author: [email protected]
Commit author: Jean-Baptiste Maneyrol<[email protected]>
Status in newer kernel trees:
6.12.y | Not found
6.6.y | Not found
Note: The patch differs from the upstream commit:
---
1: c0f866de4ce4 ! 1: ab66552ae37a iio: imu: inv_icm42600: fix spi burst write not supported
@@ Commit message
Signed-off-by: Jean-Baptiste Maneyrol <[email protected]>
Link: https://patch.msgid.link/20241112-inv-icm42600-fix-spi-burst-write-not-supported-v2-1-97690dc03607@tdk.com
Signed-off-by: Jonathan Cameron <[email protected]>
+ (cherry picked from commit c0f866de4ce447bca3191b9cefac60c4b36a7922)
## drivers/iio/imu/inv_icm42600/inv_icm42600.h ##
-@@ drivers/iio/imu/inv_icm42600/inv_icm42600.h: struct inv_icm42600_sensor_state {
+@@ drivers/iio/imu/inv_icm42600/inv_icm42600.h: struct inv_icm42600_state {
typedef int (*inv_icm42600_bus_setup)(struct inv_icm42600_state *);
extern const struct regmap_config inv_icm42600_regmap_config;
@@ drivers/iio/imu/inv_icm42600/inv_icm42600.h: struct inv_icm42600_sensor_state {
## drivers/iio/imu/inv_icm42600/inv_icm42600_core.c ##
@@ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c: const struct regmap_config inv_icm42600_regmap_config = {
};
- EXPORT_SYMBOL_NS_GPL(inv_icm42600_regmap_config, "IIO_ICM42600");
+ EXPORT_SYMBOL_NS_GPL(inv_icm42600_regmap_config, IIO_ICM42600);
+/* define specific regmap for SPI not supporting burst write */
+const struct regmap_config inv_icm42600_spi_regmap_config = {---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.6.y | Success | Failed |
Build Errors:
Build error for stable/linux-6.6.y:
lib/test_dhry.o: warning: objtool: dhry() falls through to next function dhry_run_set.cold()
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c:54:27: error: 'inv_icm42600_regmap_volatile_accesses' undeclared here (not in a function)
54 | .volatile_table = inv_icm42600_regmap_volatile_accesses,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c:55:27: error: 'inv_icm42600_regmap_rd_noinc_accesses' undeclared here (not in a function); did you mean 'inv_icm42600_regmap_ranges'?
55 | .rd_noinc_table = inv_icm42600_regmap_rd_noinc_accesses,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| inv_icm42600_regmap_ranges
make[6]: *** [scripts/Makefile.build:243: drivers/iio/imu/inv_icm42600/inv_icm42600_core.o] Error 1
make[6]: Target 'drivers/iio/imu/inv_icm42600/' not remade because of errors.
make[5]: *** [scripts/Makefile.build:480: drivers/iio/imu/inv_icm42600] Error 2
make[5]: Target 'drivers/iio/imu/' not remade because of errors.
make[4]: *** [scripts/Makefile.build:480: drivers/iio/imu] Error 2
make[4]: Target 'drivers/iio/' not remade because of errors.
make[3]: *** [scripts/Makefile.build:480: drivers/iio] Error 2
make[3]: Target 'drivers/' not remade because of errors.
make[2]: *** [scripts/Makefile.build:480: drivers] Error 2
make[2]: Target './' not remade because of errors.
make[1]: *** [/home/sasha/build/linus-next/Makefile:1921: .] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:234: __sub-make] Error 2
make: Target '__all' not remade because of errors.Greg KH
maintainerRe: [PATCH 6.6.y] iio: imu: inv_icm42600: fix spi burst write not supported
In reply to [email protected]Quoted 13 lines · On Mon, Jan 13, 2025 at 12:46:38PM +0000, [email protected] wrote:
From: Jean-Baptiste Maneyrol <[email protected]>
Burst write with SPI is not working for all icm42600 chips. It was only used for setting user offsets with
regmap_bulk_write.Add specific SPI regmap config for using only single write with SPI.
Fixes 9f9ff91b775b ("iio: imu: inv_icm42600: add SPI driver for inv_icm42600 driver")Signed-off-by Jean-Baptiste Maneyrol <[email protected]>Link https://patch.msgid.link/20241112-inv-icm42600-fix-spi-burst-write-not-supported-v2-1-97690dc03607@tdk.com open hereSigned-off-by Jonathan Cameron <[email protected]>(cherry picked from commit c0f866de4ce447bca3191b9cefac60c4b36a7922)
Quoted 5 lines
--- drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 + drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 ++- 3 files changed, 18 insertions(+), 1 deletion(-)
Did you test build this?
Jean-Baptiste Maneyrol
maintainerRe: [PATCH 6.6.y] iio: imu: inv_icm42600: fix spi burst write not supported
Hello Greg,
beware that I messed up for the 1st versions of this backport, and then I sent v2 patches that are working correctly. You need to be careful to use only the v2 patch if there is one.
I'm really sorry about that.
Thanks,
JB
________________________________________
From: Greg KH <[email protected]>
Sent: Wednesday, January 15, 2025 11:32
To: INV Git Commit <[email protected]>
Cc: [email protected] <[email protected]>; Jean-Baptiste Maneyrol <[email protected]>; Jonathan Cameron <[email protected]> Subject: Re: [PATCH 6.6.y] iio: imu: inv_icm42600: fix spi burst write not supported
This Message Is From an External Sender
This message came from outside your organization.
Quoted 13 lines · On Mon, Jan 13, 2025 at 12:46:38PM +0000, [email protected] wrote:
From: Jean-Baptiste Maneyrol <[email protected]>
Burst write with SPI is not working for all icm42600 chips. It was only used for setting user offsets with
regmap_bulk_write.Add specific SPI regmap config for using only single write with SPI.
Fixes 9f9ff91b775b ("iio: imu: inv_icm42600: add SPI driver for inv_icm42600 driver")Signed-off-by Jean-Baptiste Maneyrol <[email protected]>Signed-off-by Jonathan Cameron <[email protected]>(cherry picked from commit c0f866de4ce447bca3191b9cefac60c4b36a7922)
Quoted 5 lines
--- drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 + drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 15 +++++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 ++- 3 files changed, 18 insertions(+), 1 deletion(-)
Did you test build this?
Greg KH
maintainerRe: [PATCH 6.6.y] iio: imu: inv_icm42600: fix spi burst write not supported
Quoted 4 lines · Jean-Baptiste Maneyrol
Hello Greg,
beware that I messed up for the 1st versions of this backport, and then I sent v2 patches that are working correctly. You need to be careful to use only the v2 patch if there is one.
I don't see a v2 for this one :(
Jean-Baptiste Maneyrol
maintainerRe: [PATCH 6.6.y] iio: imu: inv_icm42600: fix spi burst write not supported
Hello,
strange, I've sent it.
Here is a link to the mail in the mailing list archives:
https://lore.kernel.org/stable/[email protected]/T/#u
Thanks,
JB
________________________________________
From: Greg KH <[email protected]>
Sent: Wednesday, January 15, 2025 11:59
To: Jean-Baptiste Maneyrol <[email protected]>
Cc: INV Git Commit <[email protected]>; [email protected] <[email protected]>; Jonathan Cameron <[email protected]> Subject: Re: [PATCH 6.6.y] iio: imu: inv_icm42600: fix spi burst write not supported
This Message Is From an External Sender
This message came from outside your organization.
Quoted 4 lines · Jean-Baptiste Maneyrol
Hello Greg,
beware that I messed up for the 1st versions of this backport, and then I sent v2 patches that are working correctly. You need to be careful to use only the v2 patch if there is one.
I don't see a v2 for this one :(
Greg KH
maintainerRe: [PATCH 6.6.y] iio: imu: inv_icm42600: fix spi burst write not supported
Quoted 6 lines · Jean-Baptiste Maneyrol
Hello,
strange, I've sent it.
Here is a link to the mail in the mailing list archives:
https://lore.kernel.org/stable/[email protected]/T/#u
Ah, my fault, too many different threads for this subject. What a mess...
PATCH v2 1/1 iio: imu: inv_icm42600: fix spi burst write not supported
In reply to [email protected]From: Jean-Baptiste Maneyrol <[email protected]>
Burst write with SPI is not working for all icm42600 chips. It was only used for setting user offsets with regmap_bulk_write.
Add specific SPI regmap config for using only single write with SPI.
--- drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 + drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 11 +++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-)
drivers/iio/imu/inv_icm42600/inv_icm42600.h +1 -0
@@ -362,6 +362,7 @@ struct inv_icm42600_state {typedef int (*inv_icm42600_bus_setup )(struct inv_icm42600_state *);extern const struct regmap_config inv_icm42600_regmap_config; +extern const struct regmap_config inv_icm42600_spi_regmap_config;extern const struct dev_pm_ops inv_icm42600_pm_ops; const struct iio_mount_matrix *
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +11 -0
@@ -43,6 +43,17 @@ const struct regmap_config inv_icm42600_regmap_config = { };EXPORT_SYMBOL_NS_GPL (inv_icm42600_regmap_config,IIO_ICM42600 ); +/* define specific regmap for SPI not supporting burst write */ +const struct regmap_config inv_icm42600_spi_regmap_config = { + .reg_bits =8 , + .val_bits =8 , + .max_register =0x4FFF , + .ranges = inv_icm42600_regmap_ranges, + .num_ranges =ARRAY_SIZE (inv_icm42600_regmap_ranges), + .use_single_write = true, +}; +EXPORT_SYMBOL_NS_GPL (inv_icm42600_spi_regmap_config,IIO_ICM42600 ); +struct inv_icm42600_hw {uint8_t whoami;const char *name;
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +2 -1
@@ -59,7 +59,8 @@ static int inv_icm42600_probe(struct spi_device *spi)return -EINVAL ; chip = (uintptr_t )match; - regmap =devm_regmap_init_spi (spi, &inv_icm42600_regmap_config); +/* use SPI specific regmap */ + regmap =devm_regmap_init_spi (spi, &inv_icm42600_spi_regmap_config);if (IS_ERR (regmap))return PTR_ERR (regmap);
Signature · 1 line
2.25.1
Sasha Levin
maintainerRe: [PATCH 6.6.y v2] iio: imu: inv_icm42600: fix spi burst write not supported
[ Sasha's backport helper bot ]
Hi,
Found matching upstream commit: c0f866de4ce447bca3191b9cefac60c4b36a7922
WARNING: Author mismatch between patch and found commit:
Backport author: [email protected]
Commit author: Jean-Baptiste Maneyrol<[email protected]>
Status in newer kernel trees:
6.12.y | Not found
6.6.y | Not found
Note: The patch differs from the upstream commit:
---
1: c0f866de4ce4 ! 1: c7c357270b7a iio: imu: inv_icm42600: fix spi burst write not supported
@@ Commit message
Signed-off-by: Jean-Baptiste Maneyrol <[email protected]>
Link: https://patch.msgid.link/20241112-inv-icm42600-fix-spi-burst-write-not-supported-v2-1-97690dc03607@tdk.com
Signed-off-by: Jonathan Cameron <[email protected]>
+ (cherry picked from commit c0f866de4ce447bca3191b9cefac60c4b36a7922)
## drivers/iio/imu/inv_icm42600/inv_icm42600.h ##
-@@ drivers/iio/imu/inv_icm42600/inv_icm42600.h: struct inv_icm42600_sensor_state {
+@@ drivers/iio/imu/inv_icm42600/inv_icm42600.h: struct inv_icm42600_state {
typedef int (*inv_icm42600_bus_setup)(struct inv_icm42600_state *);
extern const struct regmap_config inv_icm42600_regmap_config;
@@ drivers/iio/imu/inv_icm42600/inv_icm42600.h: struct inv_icm42600_sensor_state {
## drivers/iio/imu/inv_icm42600/inv_icm42600_core.c ##
@@ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c: const struct regmap_config inv_icm42600_regmap_config = {
};
- EXPORT_SYMBOL_NS_GPL(inv_icm42600_regmap_config, "IIO_ICM42600");
+ EXPORT_SYMBOL_NS_GPL(inv_icm42600_regmap_config, IIO_ICM42600);
+/* define specific regmap for SPI not supporting burst write */
+const struct regmap_config inv_icm42600_spi_regmap_config = {
-+ .name = "inv_icm42600",
+ .reg_bits = 8,
+ .val_bits = 8,
+ .max_register = 0x4FFF,
+ .ranges = inv_icm42600_regmap_ranges,
+ .num_ranges = ARRAY_SIZE(inv_icm42600_regmap_ranges),
-+ .volatile_table = inv_icm42600_regmap_volatile_accesses,
-+ .rd_noinc_table = inv_icm42600_regmap_rd_noinc_accesses,
-+ .cache_type = REGCACHE_RBTREE,
+ .use_single_write = true,
+};
-+EXPORT_SYMBOL_NS_GPL(inv_icm42600_spi_regmap_config, "IIO_ICM42600");
++EXPORT_SYMBOL_NS_GPL(inv_icm42600_spi_regmap_config, IIO_ICM42600);
+
struct inv_icm42600_hw {
uint8_t whoami;---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.6.y | Success | Success |