FAILED: patch "[PATCH] iio: imu: inv_icm42600: fix spi burst write not supported" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-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-5.15.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 '2025011348-amaretto-wasabi-3e96@gregkh' --subject-prefix 'PATCH 5.15.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 | 12 ++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-)
drivers/iio/imu/inv_icm42600/inv_icm42600.h +1 -0
@@ -360,6 +360,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 +12 -0
@@ -43,6 +43,18 @@ const struct regmap_config inv_icm42600_regmap_config = { };EXPORT_SYMBOL_GPL (inv_icm42600_regmap_config); +/* 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), + .use_single_write = true, +}; +EXPORT_SYMBOL_GPL (inv_icm42600_spi_regmap_config); +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 = (enum inv_icm42600_chip )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 5.15.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
6.1.y | Not found
5.15.y | Not found
Note: The patch differs from the upstream commit:
---
1: c0f866de4ce4 ! 1: 5f7ac79ffe7e 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_GPL(inv_icm42600_regmap_config);
+/* define specific regmap for SPI not supporting burst write */
+const struct regmap_config inv_icm42600_spi_regmap_config = {
@@ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c: const struct regmap_config inv
+ .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_GPL(inv_icm42600_spi_regmap_config);
+
struct inv_icm42600_hw {
uint8_t whoami;
@@ drivers/iio/imu/inv_icm42600/inv_icm42600_core.c: const struct regmap_config inv
## drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c ##
@@ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c: static int inv_icm42600_probe(struct spi_device *spi)
return -EINVAL;
- chip = (uintptr_t)match;
+ chip = (enum inv_icm42600_chip)match;
- regmap = devm_regmap_init_spi(spi, &inv_icm42600_regmap_config);
+ /* use SPI specific regmap */---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.15.y | Success | Success |
Greg KH
maintainerRe: [PATCH 5.15.y] iio: imu: inv_icm42600: fix spi burst write not supported
In reply to [email protected]Quoted 36 lines · On Mon, Jan 13, 2025 at 01:19:18PM +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)--- drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 + drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 12 ++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-)drivers/iio/imu/inv_icm42600/inv_icm42600.h +1
-0@@ -360,6 +360,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 +0
-0
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c const struct regmap_config inv_icm42600_regmap_config = { · line 48
Quoted 6 lines
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +3
-0@@ -43,6 +43,18 @@ const struct regmap_config inv_icm42600_regmap_config = { };EXPORT_SYMBOL_GPL (inv_icm42600_regmap_config); +/* define specific regmap for SPI not supporting burst write */ +const struct regmap_config inv_icm42600_spi_regmap_config = { + .name ="inv_icm42600" ,
Why does just this one have the .name field set?
I've taken the backports you did for the other branches here, if you really need .name set please let me know.
thanks,
greg k-h
Jean-Baptiste Maneyrol
maintainerRe: [PATCH 5.15.y] iio: imu: inv_icm42600: fix spi burst write not supported
Hello Greg,
this is an error of course, thanks a lot for having fixed it.
Thanks,
JB
________________________________________
From: Greg KH <[email protected]>
Sent: Monday, January 20, 2025 16:12
To: INV Git Commit <[email protected]>
Cc: [email protected] <[email protected]>; Jean-Baptiste Maneyrol <[email protected]>; Jonathan Cameron <[email protected]> Subject: Re: [PATCH 5.15.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 36 lines · On Mon, Jan 13, 2025 at 01:19:18PM +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)--- drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 + drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 12 ++++++++++++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-)drivers/iio/imu/inv_icm42600/inv_icm42600.h +1
-0@@ -360,6 +360,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 +0
-0
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c const struct regmap_config inv_icm42600_regmap_config = { · line 48
Quoted 6 lines
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +3
-0@@ -43,6 +43,18 @@ const struct regmap_config inv_icm42600_regmap_config = { };EXPORT_SYMBOL_GPL (inv_icm42600_regmap_config); +/* define specific regmap for SPI not supporting burst write */ +const struct regmap_config inv_icm42600_spi_regmap_config = { + .name ="inv_icm42600" ,
Why does just this one have the .name field set?
I've taken the backports you did for the other branches here, if you really need .name set please let me know.
thanks,
greg k-h