From: Stephen Rothwell Date: Mon, 14 Nov 2011 01:08:02 +0000 (+1100) Subject: Merge remote-tracking branch 'input/next' X-Git-Tag: next-20111114~28 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5edb7410b496b80d70707fd787a5796e2b81968e;p=karo-tx-linux.git Merge remote-tracking branch 'input/next' Conflicts: drivers/input/keyboard/Kconfig drivers/input/keyboard/samsung-keypad.c --- 5edb7410b496b80d70707fd787a5796e2b81968e diff --cc drivers/input/keyboard/Kconfig index d80b4eac4989,cdc385b2cf7d..8e4927795f6f --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@@ -423,18 -439,12 +439,19 @@@ config KEYBOARD_PMIC8XX To compile this driver as a module, choose M here: the module will be called pmic8xxx-keypad. +config HAVE_SAMSUNG_KEYPAD + bool + help + This will include Samsung Keypad controller driver support. If you + want to include Samsung Keypad support for any machine, kindly + select this in the respective mach-xxxx/Kconfig file. + config KEYBOARD_SAMSUNG tristate "Samsung keypad support" - depends on SAMSUNG_DEV_KEYPAD || HAVE_SAMSUNG_KEYPAD + depends on HAVE_CLK help - Say Y here if you want to use the Samsung keypad. + Say Y here if you want to use the keypad on your Samsung mobile + device. To compile this driver as a module, choose M here: the module will be called samsung-keypad. diff --cc drivers/input/keyboard/samsung-keypad.c index 8a0060cd3982,1a2b755564f2..adfdcb40c1bc --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c @@@ -21,10 -21,8 +21,10 @@@ #include #include #include +#include +#include #include - #include + #include #define SAMSUNG_KEYIFCON 0x00 #define SAMSUNG_KEYIFSTSCLR 0x04 @@@ -578,24 -440,11 +578,22 @@@ static int samsung_keypad_resume(struc return 0; } - - static const struct dev_pm_ops samsung_keypad_pm_ops = { - .suspend = samsung_keypad_suspend, - .resume = samsung_keypad_resume, - }; #endif +#ifdef CONFIG_OF +static const struct of_device_id samsung_keypad_dt_match[] = { + { .compatible = "samsung,s3c6410-keypad" }, + { .compatible = "samsung,s5pv210-keypad" }, + {}, +}; +MODULE_DEVICE_TABLE(of, samsung_keypad_dt_match); +#else +#define samsung_keypad_dt_match NULL +#endif + + static SIMPLE_DEV_PM_OPS(samsung_keypad_pm_ops, + samsung_keypad_suspend, samsung_keypad_resume); + static struct platform_device_id samsung_keypad_driver_ids[] = { { .name = "samsung-keypad", @@@ -614,10 -463,7 +612,8 @@@ static struct platform_driver samsung_k .driver = { .name = "samsung-keypad", .owner = THIS_MODULE, + .of_match_table = samsung_keypad_dt_match, - #ifdef CONFIG_PM .pm = &samsung_keypad_pm_ops, - #endif }, .id_table = samsung_keypad_driver_ids, }; diff --cc drivers/input/tablet/wacom_wac.c index da0d8761e778,6b9adc7bec6e..ecfcbc8144dc --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@@ -799,10 -799,15 +799,13 @@@ static int wacom_bpt_touch(struct wacom unsigned char *data = wacom->data; int i; + if (data[0] != 0x02) + return 0; + for (i = 0; i < 2; i++) { - int p = data[9 * i + 2]; - bool touch = p && !wacom->shared->stylus_in_proximity; + int offset = (data[1] & 0x80) ? (8 * i) : (9 * i); + bool touch = data[offset + 3] & 0x80; - input_mt_slot(input, i); - input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); /* * Touch events need to be disabled while stylus is * in proximity because user's hand is resting on touchpad