diff options
author | Abraham Arce <x0066660@ti.com> | 2010-09-30 02:36:48 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-10-13 10:49:25 -0400 |
commit | 05362f486bf6e6b8adc77424b6edf2f3cd6816ae (patch) | |
tree | 657e77275116102ade7a0f60ad0f9558886a18ee | |
parent | f3a1ba60dbdbf46f2715cc4e3f8abc9d65c4d9bf (diff) |
Input: omap4-keypad - SYSCONFIG register configuration
Remove SYSCONFIG register configuration, omap hwmod framework will
use internal API to modify as required.
Other minor updates:
- Change a variable name from DEF to VAL, this represents a value
- Break line width to 80 characters
Signed-off-by: Abraham Arce <x0066660@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/keyboard/omap4-keypad.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 788169d3e7c2..2b61f5fb07b6 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c | |||
@@ -51,17 +51,15 @@ | |||
51 | #define OMAP4_KBD_FULLCODE63_32 0x48 | 51 | #define OMAP4_KBD_FULLCODE63_32 0x48 |
52 | 52 | ||
53 | /* OMAP4 bit definitions */ | 53 | /* OMAP4 bit definitions */ |
54 | #define OMAP4_DEF_SYSCONFIG_SOFTRST (1 << 1) | ||
55 | #define OMAP4_DEF_SYSCONFIG_ENAWKUP (1 << 2) | ||
56 | #define OMAP4_DEF_IRQENABLE_EVENTEN (1 << 0) | 54 | #define OMAP4_DEF_IRQENABLE_EVENTEN (1 << 0) |
57 | #define OMAP4_DEF_IRQENABLE_LONGKEY (1 << 1) | 55 | #define OMAP4_DEF_IRQENABLE_LONGKEY (1 << 1) |
58 | #define OMAP4_DEF_IRQENABLE_TIMEOUTEN (1 << 2) | 56 | #define OMAP4_DEF_IRQENABLE_TIMEOUTEN (1 << 2) |
59 | #define OMAP4_DEF_CTRL_NOSOFTMODE (1 << 1) | 57 | #define OMAP4_DEF_CTRL_NOSOFTMODE (1 << 1) |
60 | #define OMAP4_DEF_CTRLPTVVALUE (1 << 2) | 58 | #define OMAP4_DEF_CTRLPTVVALUE (1 << 2) |
61 | #define OMAP4_DEF_CTRLPTV (1 << 1) | 59 | #define OMAP4_DEF_CTRLPTV (1 << 1) |
62 | #define OMAP4_DEF_IRQDISABLE 0x00 | ||
63 | 60 | ||
64 | /* OMAP4 values */ | 61 | /* OMAP4 values */ |
62 | #define OMAP4_VAL_IRQDISABLE 0x00 | ||
65 | #define OMAP4_VAL_DEBOUNCINGTIME 0x07 | 63 | #define OMAP4_VAL_DEBOUNCINGTIME 0x07 |
66 | #define OMAP4_VAL_FUNCTIONALCFG 0x1E | 64 | #define OMAP4_VAL_FUNCTIONALCFG 0x1E |
67 | 65 | ||
@@ -82,13 +80,11 @@ struct omap4_keypad { | |||
82 | 80 | ||
83 | static void __devinit omap4_keypad_config(struct omap4_keypad *keypad_data) | 81 | static void __devinit omap4_keypad_config(struct omap4_keypad *keypad_data) |
84 | { | 82 | { |
85 | __raw_writel(OMAP4_DEF_SYSCONFIG_SOFTRST | OMAP4_DEF_SYSCONFIG_ENAWKUP, | ||
86 | keypad_data->base + OMAP4_KBD_SYSCONFIG); | ||
87 | __raw_writel(OMAP4_VAL_FUNCTIONALCFG, | 83 | __raw_writel(OMAP4_VAL_FUNCTIONALCFG, |
88 | keypad_data->base + OMAP4_KBD_CTRL); | 84 | keypad_data->base + OMAP4_KBD_CTRL); |
89 | __raw_writel(OMAP4_VAL_DEBOUNCINGTIME, | 85 | __raw_writel(OMAP4_VAL_DEBOUNCINGTIME, |
90 | keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME); | 86 | keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME); |
91 | __raw_writel(OMAP4_DEF_IRQDISABLE, | 87 | __raw_writel(OMAP4_VAL_IRQDISABLE, |
92 | keypad_data->base + OMAP4_KBD_IRQSTATUS); | 88 | keypad_data->base + OMAP4_KBD_IRQSTATUS); |
93 | __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY, | 89 | __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY, |
94 | keypad_data->base + OMAP4_KBD_IRQENABLE); | 90 | keypad_data->base + OMAP4_KBD_IRQENABLE); |
@@ -104,11 +100,12 @@ static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id) | |||
104 | u32 *new_state = (u32 *) key_state; | 100 | u32 *new_state = (u32 *) key_state; |
105 | 101 | ||
106 | /* Disable interrupts */ | 102 | /* Disable interrupts */ |
107 | __raw_writel(OMAP4_DEF_IRQDISABLE, | 103 | __raw_writel(OMAP4_VAL_IRQDISABLE, |
108 | keypad_data->base + OMAP4_KBD_IRQENABLE); | 104 | keypad_data->base + OMAP4_KBD_IRQENABLE); |
109 | 105 | ||
110 | *new_state = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE31_0); | 106 | *new_state = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE31_0); |
111 | *(new_state + 1) = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE63_32); | 107 | *(new_state + 1) = __raw_readl(keypad_data->base |
108 | + OMAP4_KBD_FULLCODE63_32); | ||
112 | 109 | ||
113 | for (row = 0; row < keypad_data->rows; row++) { | 110 | for (row = 0; row < keypad_data->rows; row++) { |
114 | changed = key_state[row] ^ keypad_data->key_state[row]; | 111 | changed = key_state[row] ^ keypad_data->key_state[row]; |