Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282406
b: refs/heads/master
c: 3b51872
h: refs/heads/master
v: v3
  • Loading branch information
Heikki Krogerus authored and Dmitry Torokhov committed Dec 24, 2011
1 parent 6d71fec commit b81bb1e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e948981aa0c97b6fcaa8626eeddb0340e175e9d7
refs/heads/master: 3b5187248bd07e400af081ad777e9aa1e5519ad7
13 changes: 12 additions & 1 deletion trunk/drivers/input/misc/mpu3050.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,20 @@ static void mpu3050_set_power_mode(struct i2c_client *client, u8 val)
static int mpu3050_input_open(struct input_dev *input)
{
struct mpu3050_sensor *sensor = input_get_drvdata(input);
int error;

pm_runtime_get(sensor->dev);

/* Enable interrupts */
error = i2c_smbus_write_byte_data(sensor->client, MPU3050_INT_CFG,
MPU3050_LATCH_INT_EN |
MPU3050_RAW_RDY_EN |
MPU3050_MPU_RDY_EN);
if (error < 0) {
pm_runtime_put(sensor->dev);
return error;
}

return 0;
}

Expand Down Expand Up @@ -259,7 +270,7 @@ 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);
Expand Down

0 comments on commit b81bb1e

Please sign in to comment.