diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-06-17 12:02:44 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-06-17 12:02:44 -0400 |
commit | 15439dd37f92f930ac7fc65a4f261834e4215bb0 (patch) | |
tree | ec8e4a7cffd1cbb55ae4970c3172fa9a6fb0c0f7 /drivers/input/keyboard | |
parent | 39ab9ddeb3e9573a1ea9a17a1431ea5c81681964 (diff) | |
parent | 90d95ef617a535a8832bdcb8dee07bf591e5dd82 (diff) |
Merge branch 'for-linus' into next
Conflicts:
drivers/input/mouse/appletouch.c
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/pxa27x_keypad.c | 38 |
2 files changed, 27 insertions, 13 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 56857d1e56d5..c27537be82ae 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -807,6 +807,8 @@ static int atkbd_activate(struct atkbd *atkbd) | |||
807 | static void atkbd_cleanup(struct serio *serio) | 807 | static void atkbd_cleanup(struct serio *serio) |
808 | { | 808 | { |
809 | struct atkbd *atkbd = serio_get_drvdata(serio); | 809 | struct atkbd *atkbd = serio_get_drvdata(serio); |
810 | |||
811 | atkbd_disable(atkbd); | ||
810 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); | 812 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); |
811 | } | 813 | } |
812 | 814 | ||
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index c7c9599b315d..6f1516f50750 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -138,6 +138,9 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) | |||
138 | set_bit(code, input_dev->keybit); | 138 | set_bit(code, input_dev->keybit); |
139 | } | 139 | } |
140 | 140 | ||
141 | for (i = 0; i < pdata->direct_key_num; i++) | ||
142 | set_bit(pdata->direct_key_map[i], input_dev->keybit); | ||
143 | |||
141 | keypad->rotary_up_key[0] = pdata->rotary0_up_key; | 144 | keypad->rotary_up_key[0] = pdata->rotary0_up_key; |
142 | keypad->rotary_up_key[1] = pdata->rotary1_up_key; | 145 | keypad->rotary_up_key[1] = pdata->rotary1_up_key; |
143 | keypad->rotary_down_key[0] = pdata->rotary0_down_key; | 146 | keypad->rotary_down_key[0] = pdata->rotary0_down_key; |
@@ -145,17 +148,21 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) | |||
145 | keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; | 148 | keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; |
146 | keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; | 149 | keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; |
147 | 150 | ||
148 | if (pdata->rotary0_up_key && pdata->rotary0_down_key) { | 151 | if (pdata->enable_rotary0) { |
149 | set_bit(pdata->rotary0_up_key, input_dev->keybit); | 152 | if (pdata->rotary0_up_key && pdata->rotary0_down_key) { |
150 | set_bit(pdata->rotary0_down_key, input_dev->keybit); | 153 | set_bit(pdata->rotary0_up_key, input_dev->keybit); |
151 | } else | 154 | set_bit(pdata->rotary0_down_key, input_dev->keybit); |
152 | set_bit(pdata->rotary0_rel_code, input_dev->relbit); | 155 | } else |
153 | 156 | set_bit(pdata->rotary0_rel_code, input_dev->relbit); | |
154 | if (pdata->rotary1_up_key && pdata->rotary1_down_key) { | 157 | } |
155 | set_bit(pdata->rotary1_up_key, input_dev->keybit); | 158 | |
156 | set_bit(pdata->rotary1_down_key, input_dev->keybit); | 159 | if (pdata->enable_rotary1) { |
157 | } else | 160 | if (pdata->rotary1_up_key && pdata->rotary1_down_key) { |
158 | set_bit(pdata->rotary1_rel_code, input_dev->relbit); | 161 | set_bit(pdata->rotary1_up_key, input_dev->keybit); |
162 | set_bit(pdata->rotary1_down_key, input_dev->keybit); | ||
163 | } else | ||
164 | set_bit(pdata->rotary1_rel_code, input_dev->relbit); | ||
165 | } | ||
159 | } | 166 | } |
160 | 167 | ||
161 | static inline unsigned int lookup_matrix_keycode( | 168 | static inline unsigned int lookup_matrix_keycode( |
@@ -493,8 +500,13 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) | |||
493 | keypad->input_dev = input_dev; | 500 | keypad->input_dev = input_dev; |
494 | input_set_drvdata(input_dev, keypad); | 501 | input_set_drvdata(input_dev, keypad); |
495 | 502 | ||
496 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | | 503 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
497 | BIT_MASK(EV_REL); | 504 | if ((keypad->pdata->enable_rotary0 && |
505 | keypad->pdata->rotary0_rel_code) || | ||
506 | (keypad->pdata->enable_rotary1 && | ||
507 | keypad->pdata->rotary1_rel_code)) { | ||
508 | input_dev->evbit[0] |= BIT_MASK(EV_REL); | ||
509 | } | ||
498 | 510 | ||
499 | pxa27x_keypad_build_keycode(keypad); | 511 | pxa27x_keypad_build_keycode(keypad); |
500 | platform_set_drvdata(pdev, keypad); | 512 | platform_set_drvdata(pdev, keypad); |