public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] iio: imu: inv_icm45600: fix INT1 drive bit inverted
@ 2026-02-05 16:30 Jean-Baptiste Maneyrol via B4 Relay
  2026-02-05 16:42 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Baptiste Maneyrol via B4 Relay @ 2026-02-05 16:30 UTC (permalink / raw)
  To: Remi Buisson, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko
  Cc: Jonathan Cameron, linux-iio, linux-kernel, Jean-Baptiste Maneyrol,
	stable

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

Drive bit must be set for open-drain mode and be cleared for push-pull
mode.

Referring to datasheet DS-000576_ICM-45605.pdf section 17.23.

Fixes: 06674a72cf7a ("iio: imu: inv_icm45600: add buffer support in iio devices")
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Cc: stable@vger.kernel.org
---
Changes in v2:
- Add datasheet precision where to find the bits
- Link to v1: https://lore.kernel.org/r/20260205-inv-icm45600-fix-int1-drive-bit-v1-1-72a78cd07150@tdk.com
---
 drivers/iio/imu/inv_icm45600/inv_icm45600.h      | 2 +-
 drivers/iio/imu/inv_icm45600/inv_icm45600_core.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600.h b/drivers/iio/imu/inv_icm45600/inv_icm45600.h
index c5b5446f6c3b43150512bcc4357cee385080b634..1c796d4b2a4038203f734f80d7bf7bad138c3497 100644
--- a/drivers/iio/imu/inv_icm45600/inv_icm45600.h
+++ b/drivers/iio/imu/inv_icm45600/inv_icm45600.h
@@ -205,7 +205,7 @@ struct inv_icm45600_sensor_state {
 #define INV_ICM45600_SPI_SLEW_RATE_38NS			0
 
 #define INV_ICM45600_REG_INT1_CONFIG2			0x0018
-#define INV_ICM45600_INT1_CONFIG2_PUSH_PULL		BIT(2)
+#define INV_ICM45600_INT1_CONFIG2_OPEN_DRAIN		BIT(2)
 #define INV_ICM45600_INT1_CONFIG2_LATCHED		BIT(1)
 #define INV_ICM45600_INT1_CONFIG2_ACTIVE_HIGH		BIT(0)
 #define INV_ICM45600_INT1_CONFIG2_ACTIVE_LOW		0x00
diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
index ab1cb7b9dba435a3280e50ab77cd16e903c7816c..b028044d609a41f6d4b747383323130ded0d2e79 100644
--- a/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
+++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
@@ -637,8 +637,8 @@ static int inv_icm45600_irq_init(struct inv_icm45600_state *st, int irq,
 		break;
 	}
 
-	if (!open_drain)
-		val |= INV_ICM45600_INT1_CONFIG2_PUSH_PULL;
+	if (open_drain)
+		val |= INV_ICM45600_INT1_CONFIG2_OPEN_DRAIN;
 
 	ret = regmap_write(st->map, INV_ICM45600_REG_INT1_CONFIG2, val);
 	if (ret)

---
base-commit: d820183f371d9aa8517a1cd21fe6edacf0f94b7f
change-id: 20260205-inv-icm45600-fix-int1-drive-bit-7d12ea3e2cd2

Best regards,
-- 
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] iio: imu: inv_icm45600: fix INT1 drive bit inverted
  2026-02-05 16:30 [PATCH v2] iio: imu: inv_icm45600: fix INT1 drive bit inverted Jean-Baptiste Maneyrol via B4 Relay
@ 2026-02-05 16:42 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2026-02-05 16:42 UTC (permalink / raw)
  To: jean-baptiste.maneyrol
  Cc: Remi Buisson, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Jonathan Cameron, linux-iio, linux-kernel,
	stable

On Thu, Feb 05, 2026 at 05:30:42PM +0100, Jean-Baptiste Maneyrol via B4 Relay wrote:

> Drive bit must be set for open-drain mode and be cleared for push-pull
> mode.
> 
> Referring to datasheet DS-000576_ICM-45605.pdf section 17.23.

And where is my tag?

Please, carry tags as needed. But since you will need a v3 due to that, also
add a name of the section, so it will be better to find in different versions
of the datasheets (in case the numbering is shifted).

  Refer to datasheet DS-000576_ICM-45605.pdf section 17.23 "...bla bla bla...".

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-05 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-05 16:30 [PATCH v2] iio: imu: inv_icm45600: fix INT1 drive bit inverted Jean-Baptiste Maneyrol via B4 Relay
2026-02-05 16:42 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox