public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH] iio: accel: bma180: Fix dataready interrupt to use INT2 pin
@ 2024-08-05 17:32 Abhishek Tamboli
  2024-08-06 16:32 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Abhishek Tamboli @ 2024-08-05 17:32 UTC (permalink / raw)
  To: jic23
  Cc: lars, andriy.shevchenko, biju.das.jz, nuno.sa, skhan, rbmarliere,
	linux-kernel-mentees, linux-iio, linux-kernel

Update the interrupt configuration to use the INT2 pin for
the dataready interrupt.

Address the FIXME: support using the INT2 pin.

Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
---
 drivers/iio/accel/bma180.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 6581772cb0c4..d44409afffbf 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -126,7 +126,7 @@ struct bma180_part_info {
 #define BMA250_SUSPEND_MASK	BIT(7) /* chip will sleep */
 #define BMA250_LOWPOWER_MASK	BIT(6)
 #define BMA250_DATA_INTEN_MASK	BIT(4)
-#define BMA250_INT1_DATA_MASK	BIT(0)
+#define BMA250_INT2_DATA_MASK	BIT(7)
 #define BMA250_INT_RESET_MASK	BIT(7) /* Reset pending interrupts */
 
 struct bma180_data {
@@ -425,10 +425,9 @@ static int bma250_chip_config(struct bma180_data *data)
 	if (ret)
 		goto err;
 	/*
-	 * This enables dataready interrupt on the INT1 pin
-	 * FIXME: support using the INT2 pin
+	 * This enables dataready interrupt on the INT2 pin
 	 */
-	ret = bma180_set_bits(data, BMA250_INT_MAP_REG, BMA250_INT1_DATA_MASK, 1);
+	ret = bma180_set_bits(data, BMA250_INT_MAP_REG, BMA250_INT2_DATA_MASK, 1);
 	if (ret)
 		goto err;
 
-- 
2.34.1


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

end of thread, other threads:[~2024-08-06 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 17:32 [PATCH] iio: accel: bma180: Fix dataready interrupt to use INT2 pin Abhishek Tamboli
2024-08-06 16:32 ` Jonathan Cameron
2024-08-06 17:46   ` Abhishek Tamboli

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