From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: [PATCH 3/3] input: mpu3050: Ensure we enable interrupts
Date: Thu, 15 Dec 2011 22:18:59 +0000 [thread overview]
Message-ID: <20111215221857.8657.57262.stgit@bob.linux.org.uk> (raw)
In-Reply-To: <20111215221732.8657.63987.stgit@bob.linux.org.uk>
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
This also changes the devname parameter delivered to
request_threaded_irq() from "mpu_int" to "mpu3050".
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
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) {
next prev parent reply other threads:[~2011-12-15 22:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 22:18 [PATCH 0/3] mpu3050 updates Alan Cox
2011-12-15 22:18 ` [PATCH 1/3] input: mpu3050: Support for polled input device Alan Cox
2011-12-16 10:52 ` Shubhrajyoti
2011-12-28 5:07 ` Dmitry Torokhov
2011-12-15 22:18 ` [PATCH 2/3] input: mpu3050: Configure the sampling method Alan Cox
2011-12-24 8:07 ` Dmitry Torokhov
2011-12-15 22:18 ` Alan Cox [this message]
2011-12-24 8:09 ` [PATCH 3/3] input: mpu3050: Ensure we enable interrupts Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111215221857.8657.57262.stgit@bob.linux.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.