diff options
author | Hector Palacios <hector.palacios@digi.com> | 2011-11-28 17:33:25 +0100 |
---|---|---|
committer | Hector Palacios <hector.palacios@digi.com> | 2011-11-29 16:06:41 +0100 |
commit | 0c89f9fb061616c40809079afbbc9462b015a2d0 (patch) | |
tree | 8c9b97b57d7d7dc7ac4f85fce53cbff870e8d8e5 /drivers | |
parent | dbd63cddf478f60b9b661c16bb292fa197c62c50 (diff) |
mma7455l: do not output DRDY pin on Measurement mode
When setting the mode to Measurement (0x01 to Mode Control Register
at address 0x16), the DRDY pin was by default output to INT1/DRDY pin
causing an interrupt. It looks like the interrupt is not correctly
handled and hangs the system.
To avoid this, when setting any mode set also DRPD flag to
not output Data Ready status to DRDY/INT1 pin.
The interrupt logic must be reviewed because it hangs the system.
Currently, this driver does not correctly support interrupts.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/misc/mma7455l.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/input/misc/mma7455l.c b/drivers/input/misc/mma7455l.c index 6b47c12c572c..433d83124803 100644 --- a/drivers/input/misc/mma7455l.c +++ b/drivers/input/misc/mma7455l.c @@ -91,10 +91,16 @@ enum mma7455l_reg_status { }; enum mma7455l_mode { - MMA7455L_MODE_STANDBY = 0, - MMA7455L_MODE_MEASUREMENT = 1, - MMA7455L_MODE_LEVELDETECTION = 0x42, /* Set DRPD to on */ - MMA7455L_MODE_PULSEDETECTION = 0x43, /* Set DRPD to on */ + /* +HP: Normally we would want Data Ready Status to be + * signaled to INT1/DRDY PIN only in measurement mode, but + * that would cause continued interrupts that we are not + * going to handle for measurement (we would probably need + * a DMA buffer for that), so do not output + * Data Ready to INT1/DRDY PIN in any mode */ + MMA7455L_MODE_STANDBY = 0x40, + MMA7455L_MODE_MEASUREMENT = 0x41, + MMA7455L_MODE_LEVELDETECTION = 0x42, + MMA7455L_MODE_PULSEDETECTION = 0x43, MMA7455L_MODE_MASK = 0x43, }; |