misc: l3g4200d: Add delay after power on.
authorMike Corrigan <michael.corrigan@motorola.com>
Wed, 29 Dec 2010 22:25:40 +0000 (16:25 -0600)
committerRebecca Schultz Zavin <rebecca@android.com>
Wed, 5 Jan 2011 00:15:32 +0000 (16:15 -0800)
Add more delay after the device powers on in order to avoid invalid data.

Change-Id: Ifcbc42300b0f27542eb32d199dbda04e3c1e9eb9
Signed-off-by: Mike Corrigan <michael.corrigan@motorola.com>
drivers/misc/l3g4200d.c

index 311ac744aea4a75f254d1e75ca71bf100c26e8d3..39ad78f88d9c21ad71d3845ff9dec61a2f27f7d8 100644 (file)
@@ -76,7 +76,7 @@
 #define ODR100                         0x08    /* 100Hz output data rate */
 #define ODR400                         0x10    /* 400Hz output data rate */
 #define ODR1000                                0x18    /* 1000Hz output data rate */
-
+#define L3G4200D_PU_DELAY               300
 struct l3g4200d_data {
        struct i2c_client *client;
        struct l3g4200d_platform_data *pdata;
@@ -323,7 +323,7 @@ static int l3g4200d_enable(struct l3g4200d_data *gyro)
                        return err;
                }
                schedule_delayed_work(&gyro->input_work,
-                       msecs_to_jiffies(gyro->pdata->poll_interval));
+                       msecs_to_jiffies(L3G4200D_PU_DELAY));
        }
 
        return 0;