aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-10-12 04:57:53 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-12 06:48:35 -0400
commit1e036f65329901a2432c92132b785654944743d9 (patch)
treec60db28df0b38e6ded7ee538043d0a620b11e4b4 /drivers/input/misc
parent40a49710107c237a2f4362c8b8bf07df3bac53dd (diff)
Input: twl6040: Simplify vibra regsiter definitions
The bits within the two control registers (for left and right channel) are identical. Use common names for the bits acros the two register. Also add the missing definition for the path selection bit. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/twl6040-vibra.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index 154b7a324d67..cb741858229a 100644
--- a/drivers/input/misc/twl6040-vibra.c
+++ b/drivers/input/misc/twl6040-vibra.c
@@ -74,12 +74,12 @@ static irqreturn_t twl6040_vib_irq_handler(int irq, void *data)
74 if (status & TWL6040_VIBLOCDET) { 74 if (status & TWL6040_VIBLOCDET) {
75 dev_warn(info->dev, "Left Vibrator overcurrent detected\n"); 75 dev_warn(info->dev, "Left Vibrator overcurrent detected\n");
76 twl6040_clear_bits(twl6040, TWL6040_REG_VIBCTLL, 76 twl6040_clear_bits(twl6040, TWL6040_REG_VIBCTLL,
77 TWL6040_VIBENAL); 77 TWL6040_VIBENA);
78 } 78 }
79 if (status & TWL6040_VIBROCDET) { 79 if (status & TWL6040_VIBROCDET) {
80 dev_warn(info->dev, "Right Vibrator overcurrent detected\n"); 80 dev_warn(info->dev, "Right Vibrator overcurrent detected\n");
81 twl6040_clear_bits(twl6040, TWL6040_REG_VIBCTLR, 81 twl6040_clear_bits(twl6040, TWL6040_REG_VIBCTLR,
82 TWL6040_VIBENAR); 82 TWL6040_VIBENA);
83 } 83 }
84 84
85 return IRQ_HANDLED; 85 return IRQ_HANDLED;
@@ -104,16 +104,16 @@ static void twl6040_vibra_enable(struct vibra_info *info)
104 * overcurrent detection 104 * overcurrent detection
105 */ 105 */
106 twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLL, 106 twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLL,
107 TWL6040_VIBENAL | TWL6040_VIBCTRLL); 107 TWL6040_VIBENA | TWL6040_VIBCTRL);
108 twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLR, 108 twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLR,
109 TWL6040_VIBENAR | TWL6040_VIBCTRLR); 109 TWL6040_VIBENA | TWL6040_VIBCTRL);
110 usleep_range(3000, 3500); 110 usleep_range(3000, 3500);
111 } 111 }
112 112
113 twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLL, 113 twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLL,
114 TWL6040_VIBENAL); 114 TWL6040_VIBENA);
115 twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLR, 115 twl6040_reg_write(twl6040, TWL6040_REG_VIBCTLR,
116 TWL6040_VIBENAR); 116 TWL6040_VIBENA);
117 117
118 info->enabled = true; 118 info->enabled = true;
119} 119}