[PATCH 3/3] input: mpu3050: Ensure we enable interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>

This also changes the devname parameter delivered to
request_threaded_irq() from "mpu_int" to "mpu3050".

Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
---

 drivers/input/misc/mpu3050.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)


diff --git a/drivers/input/misc/mpu3050.c b/drivers/input/misc/mpu3050.c
index 89c7160..cf42c78 100644
--- a/drivers/input/misc/mpu3050.c
+++ b/drivers/input/misc/mpu3050.c
@@ -437,12 +437,20 @@ static int __devinit mpu3050_probe(struct i2c_client *client,
 		error = request_threaded_irq(client->irq,
 				NULL, mpu3050_interrupt_thread,
 				IRQF_TRIGGER_RISING,
-				"mpu_int", sensor);
+				"mpu3050", sensor);
 		if (error) {
 			dev_err(&client->dev, "can't get IRQ %d, error %d\n",
 					client->irq, error);
 			goto err_pm_set_suspended;
 		}
+
+		/* Enable interrupts */
+		i2c_smbus_write_byte_data(sensor->client, MPU3050_INT_CFG,
+					MPU3050_LATCH_INT_EN
+					| MPU3050_RAW_RDY_EN
+					| MPU3050_MPU_RDY_EN);
+		if (ret < 0)
+			goto err_free_irq;
 	} else {
 		error = mpu3050_create_polled_idev(sensor);
 		if (error) {

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux