aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/keyboard/corgikbd.c12
-rw-r--r--drivers/input/keyboard/spitzkbd.c12
-rw-r--r--include/linux/input.h11
3 files changed, 15 insertions, 20 deletions
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c
index 96c6bf77248a..1f0e720267d7 100644
--- a/drivers/input/keyboard/corgikbd.c
+++ b/drivers/input/keyboard/corgikbd.c
@@ -245,9 +245,9 @@ static void corgikbd_hinge_timer(unsigned long data)
245 if (hinge_count >= HINGE_STABLE_COUNT) { 245 if (hinge_count >= HINGE_STABLE_COUNT) {
246 spin_lock_irqsave(&corgikbd_data->lock, flags); 246 spin_lock_irqsave(&corgikbd_data->lock, flags);
247 247
248 input_report_switch(corgikbd_data->input, SW_0, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); 248 input_report_switch(corgikbd_data->input, SW_LID, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0));
249 input_report_switch(corgikbd_data->input, SW_1, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); 249 input_report_switch(corgikbd_data->input, SW_TABLET_MODE, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0));
250 input_report_switch(corgikbd_data->input, SW_2, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); 250 input_report_switch(corgikbd_data->input, SW_HEADPHONE_INSERT, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0));
251 input_sync(corgikbd_data->input); 251 input_sync(corgikbd_data->input);
252 252
253 spin_unlock_irqrestore(&corgikbd_data->lock, flags); 253 spin_unlock_irqrestore(&corgikbd_data->lock, flags);
@@ -340,9 +340,9 @@ static int __init corgikbd_probe(struct platform_device *pdev)
340 for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) 340 for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++)
341 set_bit(corgikbd->keycode[i], input_dev->keybit); 341 set_bit(corgikbd->keycode[i], input_dev->keybit);
342 clear_bit(0, input_dev->keybit); 342 clear_bit(0, input_dev->keybit);
343 set_bit(SW_0, input_dev->swbit); 343 set_bit(SW_LID, input_dev->swbit);
344 set_bit(SW_1, input_dev->swbit); 344 set_bit(SW_TABLET_MODE, input_dev->swbit);
345 set_bit(SW_2, input_dev->swbit); 345 set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
346 346
347 input_register_device(corgikbd->input); 347 input_register_device(corgikbd->input);
348 348
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index 1d238a9d52d6..c5d03fb77bcb 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -299,9 +299,9 @@ static void spitzkbd_hinge_timer(unsigned long data)
299 if (hinge_count >= HINGE_STABLE_COUNT) { 299 if (hinge_count >= HINGE_STABLE_COUNT) {
300 spin_lock_irqsave(&spitzkbd_data->lock, flags); 300 spin_lock_irqsave(&spitzkbd_data->lock, flags);
301 301
302 input_report_switch(spitzkbd_data->input, SW_0, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); 302 input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0));
303 input_report_switch(spitzkbd_data->input, SW_1, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); 303 input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0));
304 input_report_switch(spitzkbd_data->input, SW_2, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); 304 input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0));
305 input_sync(spitzkbd_data->input); 305 input_sync(spitzkbd_data->input);
306 306
307 spin_unlock_irqrestore(&spitzkbd_data->lock, flags); 307 spin_unlock_irqrestore(&spitzkbd_data->lock, flags);
@@ -398,9 +398,9 @@ static int __init spitzkbd_probe(struct platform_device *dev)
398 for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) 398 for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++)
399 set_bit(spitzkbd->keycode[i], input_dev->keybit); 399 set_bit(spitzkbd->keycode[i], input_dev->keybit);
400 clear_bit(0, input_dev->keybit); 400 clear_bit(0, input_dev->keybit);
401 set_bit(SW_0, input_dev->swbit); 401 set_bit(SW_LID, input_dev->swbit);
402 set_bit(SW_1, input_dev->swbit); 402 set_bit(SW_TABLET_MODE, input_dev->swbit);
403 set_bit(SW_2, input_dev->swbit); 403 set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
404 404
405 input_register_device(input_dev); 405 input_register_device(input_dev);
406 406
diff --git a/include/linux/input.h b/include/linux/input.h
index 14036ee0749b..ce1a756c4c30 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -579,14 +579,9 @@ struct input_absinfo {
579 * Switch events 579 * Switch events
580 */ 580 */
581 581
582#define SW_0 0x00 582#define SW_LID 0x00 /* set = lid shut */
583#define SW_1 0x01 583#define SW_TABLET_MODE 0x01 /* set = tablet mode */
584#define SW_2 0x02 584#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
585#define SW_3 0x03
586#define SW_4 0x04
587#define SW_5 0x05
588#define SW_6 0x06
589#define SW_7 0x07
590#define SW_MAX 0x0f 585#define SW_MAX 0x0f
591 586
592/* 587/*