From 88d5e520aa9701eb3e4f46165e02097cc03d363a Mon Sep 17 00:00:00 2001 From: abdoulaye berthe Date: Sat, 12 Jul 2014 22:30:14 +0200 Subject: driver:gpio remove all usage of gpio_remove retval in driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this remove all reference to gpio_remove retval in all driver except pinctrl and gpio. the same thing is done for gpio and pinctrl in two different patches. Signed-off-by: Abdoulaye Berthe Acked-by: Michael Büsch Acked-by: Dmitry Torokhov Acked-by: Mauro Carvalho Chehab Acked-by: Tomi Valkeinen Signed-off-by: Linus Walleij --- drivers/input/keyboard/adp5588-keys.c | 4 +--- drivers/input/keyboard/adp5589-keys.c | 4 +--- drivers/input/touchscreen/ad7879.c | 10 +++------- 3 files changed, 5 insertions(+), 13 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c index 5ef7fcf0e250..b97ed443e0a4 100644 --- a/drivers/input/keyboard/adp5588-keys.c +++ b/drivers/input/keyboard/adp5588-keys.c @@ -251,9 +251,7 @@ static void adp5588_gpio_remove(struct adp5588_kpad *kpad) dev_warn(dev, "teardown failed %d\n", error); } - error = gpiochip_remove(&kpad->gc); - if (error) - dev_warn(dev, "gpiochip_remove failed %d\n", error); + gpiochip_remove(&kpad->gc); } #else static inline int adp5588_gpio_add(struct adp5588_kpad *kpad) diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c index 6329549bf6ad..a45267729dfc 100644 --- a/drivers/input/keyboard/adp5589-keys.c +++ b/drivers/input/keyboard/adp5589-keys.c @@ -567,9 +567,7 @@ static void adp5589_gpio_remove(struct adp5589_kpad *kpad) dev_warn(dev, "teardown failed %d\n", error); } - error = gpiochip_remove(&kpad->gc); - if (error) - dev_warn(dev, "gpiochip_remove failed %d\n", error); + gpiochip_remove(&kpad->gc); } #else static inline int adp5589_gpio_add(struct adp5589_kpad *kpad) diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index fce590677b7b..1eb9d3c20886 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c @@ -470,14 +470,10 @@ static int ad7879_gpio_add(struct ad7879 *ts, static void ad7879_gpio_remove(struct ad7879 *ts) { const struct ad7879_platform_data *pdata = dev_get_platdata(ts->dev); - int ret; - if (pdata->gpio_export) { - ret = gpiochip_remove(&ts->gc); - if (ret) - dev_err(ts->dev, "failed to remove gpio %d\n", - ts->gc.base); - } + if (pdata->gpio_export) + gpiochip_remove(&ts->gc); + } #else static inline int ad7879_gpio_add(struct ad7879 *ts, -- cgit v1.2.1 From 95afae481414cbdb0567bf82d5e5077c3ac9da20 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Mon, 8 Sep 2014 17:30:41 +0100 Subject: xen: remove DEFINE_XENBUS_DRIVER() macro The DEFINE_XENBUS_DRIVER() macro looks a bit weird and causes sparse errors. Replace the uses with standard structure definitions instead. This is similar to pci and usb device registration. Signed-off-by: David Vrabel --- drivers/input/misc/xen-kbdfront.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index fbfdc10573be..1af28b06c713 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c @@ -365,12 +365,13 @@ static const struct xenbus_device_id xenkbd_ids[] = { { "" } }; -static DEFINE_XENBUS_DRIVER(xenkbd, , +static struct xenbus_driver xenkbd_driver = { + .ids = xenkbd_ids, .probe = xenkbd_probe, .remove = xenkbd_remove, .resume = xenkbd_resume, .otherend_changed = xenkbd_backend_changed, -); +}; static int __init xenkbd_init(void) { -- cgit v1.2.1 From a6551a76fff15056fde2342d0f7de41ee605264e Mon Sep 17 00:00:00 2001 From: Andrew Bresticker Date: Thu, 18 Sep 2014 17:18:56 +0200 Subject: mfd: cros_ec: stop calling ->cmd_xfer() directly Instead of having users of the ChromeOS EC call the interface-specific cmd_xfer() callback directly, introduce a central cros_ec_cmd_xfer() to use instead. This will allow us to put all the locking and retry logic in one place instead of duplicating it across the different drivers. Signed-off-by: Andrew Bresticker Reviewed-by: Simon Glass Signed-off-by: Javier Martinez Canillas Reviewed-by: Doug Anderson Signed-off-by: Lee Jones --- drivers/input/keyboard/cros_ec_keyb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index 791781ade4e7..93111d1aa617 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -182,7 +182,7 @@ static int cros_ec_keyb_get_state(struct cros_ec_keyb *ckdev, uint8_t *kb_state) .insize = ckdev->cols, }; - return ckdev->ec->cmd_xfer(ckdev->ec, &msg); + return cros_ec_cmd_xfer(ckdev->ec, &msg); } static irqreturn_t cros_ec_keyb_irq(int irq, void *data) -- cgit v1.2.1 From 0f3ae5baafba9e48e2d3b173b982a46ad90149b4 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Mon, 13 Oct 2014 15:54:48 -0700 Subject: input: edt-ft5x06: replace strnicmp with strncasecmp The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by: Rasmus Villemoes Cc: Dmitry Torokhov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 8857d5b9be71..ee3434f1e949 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -812,7 +812,7 @@ static int edt_ft5x06_ts_identify(struct i2c_client *client, /* if we find something consistent, stay with that assumption * at least M09 won't send 3 bytes here */ - if (!(strnicmp(rdbuf + 1, "EP0", 3))) { + if (!(strncasecmp(rdbuf + 1, "EP0", 3))) { tsdata->version = M06; /* remove last '$' end marker */ -- cgit v1.2.1 From b0cfb794a3dd1d699f3e453f9180bd06508fb8f0 Mon Sep 17 00:00:00 2001 From: Andreas Bosch Date: Wed, 15 Oct 2014 10:44:50 -0700 Subject: Input: alps - fix v4 button press recognition Since the change to struct input_mt_pos some variables are now bitfields instead of integers. Automatic conversion from integer to bitfield entry destroys information, therefore enforce boolean interpretation instead. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1114768 Fixes: 02d04254a5df ("Input: alps - use struct input_mt_pos to track coordinates") Signed-off-by: Andreas Bosch Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/alps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 35a49bf57227..2b0ae8cc8e51 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -835,8 +835,8 @@ static void alps_process_packet_v4(struct psmouse *psmouse) f->fingers = alps_process_bitmap(priv, f); } - f->left = packet[4] & 0x01; - f->right = packet[4] & 0x02; + f->left = !!(packet[4] & 0x01); + f->right = !!(packet[4] & 0x02); f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | ((packet[0] & 0x30) >> 4); -- cgit v1.2.1 From 4d544e3bdb12f8e48f61e7f2270b253a48c69e00 Mon Sep 17 00:00:00 2001 From: Chang Huaixin Date: Thu, 16 Oct 2014 13:33:24 -0700 Subject: Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend xenkbd_disconnect_backend doesn't free grant table entry. This bug affects live migration. xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref to handle grant table entry which doesn't really free an entry. Thus every time we do xenkbd_resume, grant table entry increses by one. As an grant table entry occupies 8 bytes, an grant table page has at most 512 entries. Every 512 times we do xenkdb_resume, grant table pages increses by one. After around 3500 times of live migration, grant table pages will increase by 7, causing too many pages to populate and hitting max_pages limit when assigning pages.Thus assign_pages will fail, so will live migration. Signed-off-by: Chang Huaixin Acked-by: David Vrabel Signed-off-by: Dmitry Torokhov --- drivers/input/misc/xen-kbdfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index fbfdc10573be..e2ecfc6e633d 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c @@ -285,7 +285,7 @@ static int xenkbd_connect_backend(struct xenbus_device *dev, error_evtchan: xenbus_free_evtchn(dev, evtchn); error_grant: - gnttab_end_foreign_access_ref(info->gref, 0); + gnttab_end_foreign_access(info->gref, 0, 0UL); info->gref = -1; return ret; } @@ -296,7 +296,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info) unbind_from_irqhandler(info->irq, info); info->irq = -1; if (info->gref >= 0) - gnttab_end_foreign_access_ref(info->gref, 0); + gnttab_end_foreign_access(info->gref, 0, 0UL); info->gref = -1; } -- cgit v1.2.1 From 135d916fe8a5fa25ad87a62844acfd3dbb1c9fb9 Mon Sep 17 00:00:00 2001 From: Jaewon Kim Date: Thu, 16 Oct 2014 13:56:52 -0700 Subject: Input: max77693-haptic - fix state check in imax77693_haptic_disable() The check to see whether the device is already disabled in max77693_haptic_disable() was inversed, this change corrects it. Signed-off-by: Jaewon Kim Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Torokhov --- drivers/input/misc/max77693-haptic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index d605db4d2f39..7b1fde93799e 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -152,7 +152,7 @@ static void max77693_haptic_disable(struct max77693_haptic *haptic) { int error; - if (haptic->enabled) + if (!haptic->enabled) return; error = max77693_haptic_configure(haptic, false); -- cgit v1.2.1 From 4b54625822eb7a4eae9c5b8c890b6c4dc001b895 Mon Sep 17 00:00:00 2001 From: Tommi Rantala Date: Thu, 16 Oct 2014 14:01:43 -0700 Subject: Input: xpad - add USB ID for Thrustmaster Ferrari 458 Racing Wheel Add the USB ID for the Xbox 360 Thrustmaster Ferrari 458 Racing Wheel. Signed-off-by: Tommi Rantala Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/xpad.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/input') diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index cd13c82ca0a1..cee4fe302f5a 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -209,6 +209,7 @@ static const struct xpad_device { { 0x24c6, 0x5501, "Hori Real Arcade Pro VX-SA", 0, XTYPE_XBOX360 }, { 0x24c6, 0x5506, "Hori SOULCALIBUR V Stick", 0, XTYPE_XBOX360 }, { 0x24c6, 0x5b02, "Thrustmaster, Inc. GPX Controller", 0, XTYPE_XBOX360 }, + { 0x24c6, 0x5b03, "Thrustmaster Ferrari 458 Racing Wheel", 0, XTYPE_XBOX360 }, { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX }, { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN } }; -- cgit v1.2.1 From 4dfb15cd5aaa6682e93854a74b394a1c95b82621 Mon Sep 17 00:00:00 2001 From: Tommi Rantala Date: Thu, 16 Oct 2014 14:02:07 -0700 Subject: Input: xpad - add Thrustmaster as Xbox 360 controller vendor Add Thrustmaster as Xbox 360 controller vendor. This is required for example to make the GP XID (044f:b326) gamepad work. Signed-off-by: Tommi Rantala Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/xpad.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/input') diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index cee4fe302f5a..2ed7905a068f 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -293,6 +293,7 @@ static const signed short xpad_abs_triggers[] = { static struct usb_device_id xpad_table[] = { { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */ + XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster X-Box 360 controllers */ XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */ XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */ XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */ -- cgit v1.2.1 From 1d05726c315c146b2ac0c5e94f01fde0c2b73dc1 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 20 Oct 2014 16:20:39 +0200 Subject: input: keyboard: drop owner assignment from platform_drivers A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang --- drivers/input/keyboard/adp5520-keys.c | 1 - drivers/input/keyboard/amikbd.c | 1 - drivers/input/keyboard/bf54x-keys.c | 1 - drivers/input/keyboard/clps711x-keypad.c | 1 - drivers/input/keyboard/davinci_keyscan.c | 1 - drivers/input/keyboard/ep93xx_keypad.c | 1 - drivers/input/keyboard/goldfish_events.c | 1 - drivers/input/keyboard/gpio_keys.c | 1 - drivers/input/keyboard/gpio_keys_polled.c | 1 - drivers/input/keyboard/imx_keypad.c | 1 - drivers/input/keyboard/jornada680_kbd.c | 1 - drivers/input/keyboard/jornada720_kbd.c | 1 - drivers/input/keyboard/lpc32xx-keys.c | 1 - drivers/input/keyboard/matrix_keypad.c | 1 - drivers/input/keyboard/nomadik-ske-keypad.c | 1 - drivers/input/keyboard/nspire-keypad.c | 1 - drivers/input/keyboard/omap-keypad.c | 1 - drivers/input/keyboard/omap4-keypad.c | 1 - drivers/input/keyboard/pmic8xxx-keypad.c | 1 - drivers/input/keyboard/pxa27x_keypad.c | 1 - drivers/input/keyboard/pxa930_rotary.c | 1 - drivers/input/keyboard/samsung-keypad.c | 1 - drivers/input/keyboard/spear-keyboard.c | 1 - drivers/input/keyboard/tc3589x-keypad.c | 1 - drivers/input/keyboard/tegra-kbc.c | 1 - drivers/input/keyboard/twl4030_keypad.c | 1 - drivers/input/keyboard/w90p910_keypad.c | 1 - 27 files changed, 27 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c index 7f4a8b58efc1..db1004dad108 100644 --- a/drivers/input/keyboard/adp5520-keys.c +++ b/drivers/input/keyboard/adp5520-keys.c @@ -184,7 +184,6 @@ static int adp5520_keys_remove(struct platform_device *pdev) static struct platform_driver adp5520_keys_driver = { .driver = { .name = "adp5520-keys", - .owner = THIS_MODULE, }, .probe = adp5520_keys_probe, .remove = adp5520_keys_remove, diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 096d6067ae1f..d3b8c58fcfdb 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c @@ -255,7 +255,6 @@ static struct platform_driver amikbd_driver = { .remove = __exit_p(amikbd_remove), .driver = { .name = "amiga-keyboard", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index e6d46c5994d7..81b07dddae86 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c @@ -385,7 +385,6 @@ static int bfin_kpad_resume(struct platform_device *pdev) static struct platform_driver bfin_kpad_device_driver = { .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, }, .probe = bfin_kpad_probe, .remove = bfin_kpad_remove, diff --git a/drivers/input/keyboard/clps711x-keypad.c b/drivers/input/keyboard/clps711x-keypad.c index 552b65c6e6b0..27ef29f8fe6a 100644 --- a/drivers/input/keyboard/clps711x-keypad.c +++ b/drivers/input/keyboard/clps711x-keypad.c @@ -194,7 +194,6 @@ MODULE_DEVICE_TABLE(of, clps711x_keypad_of_match); static struct platform_driver clps711x_keypad_driver = { .driver = { .name = "clps711x-keypad", - .owner = THIS_MODULE, .of_match_table = clps711x_keypad_of_match, }, .probe = clps711x_keypad_probe, diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 1559dc1cf951..f363d1d2907a 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c @@ -322,7 +322,6 @@ static int davinci_ks_remove(struct platform_device *pdev) static struct platform_driver davinci_ks_driver = { .driver = { .name = "davinci_keyscan", - .owner = THIS_MODULE, }, .remove = davinci_ks_remove, }; diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index e59876212b8c..f77b295e0123 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -373,7 +373,6 @@ static int ep93xx_keypad_remove(struct platform_device *pdev) static struct platform_driver ep93xx_keypad_driver = { .driver = { .name = "ep93xx-keypad", - .owner = THIS_MODULE, .pm = &ep93xx_keypad_pm_ops, }, .probe = ep93xx_keypad_probe, diff --git a/drivers/input/keyboard/goldfish_events.c b/drivers/input/keyboard/goldfish_events.c index 69e854763370..907e4e278fce 100644 --- a/drivers/input/keyboard/goldfish_events.c +++ b/drivers/input/keyboard/goldfish_events.c @@ -181,7 +181,6 @@ static int events_probe(struct platform_device *pdev) static struct platform_driver events_driver = { .probe = events_probe, .driver = { - .owner = THIS_MODULE, .name = "goldfish_events", }, }; diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 8c98e97f8e41..8f3a24e15402 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -835,7 +835,6 @@ static struct platform_driver gpio_keys_device_driver = { .remove = gpio_keys_remove, .driver = { .name = "gpio-keys", - .owner = THIS_MODULE, .pm = &gpio_keys_pm_ops, .of_match_table = of_match_ptr(gpio_keys_of_match), } diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index 432d36395f35..10f0098f3c77 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -307,7 +307,6 @@ static struct platform_driver gpio_keys_polled_driver = { .probe = gpio_keys_polled_probe, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, .of_match_table = of_match_ptr(gpio_keys_polled_of_match), }, }; diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 20a99c368d16..e53f232eda0e 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -580,7 +580,6 @@ static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume); static struct platform_driver imx_keypad_driver = { .driver = { .name = "imx-keypad", - .owner = THIS_MODULE, .pm = &imx_kbd_pm_ops, .of_match_table = of_match_ptr(imx_keypad_of_match), }, diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c index 0ba4428da24a..80c81278ad2c 100644 --- a/drivers/input/keyboard/jornada680_kbd.c +++ b/drivers/input/keyboard/jornada680_kbd.c @@ -237,7 +237,6 @@ static int jornada680kbd_probe(struct platform_device *pdev) static struct platform_driver jornada680kbd_driver = { .driver = { .name = "jornada680_kbd", - .owner = THIS_MODULE, }, .probe = jornada680kbd_probe, }; diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c index cd729d485e98..421d9c55b0e8 100644 --- a/drivers/input/keyboard/jornada720_kbd.c +++ b/drivers/input/keyboard/jornada720_kbd.c @@ -167,7 +167,6 @@ MODULE_ALIAS("platform:jornada720_kbd"); static struct platform_driver jornada720_kbd_driver = { .driver = { .name = "jornada720_kbd", - .owner = THIS_MODULE, }, .probe = jornada720_kbd_probe, .remove = jornada720_kbd_remove, diff --git a/drivers/input/keyboard/lpc32xx-keys.c b/drivers/input/keyboard/lpc32xx-keys.c index 8b1b01361ec6..8c079371c2e7 100644 --- a/drivers/input/keyboard/lpc32xx-keys.c +++ b/drivers/input/keyboard/lpc32xx-keys.c @@ -381,7 +381,6 @@ static struct platform_driver lpc32xx_kscan_driver = { .remove = lpc32xx_kscan_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, .pm = &lpc32xx_kscan_pm_ops, .of_match_table = lpc32xx_kscan_match, } diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index e651fa692afe..b370a59cb759 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c @@ -565,7 +565,6 @@ static struct platform_driver matrix_keypad_driver = { .remove = matrix_keypad_remove, .driver = { .name = "matrix-keypad", - .owner = THIS_MODULE, .pm = &matrix_keypad_pm_ops, .of_match_table = of_match_ptr(matrix_keypad_dt_match), }, diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 63332e2f8628..c7d5b1666fc3 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -425,7 +425,6 @@ static SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops, static struct platform_driver ske_keypad_driver = { .driver = { .name = "nmk-ske-keypad", - .owner = THIS_MODULE, .pm = &ske_keypad_dev_pm_ops, }, .remove = ske_keypad_remove, diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index b31064981e96..7abfd34eb87e 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c @@ -268,7 +268,6 @@ MODULE_DEVICE_TABLE(of, nspire_keypad_dt_match); static struct platform_driver nspire_keypad_driver = { .driver = { .name = "nspire-keypad", - .owner = THIS_MODULE, .of_match_table = nspire_keypad_dt_match, }, .probe = nspire_keypad_probe, diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index b1acc9852eb7..7502e46165fa 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -383,7 +383,6 @@ static struct platform_driver omap_kp_driver = { .resume = omap_kp_resume, .driver = { .name = "omap-keypad", - .owner = THIS_MODULE, }, }; module_platform_driver(omap_kp_driver); diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 024b7bdffe5b..b052afec9a11 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -460,7 +460,6 @@ static struct platform_driver omap4_keypad_driver = { .remove = omap4_keypad_remove, .driver = { .name = "omap4-keypad", - .owner = THIS_MODULE, .pm = &omap4_keypad_pm_ops, .of_match_table = omap_keypad_dt_match, }, diff --git a/drivers/input/keyboard/pmic8xxx-keypad.c b/drivers/input/keyboard/pmic8xxx-keypad.c index 80c6b0ef3fc8..32580afecc26 100644 --- a/drivers/input/keyboard/pmic8xxx-keypad.c +++ b/drivers/input/keyboard/pmic8xxx-keypad.c @@ -687,7 +687,6 @@ static struct platform_driver pmic8xxx_kp_driver = { .probe = pmic8xxx_kp_probe, .driver = { .name = "pm8xxx-keypad", - .owner = THIS_MODULE, .pm = &pm8xxx_kp_pm_ops, .of_match_table = pm8xxx_match_table, }, diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index a15063bea700..6ab3e7c96329 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c @@ -881,7 +881,6 @@ static struct platform_driver pxa27x_keypad_driver = { .driver = { .name = "pxa27x-keypad", .of_match_table = of_match_ptr(pxa27x_keypad_dt_match), - .owner = THIS_MODULE, .pm = &pxa27x_keypad_pm_ops, }, }; diff --git a/drivers/input/keyboard/pxa930_rotary.c b/drivers/input/keyboard/pxa930_rotary.c index 374ca0246c8f..1cf5211fddaa 100644 --- a/drivers/input/keyboard/pxa930_rotary.c +++ b/drivers/input/keyboard/pxa930_rotary.c @@ -189,7 +189,6 @@ static int pxa930_rotary_remove(struct platform_device *pdev) static struct platform_driver pxa930_rotary_driver = { .driver = { .name = "pxa930-rotary", - .owner = THIS_MODULE, }, .probe = pxa930_rotary_probe, .remove = pxa930_rotary_remove, diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index 5e80fbf7b5ed..43ebd9c174bc 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c @@ -602,7 +602,6 @@ static struct platform_driver samsung_keypad_driver = { .remove = samsung_keypad_remove, .driver = { .name = "samsung-keypad", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(samsung_keypad_dt_match), .pm = &samsung_keypad_pm_ops, }, diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 258af10e5811..f42a543db043 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -385,7 +385,6 @@ static struct platform_driver spear_kbd_driver = { .remove = spear_kbd_remove, .driver = { .name = "keyboard", - .owner = THIS_MODULE, .pm = &spear_kbd_pm_ops, .of_match_table = of_match_ptr(spear_kbd_id_table), }, diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c index ad7abae69078..8ff612d160b0 100644 --- a/drivers/input/keyboard/tc3589x-keypad.c +++ b/drivers/input/keyboard/tc3589x-keypad.c @@ -505,7 +505,6 @@ static SIMPLE_DEV_PM_OPS(tc3589x_keypad_dev_pm_ops, static struct platform_driver tc3589x_keypad_driver = { .driver = { .name = "tc3589x-keypad", - .owner = THIS_MODULE, .pm = &tc3589x_keypad_dev_pm_ops, }, .probe = tc3589x_keypad_probe, diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 9757a58bc897..f97c73bd14f8 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -822,7 +822,6 @@ static struct platform_driver tegra_kbc_driver = { .probe = tegra_kbc_probe, .driver = { .name = "tegra-kbc", - .owner = THIS_MODULE, .pm = &tegra_kbc_pm_ops, .of_match_table = tegra_kbc_of_match, }, diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index c5a11700a1bf..bbcccd67247d 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c @@ -459,7 +459,6 @@ static struct platform_driver twl4030_kp_driver = { .probe = twl4030_kp_probe, .driver = { .name = "twl4030_keypad", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(twl4030_keypad_dt_match_table), }, }; diff --git a/drivers/input/keyboard/w90p910_keypad.c b/drivers/input/keyboard/w90p910_keypad.c index e8b9d94daae7..a1ff69c53102 100644 --- a/drivers/input/keyboard/w90p910_keypad.c +++ b/drivers/input/keyboard/w90p910_keypad.c @@ -258,7 +258,6 @@ static struct platform_driver w90p910_keypad_driver = { .remove = w90p910_keypad_remove, .driver = { .name = "nuc900-kpi", - .owner = THIS_MODULE, }, }; module_platform_driver(w90p910_keypad_driver); -- cgit v1.2.1 From 776bd315a7721574d7d687dd9abf200735d12a2a Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 20 Oct 2014 16:20:40 +0200 Subject: input: misc: drop owner assignment from platform_drivers A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang --- drivers/input/misc/88pm80x_onkey.c | 1 - drivers/input/misc/88pm860x_onkey.c | 1 - drivers/input/misc/ab8500-ponkey.c | 1 - drivers/input/misc/arizona-haptics.c | 1 - drivers/input/misc/bfin_rotary.c | 1 - drivers/input/misc/cobalt_btns.c | 1 - drivers/input/misc/da9052_onkey.c | 1 - drivers/input/misc/da9055_onkey.c | 1 - drivers/input/misc/dm355evm_keys.c | 1 - drivers/input/misc/gpio-beeper.c | 1 - drivers/input/misc/gpio_tilt_polled.c | 1 - drivers/input/misc/ideapad_slidebar.c | 1 - drivers/input/misc/ixp4xx-beeper.c | 1 - drivers/input/misc/m68kspkr.c | 1 - drivers/input/misc/max77693-haptic.c | 1 - drivers/input/misc/max8925_onkey.c | 1 - drivers/input/misc/max8997_haptic.c | 1 - drivers/input/misc/mc13783-pwrbutton.c | 1 - drivers/input/misc/palmas-pwrbutton.c | 1 - drivers/input/misc/pcap_keys.c | 1 - drivers/input/misc/pcspkr.c | 1 - drivers/input/misc/pm8xxx-vibrator.c | 1 - drivers/input/misc/pmic8xxx-pwrkey.c | 1 - drivers/input/misc/pwm-beeper.c | 1 - drivers/input/misc/rb532_button.c | 1 - drivers/input/misc/retu-pwrbutton.c | 1 - drivers/input/misc/rotary_encoder.c | 1 - drivers/input/misc/sgi_btns.c | 1 - drivers/input/misc/sirfsoc-onkey.c | 1 - drivers/input/misc/soc_button_array.c | 1 - drivers/input/misc/sparcspkr.c | 2 -- drivers/input/misc/twl4030-pwrbutton.c | 1 - drivers/input/misc/twl4030-vibra.c | 1 - drivers/input/misc/twl6040-vibra.c | 1 - drivers/input/misc/wistron_btns.c | 1 - drivers/input/misc/wm831x-on.c | 1 - 36 files changed, 37 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/88pm80x_onkey.c b/drivers/input/misc/88pm80x_onkey.c index ee43e5b7c881..cf9908f1e5d5 100644 --- a/drivers/input/misc/88pm80x_onkey.c +++ b/drivers/input/misc/88pm80x_onkey.c @@ -153,7 +153,6 @@ static int pm80x_onkey_remove(struct platform_device *pdev) static struct platform_driver pm80x_onkey_driver = { .driver = { .name = "88pm80x-onkey", - .owner = THIS_MODULE, .pm = &pm80x_onkey_pm_ops, }, .probe = pm80x_onkey_probe, diff --git a/drivers/input/misc/88pm860x_onkey.c b/drivers/input/misc/88pm860x_onkey.c index 220ce0fa15d9..cfdca6e99779 100644 --- a/drivers/input/misc/88pm860x_onkey.c +++ b/drivers/input/misc/88pm860x_onkey.c @@ -138,7 +138,6 @@ static SIMPLE_DEV_PM_OPS(pm860x_onkey_pm_ops, pm860x_onkey_suspend, pm860x_onkey static struct platform_driver pm860x_onkey_driver = { .driver = { .name = "88pm860x-onkey", - .owner = THIS_MODULE, .pm = &pm860x_onkey_pm_ops, }, .probe = pm860x_onkey_probe, diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c index 95ef7dd6442d..1f7e15ca5fbe 100644 --- a/drivers/input/misc/ab8500-ponkey.c +++ b/drivers/input/misc/ab8500-ponkey.c @@ -123,7 +123,6 @@ static const struct of_device_id ab8500_ponkey_match[] = { static struct platform_driver ab8500_ponkey_driver = { .driver = { .name = "ab8500-poweron-key", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(ab8500_ponkey_match), }, .probe = ab8500_ponkey_probe, diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c index ef2e281b0a43..4dbbed74c9e4 100644 --- a/drivers/input/misc/arizona-haptics.c +++ b/drivers/input/misc/arizona-haptics.c @@ -225,7 +225,6 @@ static struct platform_driver arizona_haptics_driver = { .remove = arizona_haptics_remove, .driver = { .name = "arizona-haptics", - .owner = THIS_MODULE, }, }; module_platform_driver(arizona_haptics_driver); diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c index e69d9bcb37e1..3f4351579372 100644 --- a/drivers/input/misc/bfin_rotary.c +++ b/drivers/input/misc/bfin_rotary.c @@ -256,7 +256,6 @@ static struct platform_driver bfin_rotary_device_driver = { .remove = bfin_rotary_remove, .driver = { .name = "bfin-rotary", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &bfin_rotary_pm_ops, #endif diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c index 3e11510ff82d..fbe72afc9347 100644 --- a/drivers/input/misc/cobalt_btns.c +++ b/drivers/input/misc/cobalt_btns.c @@ -157,7 +157,6 @@ static struct platform_driver cobalt_buttons_driver = { .remove = cobalt_buttons_remove, .driver = { .name = "Cobalt buttons", - .owner = THIS_MODULE, }, }; module_platform_driver(cobalt_buttons_driver); diff --git a/drivers/input/misc/da9052_onkey.c b/drivers/input/misc/da9052_onkey.c index 184c8f21ab59..266e07fdc182 100644 --- a/drivers/input/misc/da9052_onkey.c +++ b/drivers/input/misc/da9052_onkey.c @@ -149,7 +149,6 @@ static struct platform_driver da9052_onkey_driver = { .remove = da9052_onkey_remove, .driver = { .name = "da9052-onkey", - .owner = THIS_MODULE, }, }; module_platform_driver(da9052_onkey_driver); diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c index 4765799fef74..3251a9693f45 100644 --- a/drivers/input/misc/da9055_onkey.c +++ b/drivers/input/misc/da9055_onkey.c @@ -157,7 +157,6 @@ static struct platform_driver da9055_onkey_driver = { .remove = da9055_onkey_remove, .driver = { .name = "da9055-onkey", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c index 0eba94f581df..b6b7bd4e5462 100644 --- a/drivers/input/misc/dm355evm_keys.c +++ b/drivers/input/misc/dm355evm_keys.c @@ -263,7 +263,6 @@ static struct platform_driver dm355evm_keys_driver = { .probe = dm355evm_keys_probe, .remove = dm355evm_keys_remove, .driver = { - .owner = THIS_MODULE, .name = "dm355evm_keys", }, }; diff --git a/drivers/input/misc/gpio-beeper.c b/drivers/input/misc/gpio-beeper.c index 8886af63eae3..4817c5f0c3e4 100644 --- a/drivers/input/misc/gpio-beeper.c +++ b/drivers/input/misc/gpio-beeper.c @@ -112,7 +112,6 @@ MODULE_DEVICE_TABLE(of, gpio_beeper_of_match); static struct platform_driver gpio_beeper_platform_driver = { .driver = { .name = BEEPER_MODNAME, - .owner = THIS_MODULE, .of_match_table = of_match_ptr(gpio_beeper_of_match), }, .probe = gpio_beeper_probe, diff --git a/drivers/input/misc/gpio_tilt_polled.c b/drivers/input/misc/gpio_tilt_polled.c index 1a81d9115226..f103b99d1852 100644 --- a/drivers/input/misc/gpio_tilt_polled.c +++ b/drivers/input/misc/gpio_tilt_polled.c @@ -199,7 +199,6 @@ static struct platform_driver gpio_tilt_polled_driver = { .remove = gpio_tilt_polled_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/misc/ideapad_slidebar.c b/drivers/input/misc/ideapad_slidebar.c index edfd6239f131..b0acb878d1cf 100644 --- a/drivers/input/misc/ideapad_slidebar.c +++ b/drivers/input/misc/ideapad_slidebar.c @@ -272,7 +272,6 @@ static int ideapad_remove(struct platform_device *pdev) static struct platform_driver slidebar_drv = { .driver = { .name = "ideapad_slidebar", - .owner = THIS_MODULE, }, .remove = ideapad_remove, }; diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c index ed8e5e8449d3..1fe149f3def2 100644 --- a/drivers/input/misc/ixp4xx-beeper.c +++ b/drivers/input/misc/ixp4xx-beeper.c @@ -168,7 +168,6 @@ static void ixp4xx_spkr_shutdown(struct platform_device *dev) static struct platform_driver ixp4xx_spkr_platform_driver = { .driver = { .name = "ixp4xx-beeper", - .owner = THIS_MODULE, }, .probe = ixp4xx_spkr_probe, .remove = ixp4xx_spkr_remove, diff --git a/drivers/input/misc/m68kspkr.c b/drivers/input/misc/m68kspkr.c index def21dc84522..312d63623038 100644 --- a/drivers/input/misc/m68kspkr.c +++ b/drivers/input/misc/m68kspkr.c @@ -100,7 +100,6 @@ static void m68kspkr_shutdown(struct platform_device *dev) static struct platform_driver m68kspkr_platform_driver = { .driver = { .name = "m68kspkr", - .owner = THIS_MODULE, }, .probe = m68kspkr_probe, .remove = m68kspkr_remove, diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 7b1fde93799e..bdc403041139 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -344,7 +344,6 @@ static SIMPLE_DEV_PM_OPS(max77693_haptic_pm_ops, static struct platform_driver max77693_haptic_driver = { .driver = { .name = "max77693-haptic", - .owner = THIS_MODULE, .pm = &max77693_haptic_pm_ops, }, .probe = max77693_haptic_probe, diff --git a/drivers/input/misc/max8925_onkey.c b/drivers/input/misc/max8925_onkey.c index 3809618e6a5d..297e2a9169d5 100644 --- a/drivers/input/misc/max8925_onkey.c +++ b/drivers/input/misc/max8925_onkey.c @@ -168,7 +168,6 @@ static SIMPLE_DEV_PM_OPS(max8925_onkey_pm_ops, max8925_onkey_suspend, max8925_on static struct platform_driver max8925_onkey_driver = { .driver = { .name = "max8925-onkey", - .owner = THIS_MODULE, .pm = &max8925_onkey_pm_ops, }, .probe = max8925_onkey_probe, diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c index a363ebbd9cc0..5b3154edf822 100644 --- a/drivers/input/misc/max8997_haptic.c +++ b/drivers/input/misc/max8997_haptic.c @@ -401,7 +401,6 @@ MODULE_DEVICE_TABLE(i2c, max8997_haptic_id); static struct platform_driver max8997_haptic_driver = { .driver = { .name = "max8997-haptic", - .owner = THIS_MODULE, .pm = &max8997_haptic_pm_ops, }, .probe = max8997_haptic_probe, diff --git a/drivers/input/misc/mc13783-pwrbutton.c b/drivers/input/misc/mc13783-pwrbutton.c index 0df6e8d8bd03..afdf8ef25ee8 100644 --- a/drivers/input/misc/mc13783-pwrbutton.c +++ b/drivers/input/misc/mc13783-pwrbutton.c @@ -258,7 +258,6 @@ static struct platform_driver mc13783_pwrbutton_driver = { .remove = mc13783_pwrbutton_remove, .driver = { .name = "mc13783-pwrbutton", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c index f505ac3a8d87..066c5ab632c8 100644 --- a/drivers/input/misc/palmas-pwrbutton.c +++ b/drivers/input/misc/palmas-pwrbutton.c @@ -319,7 +319,6 @@ static struct platform_driver palmas_pwron_driver = { .remove = palmas_pwron_remove, .driver = { .name = "palmas_pwrbutton", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(of_palmas_pwr_match), .pm = &palmas_pwron_pm, }, diff --git a/drivers/input/misc/pcap_keys.c b/drivers/input/misc/pcap_keys.c index cd230365166e..3b81daf67726 100644 --- a/drivers/input/misc/pcap_keys.c +++ b/drivers/input/misc/pcap_keys.c @@ -121,7 +121,6 @@ static struct platform_driver pcap_keys_device_driver = { .remove = pcap_keys_remove, .driver = { .name = "pcap-keys", - .owner = THIS_MODULE, } }; module_platform_driver(pcap_keys_device_driver); diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c index 674a2cfc3c0e..72b1fc3ab910 100644 --- a/drivers/input/misc/pcspkr.c +++ b/drivers/input/misc/pcspkr.c @@ -125,7 +125,6 @@ static const struct dev_pm_ops pcspkr_pm_ops = { static struct platform_driver pcspkr_platform_driver = { .driver = { .name = "pcspkr", - .owner = THIS_MODULE, .pm = &pcspkr_pm_ops, }, .probe = pcspkr_probe, diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c index 6a915ba31bba..e9c77a95717e 100644 --- a/drivers/input/misc/pm8xxx-vibrator.c +++ b/drivers/input/misc/pm8xxx-vibrator.c @@ -224,7 +224,6 @@ static struct platform_driver pm8xxx_vib_driver = { .probe = pm8xxx_vib_probe, .driver = { .name = "pm8xxx-vib", - .owner = THIS_MODULE, .pm = &pm8xxx_vib_pm_ops, .of_match_table = pm8xxx_vib_id_table, }, diff --git a/drivers/input/misc/pmic8xxx-pwrkey.c b/drivers/input/misc/pmic8xxx-pwrkey.c index c91e3d33aea9..cb799177cbd5 100644 --- a/drivers/input/misc/pmic8xxx-pwrkey.c +++ b/drivers/input/misc/pmic8xxx-pwrkey.c @@ -195,7 +195,6 @@ static struct platform_driver pmic8xxx_pwrkey_driver = { .remove = pmic8xxx_pwrkey_remove, .driver = { .name = "pm8xxx-pwrkey", - .owner = THIS_MODULE, .pm = &pm8xxx_pwr_key_pm_ops, .of_match_table = pm8xxx_pwr_key_id_table, }, diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c index 8ef288e7c971..294aa48bad50 100644 --- a/drivers/input/misc/pwm-beeper.c +++ b/drivers/input/misc/pwm-beeper.c @@ -187,7 +187,6 @@ static struct platform_driver pwm_beeper_driver = { .remove = pwm_beeper_remove, .driver = { .name = "pwm-beeper", - .owner = THIS_MODULE, .pm = PWM_BEEPER_PM_OPS, .of_match_table = of_match_ptr(pwm_beeper_match), }, diff --git a/drivers/input/misc/rb532_button.c b/drivers/input/misc/rb532_button.c index 83fff38b86b3..e956e81cd4e6 100644 --- a/drivers/input/misc/rb532_button.c +++ b/drivers/input/misc/rb532_button.c @@ -96,7 +96,6 @@ static struct platform_driver rb532_button_driver = { .remove = rb532_button_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, }, }; module_platform_driver(rb532_button_driver); diff --git a/drivers/input/misc/retu-pwrbutton.c b/drivers/input/misc/retu-pwrbutton.c index 4bff1aa9b0db..0c8ac60e2639 100644 --- a/drivers/input/misc/retu-pwrbutton.c +++ b/drivers/input/misc/retu-pwrbutton.c @@ -85,7 +85,6 @@ static struct platform_driver retu_pwrbutton_driver = { .remove = retu_pwrbutton_remove, .driver = { .name = "retu-pwrbutton", - .owner = THIS_MODULE, }, }; module_platform_driver(retu_pwrbutton_driver); diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index 93558a1c7f70..f27f81ee84ed 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c @@ -325,7 +325,6 @@ static struct platform_driver rotary_encoder_driver = { .remove = rotary_encoder_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, .of_match_table = of_match_ptr(rotary_encoder_of_match), } }; diff --git a/drivers/input/misc/sgi_btns.c b/drivers/input/misc/sgi_btns.c index f10474937a64..7bbe79d89f5c 100644 --- a/drivers/input/misc/sgi_btns.c +++ b/drivers/input/misc/sgi_btns.c @@ -157,7 +157,6 @@ static struct platform_driver sgi_buttons_driver = { .remove = sgi_buttons_remove, .driver = { .name = "sgibtns", - .owner = THIS_MODULE, }, }; module_platform_driver(sgi_buttons_driver); diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c index fed5102e1802..4faf9f8d1240 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c @@ -205,7 +205,6 @@ static struct platform_driver sirfsoc_pwrc_driver = { .remove = sirfsoc_pwrc_remove, .driver = { .name = "sirfsoc-pwrc", - .owner = THIS_MODULE, .pm = &sirfsoc_pwrc_pm_ops, .of_match_table = sirfsoc_pwrc_of_match, } diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index 735604753568..e9e4d6a6741e 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -214,7 +214,6 @@ static struct platform_driver soc_button_driver = { .remove = soc_button_remove, .driver = { .name = KBUILD_MODNAME, - .owner = THIS_MODULE, .acpi_match_table = ACPI_PTR(soc_button_acpi_match), }, }; diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index 179ff1cd6f6b..54116e544c96 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c @@ -257,7 +257,6 @@ static const struct of_device_id bbc_beep_match[] = { static struct platform_driver bbc_beep_driver = { .driver = { .name = "bbcbeep", - .owner = THIS_MODULE, .of_match_table = bbc_beep_match, }, .probe = bbc_beep_probe, @@ -337,7 +336,6 @@ static const struct of_device_id grover_beep_match[] = { static struct platform_driver grover_beep_driver = { .driver = { .name = "groverbeep", - .owner = THIS_MODULE, .of_match_table = grover_beep_match, }, .probe = grover_beep_probe, diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index fb3b63b2f85c..380580e77f9f 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c @@ -101,7 +101,6 @@ static struct platform_driver twl4030_pwrbutton_driver = { .probe = twl4030_pwrbutton_probe, .driver = { .name = "twl4030_pwrbutton", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(twl4030_pwrbutton_dt_match_table), }, }; diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index 960ef2a70910..ccd6dd18f8f6 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c @@ -253,7 +253,6 @@ static struct platform_driver twl4030_vibra_driver = { .probe = twl4030_vibra_probe, .driver = { .name = "twl4030-vibra", - .owner = THIS_MODULE, .pm = &twl4030_vibra_pm_ops, }, }; diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index 6d26eecc278c..96e0e0c0ccb1 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c @@ -388,7 +388,6 @@ static struct platform_driver twl6040_vibra_driver = { .probe = twl6040_vibra_probe, .driver = { .name = "twl6040-vibra", - .owner = THIS_MODULE, .pm = &twl6040_vibra_pm_ops, }, }; diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 7b7add5061a5..e25f87ba19f6 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c @@ -1347,7 +1347,6 @@ static const struct dev_pm_ops wistron_pm_ops = { static struct platform_driver wistron_driver = { .driver = { .name = "wistron-bios", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &wistron_pm_ops, #endif diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c index 173b6dcca0da..59d4f7bcb4a3 100644 --- a/drivers/input/misc/wm831x-on.c +++ b/drivers/input/misc/wm831x-on.c @@ -138,7 +138,6 @@ static struct platform_driver wm831x_on_driver = { .remove = wm831x_on_remove, .driver = { .name = "wm831x-on", - .owner = THIS_MODULE, }, }; module_platform_driver(wm831x_on_driver); -- cgit v1.2.1 From 128562fb2ad542ab66f293fa2fec92e0ea3e531c Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 20 Oct 2014 16:20:40 +0200 Subject: input: mouse: drop owner assignment from platform_drivers A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang --- drivers/input/mouse/amimouse.c | 1 - drivers/input/mouse/gpio_mouse.c | 1 - drivers/input/mouse/navpoint.c | 1 - 3 files changed, 3 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index 62ec52b2e347..a7fd8f22ba56 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c @@ -141,7 +141,6 @@ static struct platform_driver amimouse_driver = { .remove = __exit_p(amimouse_remove), .driver = { .name = "amiga-mouse", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c index 8c7d94200bdb..ced07391304b 100644 --- a/drivers/input/mouse/gpio_mouse.c +++ b/drivers/input/mouse/gpio_mouse.c @@ -171,7 +171,6 @@ static struct platform_driver gpio_mouse_device_driver = { .remove = gpio_mouse_remove, .driver = { .name = "gpio_mouse", - .owner = THIS_MODULE, } }; module_platform_driver(gpio_mouse_device_driver); diff --git a/drivers/input/mouse/navpoint.c b/drivers/input/mouse/navpoint.c index 1ccc88af1f0b..2a0360f5b5f7 100644 --- a/drivers/input/mouse/navpoint.c +++ b/drivers/input/mouse/navpoint.c @@ -355,7 +355,6 @@ static struct platform_driver navpoint_driver = { .remove = navpoint_remove, .driver = { .name = "navpoint", - .owner = THIS_MODULE, .pm = &navpoint_pm_ops, }, }; -- cgit v1.2.1 From 947a0687d19f7bc589183f1f0e2ca46e59cf8310 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 20 Oct 2014 16:20:41 +0200 Subject: input: serio: drop owner assignment from platform_drivers A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang --- drivers/input/serio/altera_ps2.c | 1 - drivers/input/serio/apbps2.c | 1 - drivers/input/serio/arc_ps2.c | 1 - drivers/input/serio/at32psif.c | 1 - drivers/input/serio/ct82c710.c | 1 - drivers/input/serio/i8042-sparcio.h | 1 - drivers/input/serio/i8042.c | 1 - drivers/input/serio/maceps2.c | 1 - drivers/input/serio/olpc_apsp.c | 1 - drivers/input/serio/q40kbd.c | 1 - drivers/input/serio/rpckbd.c | 1 - drivers/input/serio/xilinx_ps2.c | 1 - 12 files changed, 12 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index cce69d6b9587..e8420ddd57f2 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c @@ -189,7 +189,6 @@ static struct platform_driver altera_ps2_driver = { .remove = altera_ps2_remove, .driver = { .name = DRV_NAME, - .owner = THIS_MODULE, .of_match_table = of_match_ptr(altera_ps2_match), }, }; diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c index 98be824544a5..45d4e08ca4f8 100644 --- a/drivers/input/serio/apbps2.c +++ b/drivers/input/serio/apbps2.c @@ -214,7 +214,6 @@ MODULE_DEVICE_TABLE(of, apbps2_of_match); static struct platform_driver apbps2_of_driver = { .driver = { .name = "grlib-apbps2", - .owner = THIS_MODULE, .of_match_table = apbps2_of_match, }, .probe = apbps2_of_probe, diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c index 8024a6d7fccb..99e57a418753 100644 --- a/drivers/input/serio/arc_ps2.c +++ b/drivers/input/serio/arc_ps2.c @@ -266,7 +266,6 @@ MODULE_DEVICE_TABLE(of, arc_ps2_match); static struct platform_driver arc_ps2_driver = { .driver = { .name = "arc_ps2", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(arc_ps2_match), }, .probe = arc_ps2_probe, diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index 3290b287ac4b..2e4ff5bac754 100644 --- a/drivers/input/serio/at32psif.c +++ b/drivers/input/serio/at32psif.c @@ -352,7 +352,6 @@ static struct platform_driver psif_driver = { .remove = __exit_p(psif_remove), .driver = { .name = "atmel_psif", - .owner = THIS_MODULE, .pm = &psif_pm_ops, }, }; diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c index cfe549d4eaa5..9c54c43c9749 100644 --- a/drivers/input/serio/ct82c710.c +++ b/drivers/input/serio/ct82c710.c @@ -209,7 +209,6 @@ static int ct82c710_remove(struct platform_device *dev) static struct platform_driver ct82c710_driver = { .driver = { .name = "ct82c710", - .owner = THIS_MODULE, }, .probe = ct82c710_probe, .remove = ct82c710_remove, diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index 93cb7912703c..afcd1c1a05b2 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h @@ -99,7 +99,6 @@ MODULE_DEVICE_TABLE(of, sparc_i8042_match); static struct platform_driver sparc_i8042_driver = { .driver = { .name = "i8042", - .owner = THIS_MODULE, .of_match_table = sparc_i8042_match, }, .probe = sparc_i8042_probe, diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 9a97c2b10926..10c6852250c6 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -1463,7 +1463,6 @@ static int i8042_remove(struct platform_device *dev) static struct platform_driver i8042_driver = { .driver = { .name = "i8042", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &i8042_pm_ops, #endif diff --git a/drivers/input/serio/maceps2.c b/drivers/input/serio/maceps2.c index bc85e1cc66d8..e365c5f4cbc9 100644 --- a/drivers/input/serio/maceps2.c +++ b/drivers/input/serio/maceps2.c @@ -162,7 +162,6 @@ static int maceps2_remove(struct platform_device *dev) static struct platform_driver maceps2_driver = { .driver = { .name = "maceps2", - .owner = THIS_MODULE, }, .probe = maceps2_probe, .remove = maceps2_remove, diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c index d906f3ebc8c8..8e9a4209fcad 100644 --- a/drivers/input/serio/olpc_apsp.c +++ b/drivers/input/serio/olpc_apsp.c @@ -273,7 +273,6 @@ static struct platform_driver olpc_apsp_driver = { .remove = olpc_apsp_remove, .driver = { .name = "olpc-apsp", - .owner = THIS_MODULE, .of_match_table = olpc_apsp_dt_ids, }, }; diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index 594256c38554..5a9d521510bf 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c @@ -186,7 +186,6 @@ static int q40kbd_remove(struct platform_device *pdev) static struct platform_driver q40kbd_driver = { .driver = { .name = "q40kbd", - .owner = THIS_MODULE, }, .remove = q40kbd_remove, }; diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index e462e7791bb8..8cf964736902 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c @@ -168,7 +168,6 @@ static struct platform_driver rpckbd_driver = { .remove = rpckbd_remove, .driver = { .name = "kart", - .owner = THIS_MODULE, }, }; module_platform_driver(rpckbd_driver); diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index e6cf52ebad87..5223cbf94262 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c @@ -363,7 +363,6 @@ MODULE_DEVICE_TABLE(of, xps2_of_match); static struct platform_driver xps2_of_driver = { .driver = { .name = DRIVER_NAME, - .owner = THIS_MODULE, .of_match_table = xps2_of_match, }, .probe = xps2_of_probe, -- cgit v1.2.1 From 7b8f16c2d1a81b29035379b471226ea09817a29c Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 20 Oct 2014 16:20:41 +0200 Subject: input: touchscreen: drop owner assignment from platform_drivers A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang --- drivers/input/touchscreen/88pm860x-ts.c | 1 - drivers/input/touchscreen/atmel-wm97xx.c | 1 - drivers/input/touchscreen/da9034-ts.c | 1 - drivers/input/touchscreen/da9052_tsi.c | 1 - drivers/input/touchscreen/intel-mid-touch.c | 1 - drivers/input/touchscreen/jornada720_ts.c | 1 - drivers/input/touchscreen/lpc32xx_ts.c | 1 - drivers/input/touchscreen/mc13783_ts.c | 1 - drivers/input/touchscreen/pcap_ts.c | 1 - drivers/input/touchscreen/s3c2410_ts.c | 1 - drivers/input/touchscreen/stmpe-ts.c | 1 - drivers/input/touchscreen/sun4i-ts.c | 1 - drivers/input/touchscreen/ti_am335x_tsc.c | 1 - drivers/input/touchscreen/tps6507x-ts.c | 1 - drivers/input/touchscreen/ucb1400_ts.c | 1 - drivers/input/touchscreen/w90p910_ts.c | 1 - drivers/input/touchscreen/wm831x-ts.c | 1 - 17 files changed, 17 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/88pm860x-ts.c b/drivers/input/touchscreen/88pm860x-ts.c index 0d4a9fad4a78..251ff2aa0633 100644 --- a/drivers/input/touchscreen/88pm860x-ts.c +++ b/drivers/input/touchscreen/88pm860x-ts.c @@ -292,7 +292,6 @@ static int pm860x_touch_probe(struct platform_device *pdev) static struct platform_driver pm860x_touch_driver = { .driver = { .name = "88pm860x-touch", - .owner = THIS_MODULE, }, .probe = pm860x_touch_probe, }; diff --git a/drivers/input/touchscreen/atmel-wm97xx.c b/drivers/input/touchscreen/atmel-wm97xx.c index 279c0e42b8a7..7ec0421c0dd8 100644 --- a/drivers/input/touchscreen/atmel-wm97xx.c +++ b/drivers/input/touchscreen/atmel-wm97xx.c @@ -425,7 +425,6 @@ static struct platform_driver atmel_wm97xx_driver = { .remove = __exit_p(atmel_wm97xx_remove), .driver = { .name = "wm97xx-touch", - .owner = THIS_MODULE, .pm = &atmel_wm97xx_pm_ops, }, }; diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c index cf6f4b31db4d..8264822dc4b9 100644 --- a/drivers/input/touchscreen/da9034-ts.c +++ b/drivers/input/touchscreen/da9034-ts.c @@ -357,7 +357,6 @@ static int da9034_touch_probe(struct platform_device *pdev) static struct platform_driver da9034_touch_driver = { .driver = { .name = "da9034-touch", - .owner = THIS_MODULE, }, .probe = da9034_touch_probe, }; diff --git a/drivers/input/touchscreen/da9052_tsi.c b/drivers/input/touchscreen/da9052_tsi.c index ab64d58c3ac0..5a013bb7bcad 100644 --- a/drivers/input/touchscreen/da9052_tsi.c +++ b/drivers/input/touchscreen/da9052_tsi.c @@ -337,7 +337,6 @@ static struct platform_driver da9052_tsi_driver = { .remove = da9052_ts_remove, .driver = { .name = "da9052-tsi", - .owner = THIS_MODULE, }, }; diff --git a/drivers/input/touchscreen/intel-mid-touch.c b/drivers/input/touchscreen/intel-mid-touch.c index c38ca4a7e386..b4f0725a1c3d 100644 --- a/drivers/input/touchscreen/intel-mid-touch.c +++ b/drivers/input/touchscreen/intel-mid-touch.c @@ -644,7 +644,6 @@ static int mrstouch_probe(struct platform_device *pdev) static struct platform_driver mrstouch_driver = { .driver = { .name = "pmic_touch", - .owner = THIS_MODULE, }, .probe = mrstouch_probe, }; diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c index 651ec71a5c68..ea3b6a5b83e6 100644 --- a/drivers/input/touchscreen/jornada720_ts.c +++ b/drivers/input/touchscreen/jornada720_ts.c @@ -148,7 +148,6 @@ static struct platform_driver jornada720_ts_driver = { .probe = jornada720_ts_probe, .driver = { .name = "jornada_ts", - .owner = THIS_MODULE, }, }; module_platform_driver(jornada720_ts_driver); diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c index bb47d3442a35..24d704cd9f88 100644 --- a/drivers/input/touchscreen/lpc32xx_ts.c +++ b/drivers/input/touchscreen/lpc32xx_ts.c @@ -396,7 +396,6 @@ static struct platform_driver lpc32xx_ts_driver = { .remove = lpc32xx_ts_remove, .driver = { .name = MOD_NAME, - .owner = THIS_MODULE, .pm = LPC32XX_TS_PM_OPS, .of_match_table = of_match_ptr(lpc32xx_tsc_of_match), }, diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index d6f099c47f84..913e25a994b4 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c @@ -243,7 +243,6 @@ static int mc13783_ts_remove(struct platform_device *pdev) static struct platform_driver mc13783_ts_driver = { .remove = mc13783_ts_remove, .driver = { - .owner = THIS_MODULE, .name = MC13783_TS_NAME, }, }; diff --git a/drivers/input/touchscreen/pcap_ts.c b/drivers/input/touchscreen/pcap_ts.c index cff2376817e5..23a354a392ae 100644 --- a/drivers/input/touchscreen/pcap_ts.c +++ b/drivers/input/touchscreen/pcap_ts.c @@ -247,7 +247,6 @@ static struct platform_driver pcap_ts_driver = { .remove = pcap_ts_remove, .driver = { .name = "pcap-ts", - .owner = THIS_MODULE, .pm = PCAP_TS_PM_OPS, }, }; diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 5a69ded9b53c..bdfa27dc097b 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c @@ -422,7 +422,6 @@ MODULE_DEVICE_TABLE(platform, s3cts_driver_ids); static struct platform_driver s3c_ts_driver = { .driver = { .name = "samsung-ts", - .owner = THIS_MODULE, #ifdef CONFIG_PM .pm = &s3c_ts_pmops, #endif diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c index 42ce31afa259..2d5ff86b343f 100644 --- a/drivers/input/touchscreen/stmpe-ts.c +++ b/drivers/input/touchscreen/stmpe-ts.c @@ -384,7 +384,6 @@ static int stmpe_ts_remove(struct platform_device *pdev) static struct platform_driver stmpe_ts_driver = { .driver = { .name = STMPE_TS_NAME, - .owner = THIS_MODULE, }, .probe = stmpe_input_probe, .remove = stmpe_ts_remove, diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index 2ba826024954..28a06749ae42 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c @@ -324,7 +324,6 @@ MODULE_DEVICE_TABLE(of, sun4i_ts_of_match); static struct platform_driver sun4i_ts_driver = { .driver = { - .owner = THIS_MODULE, .name = "sun4i-ts", .of_match_table = of_match_ptr(sun4i_ts_of_match), }, diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index 2ce649520fe0..004f1346a957 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -518,7 +518,6 @@ static struct platform_driver ti_tsc_driver = { .remove = titsc_remove, .driver = { .name = "TI-am335x-tsc", - .owner = THIS_MODULE, .pm = TITSC_PM_OPS, .of_match_table = ti_tsc_dt_ids, }, diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 94cde2cb1491..4ffd829d1990 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c @@ -314,7 +314,6 @@ static int tps6507x_ts_remove(struct platform_device *pdev) static struct platform_driver tps6507x_ts_driver = { .driver = { .name = "tps6507x-ts", - .owner = THIS_MODULE, }, .probe = tps6507x_ts_probe, .remove = tps6507x_ts_remove, diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index b46c55cd1bbb..0eca00da584b 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c @@ -444,7 +444,6 @@ static struct platform_driver ucb1400_ts_driver = { .remove = ucb1400_ts_remove, .driver = { .name = "ucb1400_ts", - .owner = THIS_MODULE, .pm = &ucb1400_ts_pm_ops, }, }; diff --git a/drivers/input/touchscreen/w90p910_ts.c b/drivers/input/touchscreen/w90p910_ts.c index 003d0c3b5d08..da6004e97753 100644 --- a/drivers/input/touchscreen/w90p910_ts.c +++ b/drivers/input/touchscreen/w90p910_ts.c @@ -326,7 +326,6 @@ static struct platform_driver w90x900ts_driver = { .remove = w90x900ts_remove, .driver = { .name = "nuc900-ts", - .owner = THIS_MODULE, }, }; module_platform_driver(w90x900ts_driver); diff --git a/drivers/input/touchscreen/wm831x-ts.c b/drivers/input/touchscreen/wm831x-ts.c index 1b953a066b2c..1db0a1410929 100644 --- a/drivers/input/touchscreen/wm831x-ts.c +++ b/drivers/input/touchscreen/wm831x-ts.c @@ -392,7 +392,6 @@ static int wm831x_ts_remove(struct platform_device *pdev) static struct platform_driver wm831x_ts_driver = { .driver = { .name = "wm831x-touch", - .owner = THIS_MODULE, }, .probe = wm831x_ts_probe, .remove = wm831x_ts_remove, -- cgit v1.2.1 From 4668546f99df6413be19d370c448c6b4b37fb5bc Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Thu, 23 Oct 2014 08:53:13 -0700 Subject: Input: soc_button_array - update calls to gpiod_get*() Add the new flags argument to calls of (devm_)gpiod_get*(). Currently both forms (with or without the flags argument) are valid thanks to transitional macros in . These macros will be removed once all consumers are updated and the flags argument will become compulsory. Signed-off-by: Alexandre Courbot Signed-off-by: Dmitry Torokhov --- drivers/input/misc/soc_button_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index 735604753568..e097f1ab427f 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -55,7 +55,7 @@ static int soc_button_lookup_gpio(struct device *dev, int acpi_index) struct gpio_desc *desc; int gpio; - desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index); + desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS); if (IS_ERR(desc)) return PTR_ERR(desc); -- cgit v1.2.1 From 2175b0f739934e718bc27770afd3d285c470bb1b Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Fri, 24 Oct 2014 14:36:54 -0700 Subject: Input: stmpe-keypad - fix valid key line bitmask The bitmask comment says it will enable GPIO 8-14 and 16-20 for keypad use, but it actually enables GPIO 8-11 and 13-20 due to a bit error. Instead of masking of the "hole" at GPIO 12 (which is used for keypad output 4) mask of the proper "hole" at GPIO 15. Signed-off-by: Linus Walleij Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/stmpe-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/stmpe-keypad.c b/drivers/input/keyboard/stmpe-keypad.c index c6727dda68f2..ef5e67fb567e 100644 --- a/drivers/input/keyboard/stmpe-keypad.c +++ b/drivers/input/keyboard/stmpe-keypad.c @@ -86,7 +86,7 @@ static const struct stmpe_keypad_variant stmpe_keypad_variants[] = { .max_cols = 8, .max_rows = 12, .col_gpios = 0x0000ff, /* GPIO 0 - 7*/ - .row_gpios = 0x1fef00, /* GPIO 8-14, 16-20 */ + .row_gpios = 0x1f7f00, /* GPIO 8-14, 16-20 */ }, [STMPE2403] = { .auto_increment = true, -- cgit v1.2.1 From 993b3a3f80a7842a48cd46c2b41e1b3ef6302468 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 24 Oct 2014 14:55:24 -0700 Subject: Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook AH544 These models need i8042.notimeout, otherwise the touchpad will not work. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=69731 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1111138 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov --- drivers/input/serio/i8042-x86ia64io.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'drivers/input') diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index a0bcbb64d06d..aa9b299f4e26 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -363,6 +363,22 @@ static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"), }, }, + { + /* Fujitsu A544 laptop */ + /* https://bugzilla.redhat.com/show_bug.cgi?id=1111138 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK A544"), + }, + }, + { + /* Fujitsu AH544 laptop */ + /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK AH544"), + }, + }, { /* Fujitsu U574 laptop */ /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */ -- cgit v1.2.1 From 859abd1d59e2db07d2e4db27074fc33568353d11 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Fri, 24 Oct 2014 15:34:39 -0700 Subject: Input: wm97xx - adapt parameters to tosa touchscreen. Sharp SL-6000 (tosa) touchscreen needs wider limits to properly map all points on the screen. Expand ranges in abs_x and abs_y arrays according to the touchscreen area. Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/wm97xx-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index d0ef91fc87d1..b1ae77995968 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c @@ -70,11 +70,11 @@ * Documentation/input/input-programming.txt for more details. */ -static int abs_x[3] = {350, 3900, 5}; +static int abs_x[3] = {150, 4000, 5}; module_param_array(abs_x, int, NULL, 0); MODULE_PARM_DESC(abs_x, "Touchscreen absolute X min, max, fuzz"); -static int abs_y[3] = {320, 3750, 40}; +static int abs_y[3] = {200, 4000, 40}; module_param_array(abs_y, int, NULL, 0); MODULE_PARM_DESC(abs_y, "Touchscreen absolute Y min, max, fuzz"); -- cgit v1.2.1 From 42b63e603e69e1a27da80dda28b18f171aac49d1 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 24 Oct 2014 14:27:25 -0700 Subject: Input: opencores-kbd - fix error handling When I was adjusting patch in 848d479361793edb79aa68140cb64d4ec9032d88 to use devm_ioremap_resource() I messed it up. Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/opencores-kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/opencores-kbd.c b/drivers/input/keyboard/opencores-kbd.c index 62abe2c16670..f8502bb29176 100644 --- a/drivers/input/keyboard/opencores-kbd.c +++ b/drivers/input/keyboard/opencores-kbd.c @@ -70,7 +70,7 @@ static int opencores_kbd_probe(struct platform_device *pdev) opencores_kbd->addr = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(opencores_kbd->addr)) - error = PTR_ERR(opencores_kbd->addr); + return PTR_ERR(opencores_kbd->addr); input->name = pdev->name; input->phys = "opencores-kbd/input0"; -- cgit v1.2.1 From 60183a6e93ac62727161d1a94abd80e2d7d901d0 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 24 Oct 2014 15:10:47 -0700 Subject: Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store() Coverity pointed out that at return point error is always 0 so the conditional is not needed. Signed-off-by: Dmitry Torokhov --- drivers/input/misc/ims-pcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index 719410feb84b..afed8e2b2f94 100644 --- a/drivers/input/misc/ims-pcu.c +++ b/drivers/input/misc/ims-pcu.c @@ -1381,7 +1381,7 @@ static ssize_t ims_pcu_ofn_reg_addr_store(struct device *dev, pcu->ofn_reg_addr = value; mutex_unlock(&pcu->cmd_mutex); - return error ?: count; + return count; } static DEVICE_ATTR(reg_addr, S_IRUGO | S_IWUSR, -- cgit v1.2.1 From 4db1f47c29bd19e2069fb877620540db2a51a572 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 24 Oct 2014 15:33:53 -0700 Subject: Input: vsxxxaa - fix code dropping bytes from queue I believe the intent of the code was to drop oldest bytes from the queue, not the latest if we drop one byte and both latest and some oldest of we are dropping more than one. Acked-by: Jan-Benedict Glaw Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/vsxxxaa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c index 38298232124f..abd494411e69 100644 --- a/drivers/input/mouse/vsxxxaa.c +++ b/drivers/input/mouse/vsxxxaa.c @@ -128,7 +128,7 @@ static void vsxxxaa_drop_bytes(struct vsxxxaa *mouse, int num) if (num >= mouse->count) { mouse->count = 0; } else { - memmove(mouse->buf, mouse->buf + num - 1, BUFLEN - num); + memmove(mouse->buf, mouse->buf + num, BUFLEN - num); mouse->count -= num; } } -- cgit v1.2.1 From 185af4d6668e4805d18d1bdf21dfec89d680fee3 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 24 Oct 2014 17:20:27 -0700 Subject: Input: psmouse - remove unneeded check in psmouse_reconnect() psmouse_reconnect() will not be called if psmouse driver is not bound to the serio port, so there is no point in checking that. Also, as coded, it introduces potential NULL dereference in psmouse_dbg() in case psmouse is indeed NULL. Let's just remove it. Detected by Coverity: CID 146528 Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/psmouse-base.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 26994f6a2b2a..95a3a6e2faf6 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -1536,16 +1536,9 @@ static int psmouse_reconnect(struct serio *serio) { struct psmouse *psmouse = serio_get_drvdata(serio); struct psmouse *parent = NULL; - struct serio_driver *drv = serio->drv; unsigned char type; int rc = -1; - if (!drv || !psmouse) { - psmouse_dbg(psmouse, - "reconnect request, but serio is disconnected, ignoring...\n"); - return -1; - } - mutex_lock(&psmouse_mutex); if (serio->parent && serio->id.type == SERIO_PS_PSTHRU) { -- cgit v1.2.1 From fbefc5e7e63228d56963eeb0db10209ea0fafe9d Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 28 Oct 2014 09:27:58 -0700 Subject: Input: max77693-haptic - fix potential overflow Expression haptic->pwm_dev->period * haptic->magnitude is of type 'unsigned int' and may overflow. We need to convert one of the operands to u64 before multiplying, instead of casting result (potentially overflown) to u64. Reported by Coverity: CID 1248753 Acked-by : Jaewon Kim Reviewed-by: Chanwoo Choi Signed-off-by: Dmitry Torokhov --- drivers/input/misc/max77693-haptic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 7b1fde93799e..ef6a9d650d69 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -194,7 +194,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) { struct max77693_haptic *haptic = input_get_drvdata(dev); - uint64_t period_mag_multi; + u64 period_mag_multi; haptic->magnitude = effect->u.rumble.strong_magnitude; if (!haptic->magnitude) @@ -205,8 +205,7 @@ static int max77693_haptic_play_effect(struct input_dev *dev, void *data, * The formula to convert magnitude to pwm_duty as follows: * - pwm_duty = (magnitude * pwm_period) / MAX_MAGNITUDE(0xFFFF) */ - period_mag_multi = (int64_t)(haptic->pwm_dev->period * - haptic->magnitude); + period_mag_multi = (u64)haptic->pwm_dev->period * haptic->magnitude; haptic->pwm_duty = (unsigned int)(period_mag_multi >> MAX_MAGNITUDE_SHIFT); -- cgit v1.2.1 From d0269b8475020718afd7f559064698f5500fa879 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 31 Oct 2014 09:16:19 -0700 Subject: Input: altera_ps2 - write to correct register when disabling interrupts In altera_ps2_close, the data register (offset 0) is written instead of the control register (offset 4), leading to the RX interrupt not being disabled. Fix this by calling writel() with the offset for the proper register. Signed-off-by: Tobias Klauser Signed-off-by: Dmitry Torokhov --- drivers/input/serio/altera_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index cce69d6b9587..e0371e182a2a 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c @@ -74,7 +74,7 @@ static void altera_ps2_close(struct serio *io) { struct ps2if *ps2if = io->port_data; - writel(0, ps2if->base); /* disable rx irq */ + writel(0, ps2if->base + 4); /* disable rx irq */ } /* -- cgit v1.2.1 From 5f77fc456cd6d3f6961459d2d279f2698c545184 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 31 Oct 2014 09:16:41 -0700 Subject: Input: altera_ps2 - use correct type for irq return value The irq function altera_ps2_rxint returns an irqreturn_t, so use the same type for variable storing the return value. Signed-off-by: Tobias Klauser Signed-off-by: Dmitry Torokhov --- drivers/input/serio/altera_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index e0371e182a2a..58781c8a8aec 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c @@ -37,7 +37,7 @@ static irqreturn_t altera_ps2_rxint(int irq, void *dev_id) { struct ps2if *ps2if = dev_id; unsigned int status; - int handled = IRQ_NONE; + irqreturn_t handled = IRQ_NONE; while ((status = readl(ps2if->base)) & 0xffff0000) { serio_interrupt(ps2if->io, status & 0xff, 0); -- cgit v1.2.1 From e55a3366984cda7d179e194a772f5ae4fe551b80 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 31 Oct 2014 09:35:53 -0700 Subject: Revert "Input: i8042 - disable active multiplexing by default" This reverts commit 68da166491655bc54051bf04c78ce648e2e33508. It turns out that the assertion about scope of regressions due to always keeping keyboard controller in legacy mode was proven wrong. There are laptops, such as Clevo W650SH, that only have internal touchpad (no external PS/2 ports), that require active multiplexing mode to switch the touchpad (Elantech) into native mode instead of basic PS/2 emulation. Reported-by: Roel Aaij Signed-off-by: Dmitry Torokhov --- drivers/input/serio/i8042-x86ia64io.h | 281 +++++++++++++++++++++++++++++++++- drivers/input/serio/i8042.c | 2 +- 2 files changed, 274 insertions(+), 9 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index aa9b299f4e26..faeeb1372462 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -207,17 +207,282 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { }; /* - * Some laptops do implement active multiplexing mode correctly; - * unfortunately they are in minority. + * Some Fujitsu notebooks are having trouble with touchpads if + * active multiplexing mode is activated. Luckily they don't have + * external PS/2 ports so we can safely disable it. + * ... apparently some Toshibas don't like MUX mode either and + * die horrible death on reboot. */ -static const struct dmi_system_id __initconst i8042_dmi_mux_table[] = { +static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { + { + /* Fujitsu Lifebook P7010/P7010D */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "P7010"), + }, + }, + { + /* Fujitsu Lifebook P7010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"), + }, + }, + { + /* Fujitsu Lifebook P5020D */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"), + }, + }, + { + /* Fujitsu Lifebook S2000 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"), + }, + }, + { + /* Fujitsu Lifebook S6230 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"), + }, + }, + { + /* Fujitsu T70H */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), + }, + }, + { + /* Fujitsu-Siemens Lifebook T3010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"), + }, + }, + { + /* Fujitsu-Siemens Lifebook E4010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"), + }, + }, + { + /* Fujitsu-Siemens Amilo Pro 2010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"), + }, + }, + { + /* Fujitsu-Siemens Amilo Pro 2030 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"), + }, + }, + { + /* + * No data is coming from the touchscreen unless KBC + * is in legacy mode. + */ + /* Panasonic CF-29 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"), + DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"), + }, + }, + { + /* + * HP Pavilion DV4017EA - + * errors on MUX ports are reported without raising AUXDATA + * causing "spurious NAK" messages. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"), + }, + }, + { + /* + * HP Pavilion ZT1000 - + * like DV4017EA does not raise AUXERR for errors on MUX ports. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"), + DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook ZT1000"), + }, + }, { /* - * Panasonic CF-18 needs to be in MUX mode since the - * touchscreen is on serio3 and it also has touchpad. + * HP Pavilion DV4270ca - + * like DV4017EA does not raise AUXERR for errors on MUX ports. */ .matches = { - DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C850D"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"), + DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"), + }, + }, + { + /* Sharp Actius MM20 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "SHARP"), + DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"), + }, + }, + { + /* Sony Vaio FS-115b */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"), + }, + }, + { + /* + * Sony Vaio FZ-240E - + * reset and GET ID commands issued via KBD port are + * sometimes being delivered to AUX3. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"), + }, + }, + { + /* + * Most (all?) VAIOs do not have external PS/2 ports nor + * they implement active multiplexing properly, and + * MUX discovery usually messes up keyboard/touchpad. + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_BOARD_NAME, "VAIO"), + }, + }, + { + /* Amoi M636/A737 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), + DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"), + }, + }, + { + /* Lenovo 3000 n100 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "076804U"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"), + }, + }, + { + /* Acer Aspire 5710 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710"), + }, + }, + { + /* Gericom Bellagio */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Gericom"), + DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"), + }, + }, + { + /* IBM 2656 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), + DMI_MATCH(DMI_PRODUCT_NAME, "2656"), + }, + }, + { + /* Dell XPS M1530 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"), + }, + }, + { + /* Compal HEL80I */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"), + DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"), + }, + }, + { + /* Dell Vostro 1510 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"), + }, + }, + { + /* Acer Aspire 5536 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"), + DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), + }, + }, + { + /* Dell Vostro V13 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V13"), + }, + }, + { + /* Newer HP Pavilion dv4 models */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"), + }, + }, + { + /* Asus X450LCP */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_PRODUCT_NAME, "X450LCP"), + }, + }, + { + /* Avatar AVIU-145A6 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Intel"), + DMI_MATCH(DMI_PRODUCT_NAME, "IC4I"), }, }, { } @@ -756,8 +1021,8 @@ static int __init i8042_platform_init(void) if (dmi_check_system(i8042_dmi_noloop_table)) i8042_noloop = true; - if (dmi_check_system(i8042_dmi_mux_table)) - i8042_nomux = false; + if (dmi_check_system(i8042_dmi_nomux_table)) + i8042_nomux = true; if (dmi_check_system(i8042_dmi_notimeout_table)) i8042_notimeout = true; diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 9a97c2b10926..f5a98af3b325 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -39,7 +39,7 @@ static bool i8042_noaux; module_param_named(noaux, i8042_noaux, bool, 0); MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port."); -static bool i8042_nomux = true; +static bool i8042_nomux; module_param_named(nomux, i8042_nomux, bool, 0); MODULE_PARM_DESC(nomux, "Do not check whether an active multiplexing controller is present."); -- cgit v1.2.1 From 633a21d80b4a2cd648aa2dacdb22494ffb2f28f0 Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Tue, 21 Oct 2014 23:30:25 +0200 Subject: input: gpio_keys_polled: Add support for GPIO descriptors GPIO descriptors are the preferred way over legacy GPIO numbers nowadays. Convert the driver to use GPIO descriptors internally but still allow passing legacy GPIO numbers from platform data to support existing platforms. Signed-off-by: Aaron Lu Signed-off-by: Mika Westerberg Acked-by: Alexandre Courbot Reviewed-by: Linus Walleij Acked-by: Dmitry Torokhov Acked-by: Grant Likely Signed-off-by: Rafael J. Wysocki --- drivers/input/keyboard/gpio_keys_polled.c | 39 +++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index 432d36395f35..b7a514ced509 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -51,15 +52,14 @@ static void gpio_keys_polled_check_state(struct input_dev *input, int state; if (bdata->can_sleep) - state = !!gpio_get_value_cansleep(button->gpio); + state = !!gpiod_get_value_cansleep(button->gpiod); else - state = !!gpio_get_value(button->gpio); + state = !!gpiod_get_value(button->gpiod); if (state != bdata->last_state) { unsigned int type = button->type ?: EV_KEY; - input_event(input, type, button->code, - !!(state ^ button->active_low)); + input_event(input, type, button->code, state); input_sync(input); bdata->count = 0; bdata->last_state = state; @@ -259,7 +259,6 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) for (i = 0; i < pdata->nbuttons; i++) { struct gpio_keys_button *button = &pdata->buttons[i]; struct gpio_keys_button_data *bdata = &bdev->data[i]; - unsigned int gpio = button->gpio; unsigned int type = button->type ?: EV_KEY; if (button->wakeup) { @@ -267,15 +266,31 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) return -EINVAL; } - error = devm_gpio_request_one(&pdev->dev, gpio, GPIOF_IN, - button->desc ? : DRV_NAME); - if (error) { - dev_err(dev, "unable to claim gpio %u, err=%d\n", - gpio, error); - return error; + /* + * Legacy GPIO number so request the GPIO here and + * convert it to descriptor. + */ + if (!button->gpiod && gpio_is_valid(button->gpio)) { + unsigned flags = 0; + + if (button->active_low) + flags |= GPIOF_ACTIVE_LOW; + + error = devm_gpio_request_one(&pdev->dev, button->gpio, + flags, button->desc ? : DRV_NAME); + if (error) { + dev_err(dev, "unable to claim gpio %u, err=%d\n", + button->gpio, error); + return error; + } + + button->gpiod = gpio_to_desc(button->gpio); } - bdata->can_sleep = gpio_cansleep(gpio); + if (IS_ERR(button->gpiod)) + return PTR_ERR(button->gpiod); + + bdata->can_sleep = gpiod_cansleep(button->gpiod); bdata->last_state = -1; bdata->threshold = DIV_ROUND_UP(button->debounce_interval, pdata->poll_interval); -- cgit v1.2.1 From b26d4e2283b6d9b65bfe14b99c9c3a560e390a00 Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Tue, 21 Oct 2014 13:34:00 +0200 Subject: input: gpio_keys_polled: Make use of device property API Make use of device property API in this driver so that both OF based system and ACPI based system can use this driver. Signed-off-by: Aaron Lu Signed-off-by: Mika Westerberg Acked-by: Dmitry Torokhov Acked-by: Grant Likely Signed-off-by: Rafael J. Wysocki --- drivers/input/keyboard/gpio_keys_polled.c | 73 ++++++++++--------------------- 1 file changed, 24 insertions(+), 49 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index b7a514ced509..c9c1c8ca7267 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -25,9 +25,7 @@ #include #include #include -#include -#include -#include +#include #define DRV_NAME "gpio-keys-polled" @@ -102,21 +100,15 @@ static void gpio_keys_polled_close(struct input_polled_dev *dev) pdata->disable(bdev->dev); } -#ifdef CONFIG_OF static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct device *dev) { - struct device_node *node, *pp; struct gpio_keys_platform_data *pdata; struct gpio_keys_button *button; + struct fwnode_handle *child; int error; int nbuttons; - int i; - - node = dev->of_node; - if (!node) - return NULL; - nbuttons = of_get_child_count(node); + nbuttons = device_get_child_node_count(dev); if (nbuttons == 0) return NULL; @@ -126,52 +118,44 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct return ERR_PTR(-ENOMEM); pdata->buttons = (struct gpio_keys_button *)(pdata + 1); - pdata->nbuttons = nbuttons; - pdata->rep = !!of_get_property(node, "autorepeat", NULL); - of_property_read_u32(node, "poll-interval", &pdata->poll_interval); + pdata->rep = device_property_present(dev, "autorepeat"); + device_property_read_u32(dev, "poll-interval", &pdata->poll_interval); - i = 0; - for_each_child_of_node(node, pp) { - int gpio; - enum of_gpio_flags flags; - - if (!of_find_property(pp, "gpios", NULL)) { - pdata->nbuttons--; - dev_warn(dev, "Found button without gpios\n"); - continue; - } + device_for_each_child_node(dev, child) { + struct gpio_desc *desc; - gpio = of_get_gpio_flags(pp, 0, &flags); - if (gpio < 0) { - error = gpio; + desc = devm_get_gpiod_from_child(dev, child); + if (IS_ERR(desc)) { + error = PTR_ERR(desc); if (error != -EPROBE_DEFER) dev_err(dev, "Failed to get gpio flags, error: %d\n", error); + fwnode_handle_put(child); return ERR_PTR(error); } - button = &pdata->buttons[i++]; + button = &pdata->buttons[pdata->nbuttons++]; + button->gpiod = desc; - button->gpio = gpio; - button->active_low = flags & OF_GPIO_ACTIVE_LOW; - - if (of_property_read_u32(pp, "linux,code", &button->code)) { - dev_err(dev, "Button without keycode: 0x%x\n", - button->gpio); + if (fwnode_property_read_u32(child, "linux,code", &button->code)) { + dev_err(dev, "Button without keycode: %d\n", + pdata->nbuttons - 1); + fwnode_handle_put(child); return ERR_PTR(-EINVAL); } - button->desc = of_get_property(pp, "label", NULL); + fwnode_property_read_string(child, "label", &button->desc); - if (of_property_read_u32(pp, "linux,input-type", &button->type)) + if (fwnode_property_read_u32(child, "linux,input-type", + &button->type)) button->type = EV_KEY; - button->wakeup = !!of_get_property(pp, "gpio-key,wakeup", NULL); + button->wakeup = fwnode_property_present(child, "gpio-key,wakeup"); - if (of_property_read_u32(pp, "debounce-interval", - &button->debounce_interval)) + if (fwnode_property_read_u32(child, "debounce-interval", + &button->debounce_interval)) button->debounce_interval = 5; } @@ -187,15 +171,6 @@ static const struct of_device_id gpio_keys_polled_of_match[] = { }; MODULE_DEVICE_TABLE(of, gpio_keys_polled_of_match); -#else - -static inline struct gpio_keys_platform_data * -gpio_keys_polled_get_devtree_pdata(struct device *dev) -{ - return NULL; -} -#endif - static int gpio_keys_polled_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -323,7 +298,7 @@ static struct platform_driver gpio_keys_polled_driver = { .driver = { .name = DRV_NAME, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(gpio_keys_polled_of_match), + .of_match_table = gpio_keys_polled_of_match, }, }; module_platform_driver(gpio_keys_polled_driver); -- cgit v1.2.1 From e4742b1e786ca386e88e6cfb2801e14e15e365cd Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 6 Nov 2014 09:27:11 -0800 Subject: Input: synaptics - add min/max quirk for Lenovo T440s The new Lenovo T440s laptop has a different PnP ID "LEN0039", and it needs the similar min/max quirk to make its clickpad working. BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=903748 Reported-and-tested-by: Joschi Brauchle Cc: Signed-off-by: Takashi Iwai Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/synaptics.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 9031a0a28ea4..2a7a9174c702 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -135,8 +135,8 @@ static const struct min_max_quirk min_max_pnpid_table[] = { 1232, 5710, 1156, 4696 }, { - (const char * const []){"LEN0034", "LEN0036", "LEN2002", - "LEN2004", NULL}, + (const char * const []){"LEN0034", "LEN0036", "LEN0039", + "LEN2002", "LEN2004", NULL}, 1024, 5112, 2024, 4832 }, { @@ -163,6 +163,7 @@ static const char * const topbuttonpad_pnp_ids[] = { "LEN0036", /* T440 */ "LEN0037", "LEN0038", + "LEN0039", /* T440s */ "LEN0041", "LEN0042", /* Yoga */ "LEN0045", -- cgit v1.2.1 From c42bfd7f6cd26e8f712fc184460e32845d928d17 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 7 Nov 2014 15:46:56 -0800 Subject: Input: twl4030-pwrbutton - ensure a wakeup event is recorded. This button is treated as a wakeup source, so we need to initialise it correctly. Without the device_init_wakeup() call, dev->power.wakeup will be NULL, and pm_wakeup_event() will do nothing. Signed-off-by: NeilBrown Signed-off-by: Dmitry Torokhov --- drivers/input/misc/twl4030-pwrbutton.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/input') diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index fb3b63b2f85c..8400a1a34d87 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c @@ -85,6 +85,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, pwr); + device_init_wakeup(&pdev->dev, true); return 0; } -- cgit v1.2.1 From caeb0d37fa3e387eb0dd22e5d497523c002033d1 Mon Sep 17 00:00:00 2001 From: Ulrik De Bie Date: Fri, 7 Nov 2014 23:51:34 -0800 Subject: Input: elantech - use elantech_report_trackpoint for hardware v4 too The Fujitsu H730 has hardware v4 with a trackpoint. This enables the elantech_report_trackpoint for v4. Reported-by: Stefan Valouch Tested-by: Stefan Valouch Tested-by: Alfredo Gemma Signed-off-by: Ulrik De Bie Acked-by: Hans de Goede Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/elantech.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 06fc6e76ffbe..53ddff91ab2e 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -792,6 +792,9 @@ static int elantech_packet_check_v4(struct psmouse *psmouse) unsigned char packet_type = packet[3] & 0x03; bool sanity_check; + if ((packet[3] & 0x0f) == 0x06) + return PACKET_TRACKPOINT; + /* * Sanity check based on the constant bits of a packet. * The constant bits change depending on the value of @@ -877,10 +880,19 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse) case 4: packet_type = elantech_packet_check_v4(psmouse); - if (packet_type == PACKET_UNKNOWN) + switch (packet_type) { + case PACKET_UNKNOWN: return PSMOUSE_BAD_DATA; - elantech_report_absolute_v4(psmouse, packet_type); + case PACKET_TRACKPOINT: + elantech_report_trackpoint(psmouse, packet_type); + break; + + default: + elantech_report_absolute_v4(psmouse, packet_type); + break; + } + break; } -- cgit v1.2.1 From 0dc1587905a50f8f61bbc29e850aa592821e4bea Mon Sep 17 00:00:00 2001 From: Ulrik De Bie Date: Fri, 7 Nov 2014 23:57:34 -0800 Subject: Input: elantech - fix crc_enabled for Fujitsu H730 The Fujitsu H730 does not work with crc_enabled = 0, even though the crc_enabled bit in the firmware version indicated it would. When switching this value to crc_enabled to 1, the touchpad works. This patch uses DMI to detect H730. Reported-by: Stefan Valouch Tested-by: Stefan Valouch Tested-by: Alfredo Gemma Signed-off-by: Ulrik De Bie Acked-by: Hans de Goede Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/elantech.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 53ddff91ab2e..ce699eba9adc 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1450,6 +1450,22 @@ static int elantech_reconnect(struct psmouse *psmouse) return 0; } +/* + * Some hw_version 4 models do not work with crc_disabled + */ +static const struct dmi_system_id elantech_dmi_force_crc_enabled[] = { +#if defined(CONFIG_DMI) && defined(CONFIG_X86) + { + /* Fujitsu H730 does not work with crc_enabled == 0 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H730"), + }, + }, +#endif + { } +}; + /* * Some hw_version 3 models go into error state when we try to set * bit 3 and/or bit 1 of r10. @@ -1525,7 +1541,8 @@ static int elantech_set_properties(struct elantech_data *etd) * The signatures of v3 and v4 packets change depending on the * value of this hardware flag. */ - etd->crc_enabled = ((etd->fw_version & 0x4000) == 0x4000); + etd->crc_enabled = (etd->fw_version & 0x4000) == 0x4000 || + dmi_check_system(elantech_dmi_force_crc_enabled); /* Enable real hardware resolution on hw_version 3 ? */ etd->set_hw_resolution = !dmi_check_system(no_hw_res_dmi_table); -- cgit v1.2.1 From 4ab8f7f320f91f279c3f06a9795cfea5c972888a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Sat, 8 Nov 2014 12:45:23 -0800 Subject: Input: alps - ignore potential bare packets when device is out of sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5th and 6th byte of ALPS trackstick V3 protocol match condition for first byte of PS/2 3 bytes packet. When driver enters out of sync state and ALPS trackstick is sending data then driver match 5th, 6th and next 1st bytes as PS/2. It basically means if user is using trackstick when driver is in out of sync state driver will never resync. Processing these bytes as 3 bytes PS/2 data cause total mess (random cursor movements, random clicks) and make trackstick unusable until psmouse driver decide to do full device reset. Lot of users reported problems with ALPS devices on Dell Latitude E6440, E6540 and E7440 laptops. ALPS device or Dell EC for unknown reason send some invalid ALPS PS/2 bytes which cause driver out of sync. It looks like that i8042 and psmouse/alps driver always receive group of 6 bytes packets so there are no missing bytes and no bytes were inserted between valid ones. This patch does not fix root of problem with ALPS devices found in Dell Latitude laptops but it does not allow to process some (invalid) subsequence of 6 bytes ALPS packets as 3 bytes PS/2 when driver is out of sync. So with this patch trackstick input device does not report bogus data when also driver is out of sync, so trackstick should be usable on those machines. Signed-off-by: Pali Rohár Tested-by: Pali Rohár Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/alps.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 2b0ae8cc8e51..da18c977e7b8 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -1156,7 +1156,13 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; - if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */ + /* + * Check if we are dealing with a bare PS/2 packet, presumably from + * a device connected to the external PS/2 port. Because bare PS/2 + * protocol does not have enough constant bits to self-synchronize + * properly we only do this if the device is fully synchronized. + */ + if (!psmouse->out_of_sync_cnt && (psmouse->packet[0] & 0xc8) == 0x08) { if (psmouse->pktcnt == 3) { alps_report_bare_ps2_packet(psmouse, psmouse->packet, true); -- cgit v1.2.1 From 9d720b34c0a432639252f63012e18b0507f5b432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Sat, 8 Nov 2014 12:58:57 -0800 Subject: Input: alps - allow up to 2 invalid packets without resetting device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On some Dell Latitude laptops ALPS device or Dell EC send one invalid byte in 6 bytes ALPS packet. In this case psmouse driver enter out of sync state. It looks like that all other bytes in packets are valid and also device working properly. So there is no need to do full device reset, just need to wait for byte which match condition for first byte (start of packet). Because ALPS packets are bigger (6 or 8 bytes) default limit is small. This patch increase number of invalid bytes to size of 2 ALPS packets which psmouse driver can drop before do full reset. Resetting ALPS devices take some time and when doing reset on some Dell laptops touchpad, trackstick and also keyboard do not respond. So it is better to do it only if really necessary. Signed-off-by: Pali Rohár Tested-by: Pali Rohár Reviewed-by: Hans de Goede Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/alps.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/input') diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index da18c977e7b8..433638e7e4af 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -2395,6 +2395,9 @@ int alps_init(struct psmouse *psmouse) /* We are having trouble resyncing ALPS touchpads so disable it for now */ psmouse->resync_time = 0; + /* Allow 2 invalid packets without resetting device */ + psmouse->resetafter = psmouse->pktsize * 2; + return 0; init_fail: -- cgit v1.2.1 From a7ef82aee91f26da79b981b9f5bca43b8817d3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Sat, 8 Nov 2014 23:36:09 -0800 Subject: Input: alps - ignore bad data on Dell Latitudes E6440 and E7440 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes on Dell Latitude laptops psmouse/alps driver receive invalid ALPS protocol V3 packets with bit7 set in last byte. More often it can be reproduced on Dell Latitude E6440 or E7440 with closed lid and pushing cover above touchpad. If bit7 in last packet byte is set then it is not valid ALPS packet. I was told that ALPS devices never send these packets. It is not know yet who send those packets, it could be Dell EC, bug in BIOS and also bug in touchpad firmware... With this patch alps driver does not process those invalid packets, but instead of reporting PSMOUSE_BAD_DATA, getting into out of sync state, getting back in sync with the next byte and spam dmesg we return PSMOUSE_FULL_PACKET. If driver is truly out of sync we'll fail the checks on the next byte and report PSMOUSE_BAD_DATA then. Signed-off-by: Pali Rohár Tested-by: Pali Rohár Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/alps.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 433638e7e4af..d125a019383f 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -1186,12 +1186,27 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) } /* Bytes 2 - pktsize should have 0 in the highest bit */ - if ((priv->proto_version < ALPS_PROTO_V5) && + if (priv->proto_version < ALPS_PROTO_V5 && psmouse->pktcnt >= 2 && psmouse->pktcnt <= psmouse->pktsize && (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) { psmouse_dbg(psmouse, "refusing packet[%i] = %x\n", psmouse->pktcnt - 1, psmouse->packet[psmouse->pktcnt - 1]); + + if (priv->proto_version == ALPS_PROTO_V3 && + psmouse->pktcnt == psmouse->pktsize) { + /* + * Some Dell boxes, such as Latitude E6440 or E7440 + * with closed lid, quite often smash last byte of + * otherwise valid packet with 0xff. Given that the + * next packet is very likely to be valid let's + * report PSMOUSE_FULL_PACKET but not process data, + * rather than reporting PSMOUSE_BAD_DATA and + * filling the logs. + */ + return PSMOUSE_FULL_PACKET; + } + return PSMOUSE_BAD_DATA; } -- cgit v1.2.1 From f386474e12a560e005ec7899e78f51f6bdc3cf41 Mon Sep 17 00:00:00 2001 From: Ulrik De Bie Date: Thu, 13 Nov 2014 17:45:12 -0800 Subject: Input: elantech - report the middle button of the touchpad In the past, no elantech was known with 3 touchpad mouse buttons. Fujitsu H730 is the first known elantech with a middle button. This commit enables this middle button. For backwards compatibility, the Fujitsu is detected via DMI, and only for this one 3 buttons will be announced. Reported-by: Stefan Valouch Signed-off-by: Ulrik De Bie Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/elantech.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'drivers/input') diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index ce699eba9adc..6d628f155c08 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -563,6 +563,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse) } else { input_report_key(dev, BTN_LEFT, packet[0] & 0x01); input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); + input_report_key(dev, BTN_MIDDLE, packet[0] & 0x04); } input_mt_report_pointer_emulation(dev, true); @@ -1131,6 +1132,22 @@ static void elantech_set_buttonpad_prop(struct psmouse *psmouse) } } +/* + * Some hw_version 4 models do have a middle button + */ +static const struct dmi_system_id elantech_dmi_has_middle_button[] = { +#if defined(CONFIG_DMI) && defined(CONFIG_X86) + { + /* Fujitsu H730 has a middle button */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H730"), + }, + }, +#endif + { } +}; + /* * Set the appropriate event bits for the input subsystem */ @@ -1150,6 +1167,8 @@ static int elantech_set_input_params(struct psmouse *psmouse) __clear_bit(EV_REL, dev->evbit); __set_bit(BTN_LEFT, dev->keybit); + if (dmi_check_system(elantech_dmi_has_middle_button)) + __set_bit(BTN_MIDDLE, dev->keybit); __set_bit(BTN_RIGHT, dev->keybit); __set_bit(BTN_TOUCH, dev->keybit); -- cgit v1.2.1 From 2d9eb81fdb9f08df3a4b1638c1270a4453b40ac2 Mon Sep 17 00:00:00 2001 From: Ulrik De Bie Date: Thu, 13 Nov 2014 17:47:04 -0800 Subject: Input: elantech - provide a sysfs knob for crc_enabled The detection of crc_enabled is known to fail for Fujitsu H730. A DMI blacklist is added for that, but it can be expected that other laptops will pop up with this. Here a sysfs knob is provided to alter the behaviour of crc_enabled. Writing 0 or 1 to it sets the variable to 0 or 1. Reading it will show the crc_enabled variable (0 or 1). Reported-by: Stefan Valouch Signed-off-by: Ulrik De Bie Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/elantech.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/input') diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 6d628f155c08..3fcb6b3cb0bd 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1330,6 +1330,7 @@ ELANTECH_INT_ATTR(reg_25, 0x25); ELANTECH_INT_ATTR(reg_26, 0x26); ELANTECH_INT_ATTR(debug, 0); ELANTECH_INT_ATTR(paritycheck, 0); +ELANTECH_INT_ATTR(crc_enabled, 0); static struct attribute *elantech_attrs[] = { &psmouse_attr_reg_07.dattr.attr, @@ -1344,6 +1345,7 @@ static struct attribute *elantech_attrs[] = { &psmouse_attr_reg_26.dattr.attr, &psmouse_attr_debug.dattr.attr, &psmouse_attr_paritycheck.dattr.attr, + &psmouse_attr_crc_enabled.dattr.attr, NULL }; -- cgit v1.2.1 From bce4f9e764c36bc35dd5c9cf9e057c09f422397d Mon Sep 17 00:00:00 2001 From: Ben Sagal Date: Sun, 16 Nov 2014 17:23:40 -0800 Subject: Input: synaptics - adjust min/max on Thinkpad E540 The LEN2006 Synaptics touchpad (as found in Thinkpad E540) returns wrong min max values. touchpad-edge-detector output: > Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6 > Move one finger around the touchpad to detect the actual edges > Kernel says: x [1472..5674], y [1408..4684] > Touchpad sends: x [1264..5675], y [1171..4688] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88211 Cc: stable@vger.kernel.org Signed-off-by: Binyamin Sagal Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/synaptics.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/input') diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 2a7a9174c702..f9472920d986 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -143,6 +143,10 @@ static const struct min_max_quirk min_max_pnpid_table[] = { (const char * const []){"LEN2001", NULL}, 1024, 5022, 2508, 4832 }, + { + (const char * const []){"LEN2006", NULL}, + 1264, 5675, 1171, 4688 + }, { } }; -- cgit v1.2.1 From d0ab54783f2de0c216115333eca1a8d3d5c3e75b Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 19 Nov 2014 23:33:07 -0800 Subject: Input: elantech - trust firmware about trackpoint presence Only try to parse data as coming from trackpoint if firmware told us that trackpoint is present. Fixes commit caeb0d37fa3e387eb0dd22e5d497523c002033d1 Reported-and-tested-by: Marcus Overhagen Reported-and-tested-by: Anders Kaseorg Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/elantech.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 3fcb6b3cb0bd..f2b978026407 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -428,14 +428,6 @@ static void elantech_report_trackpoint(struct psmouse *psmouse, int x, y; u32 t; - if (dev_WARN_ONCE(&psmouse->ps2dev.serio->dev, - !tp_dev, - psmouse_fmt("Unexpected trackpoint message\n"))) { - if (etd->debug == 1) - elantech_packet_dump(psmouse); - return; - } - t = get_unaligned_le32(&packet[0]); switch (t & ~7U) { @@ -793,7 +785,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse) unsigned char packet_type = packet[3] & 0x03; bool sanity_check; - if ((packet[3] & 0x0f) == 0x06) + if (etd->tp_dev && (packet[3] & 0x0f) == 0x06) return PACKET_TRACKPOINT; /* -- cgit v1.2.1 From a1f9a4072655843fc03186acbad65990cc05dd2d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 25 Nov 2014 00:38:17 -0800 Subject: Input: xpad - use proper endpoint type The xpad wireless endpoint is not a bulk endpoint on my devices, but rather an interrupt one, so the USB core complains when it is submitted. I'm guessing that the author really did mean that this should be an interrupt urb, but as there are a zillion different xpad devices out there, let's cover out bases and handle both bulk and interrupt endpoints just as easily. Signed-off-by: "Pierre-Loup A. Griffais" Signed-off-by: Greg Kroah-Hartman Cc: stable Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/xpad.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 2ed7905a068f..fc55f0d15b70 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1179,9 +1179,19 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id } ep_irq_in = &intf->cur_altsetting->endpoint[1].desc; - usb_fill_bulk_urb(xpad->bulk_out, udev, - usb_sndbulkpipe(udev, ep_irq_in->bEndpointAddress), - xpad->bdata, XPAD_PKT_LEN, xpad_bulk_out, xpad); + if (usb_endpoint_is_bulk_out(ep_irq_in)) { + usb_fill_bulk_urb(xpad->bulk_out, udev, + usb_sndbulkpipe(udev, + ep_irq_in->bEndpointAddress), + xpad->bdata, XPAD_PKT_LEN, + xpad_bulk_out, xpad); + } else { + usb_fill_int_urb(xpad->bulk_out, udev, + usb_sndintpipe(udev, + ep_irq_in->bEndpointAddress), + xpad->bdata, XPAD_PKT_LEN, + xpad_bulk_out, xpad, 0); + } /* * Submit the int URB immediately rather than waiting for open -- cgit v1.2.1 From 92788ac1eb06e69a822de45e2a8a63fa45eb5be2 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 2 Dec 2014 15:59:31 -0800 Subject: drivers/input/evdev.c: don't kfree() a vmalloc address If kzalloc() failed and then evdev_open_device() fails, evdev_open() will pass a vmalloc'ed pointer to kfree. This might fix https://bugzilla.kernel.org/show_bug.cgi?id=88401, where there was a crash in kfree(). Reported-by: Christian Casteyde Belatedly-Acked-by: Dmitry Torokhov Cc: Henrik Rydberg Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/input/evdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index bc203485716d..8afa28e4570e 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -421,7 +421,7 @@ static int evdev_open(struct inode *inode, struct file *file) err_free_client: evdev_detach_client(evdev, client); - kfree(client); + kvfree(client); return error; } -- cgit v1.2.1 From dc5686e45dd9e0bba765bf8b5ef5250e1b4112d8 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 4 Dec 2014 01:09:12 +0100 Subject: input / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. The alternative of CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME may be replaced with CONFIG_PM too. Make these changes in 2 files under drivers/input/. Signed-off-by: Rafael J. Wysocki Reviewed-by: Jingoo Han Reviewed-by: Ferruh Yigit Acked-by: Dmitry Torokhov --- drivers/input/keyboard/samsung-keypad.c | 2 +- drivers/input/touchscreen/cyttsp4_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index 5e80fbf7b5ed..c994e3bbd776 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c @@ -463,7 +463,7 @@ static int samsung_keypad_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static int samsung_keypad_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index a035a390f8e2..568a3d340c8a 100644 --- a/drivers/input/touchscreen/cyttsp4_core.c +++ b/drivers/input/touchscreen/cyttsp4_core.c @@ -1716,7 +1716,7 @@ static void cyttsp4_free_si_ptrs(struct cyttsp4 *cd) kfree(si->btn_rec_data); } -#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME) +#ifdef CONFIG_PM static int cyttsp4_core_sleep(struct cyttsp4 *cd) { int rc; -- cgit v1.2.1 From cceeb872d60f77f9305d9e138c7d0acee1d60038 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Fri, 26 Dec 2014 15:41:42 -0800 Subject: Input: hil_kbd - fix incorrect use of init_completion The successive init_completion calls should be reinit_completion calls. Signed-off-by: Nicholas Mc Guire Acked-by: Helge Deller Tested-by: Helge Deller Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/hil_kbd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c index 610a8af795a1..5b152f25a8e1 100644 --- a/drivers/input/keyboard/hil_kbd.c +++ b/drivers/input/keyboard/hil_kbd.c @@ -473,7 +473,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv) if (error) goto bail1; - init_completion(&dev->cmd_done); + reinit_completion(&dev->cmd_done); serio_write(serio, 0); serio_write(serio, 0); serio_write(serio, HIL_PKT_CMD >> 8); @@ -482,7 +482,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv) if (error) goto bail1; - init_completion(&dev->cmd_done); + reinit_completion(&dev->cmd_done); serio_write(serio, 0); serio_write(serio, 0); serio_write(serio, HIL_PKT_CMD >> 8); @@ -491,7 +491,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv) if (error) goto bail1; - init_completion(&dev->cmd_done); + reinit_completion(&dev->cmd_done); serio_write(serio, 0); serio_write(serio, 0); serio_write(serio, HIL_PKT_CMD >> 8); -- cgit v1.2.1 From 7f4054836d811c650c51f9c93088f8ebd61b0020 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 31 Dec 2014 12:59:34 -0800 Subject: Revert "Input: atmel_mxt_ts - use deep sleep mode when stopped" This reverts commit 9d469d033d135d80742a4e39e6bbb4519dd5eee1. It breaks the Chromebook Pixel touchpad (and touchscreen). Reported-by: Dirk Hohndel Bisected-by: Linus Torvalds Cc: Nick Dyer Cc: Benson Leung Cc: Yufeng Shen Cc: Dmitry Torokhov Cc: stable@vger.kernel.org # v3.16+ Signed-off-by: Linus Torvalds --- drivers/input/touchscreen/atmel_mxt_ts.c | 99 +++++++++----------------------- 1 file changed, 26 insertions(+), 73 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index bb070206223c..95ee92a91bd2 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -99,13 +99,9 @@ #define MXT_T6_STATUS_COMSERR (1 << 2) /* MXT_GEN_POWER_T7 field */ -struct t7_config { - u8 idle; - u8 active; -} __packed; - -#define MXT_POWER_CFG_RUN 0 -#define MXT_POWER_CFG_DEEPSLEEP 1 +#define MXT_POWER_IDLEACQINT 0 +#define MXT_POWER_ACTVACQINT 1 +#define MXT_POWER_ACTV2IDLETO 2 /* MXT_GEN_ACQUIRE_T8 field */ #define MXT_ACQUIRE_CHRGTIME 0 @@ -117,6 +113,7 @@ struct t7_config { #define MXT_ACQUIRE_ATCHCALSTHR 7 /* MXT_TOUCH_MULTI_T9 field */ +#define MXT_TOUCH_CTRL 0 #define MXT_T9_ORIENT 9 #define MXT_T9_RANGE 18 @@ -256,7 +253,6 @@ struct mxt_data { bool update_input; u8 last_message_count; u8 num_touchids; - struct t7_config t7_cfg; /* Cached parameters from object table */ u16 T5_address; @@ -672,6 +668,20 @@ static void mxt_proc_t6_messages(struct mxt_data *data, u8 *msg) data->t6_status = status; } +static int mxt_write_object(struct mxt_data *data, + u8 type, u8 offset, u8 val) +{ + struct mxt_object *object; + u16 reg; + + object = mxt_get_object(data, type); + if (!object || offset >= mxt_obj_size(object)) + return -EINVAL; + + reg = object->start_address; + return mxt_write_reg(data->client, reg + offset, val); +} + static void mxt_input_button(struct mxt_data *data, u8 *message) { struct input_dev *input = data->input_dev; @@ -1742,60 +1752,6 @@ err_free_object_table: return error; } -static int mxt_set_t7_power_cfg(struct mxt_data *data, u8 sleep) -{ - struct device *dev = &data->client->dev; - int error; - struct t7_config *new_config; - struct t7_config deepsleep = { .active = 0, .idle = 0 }; - - if (sleep == MXT_POWER_CFG_DEEPSLEEP) - new_config = &deepsleep; - else - new_config = &data->t7_cfg; - - error = __mxt_write_reg(data->client, data->T7_address, - sizeof(data->t7_cfg), new_config); - if (error) - return error; - - dev_dbg(dev, "Set T7 ACTV:%d IDLE:%d\n", - new_config->active, new_config->idle); - - return 0; -} - -static int mxt_init_t7_power_cfg(struct mxt_data *data) -{ - struct device *dev = &data->client->dev; - int error; - bool retry = false; - -recheck: - error = __mxt_read_reg(data->client, data->T7_address, - sizeof(data->t7_cfg), &data->t7_cfg); - if (error) - return error; - - if (data->t7_cfg.active == 0 || data->t7_cfg.idle == 0) { - if (!retry) { - dev_dbg(dev, "T7 cfg zero, resetting\n"); - mxt_soft_reset(data); - retry = true; - goto recheck; - } else { - dev_dbg(dev, "T7 cfg zero after reset, overriding\n"); - data->t7_cfg.active = 20; - data->t7_cfg.idle = 100; - return mxt_set_t7_power_cfg(data, MXT_POWER_CFG_RUN); - } - } - - dev_dbg(dev, "Initialized power cfg: ACTV %d, IDLE %d\n", - data->t7_cfg.active, data->t7_cfg.idle); - return 0; -} - static int mxt_configure_objects(struct mxt_data *data, const struct firmware *cfg) { @@ -1809,12 +1765,6 @@ static int mxt_configure_objects(struct mxt_data *data, dev_warn(dev, "Error %d updating config\n", error); } - error = mxt_init_t7_power_cfg(data); - if (error) { - dev_err(dev, "Failed to initialize power cfg\n"); - return error; - } - error = mxt_initialize_t9_input_device(data); if (error) return error; @@ -2093,15 +2043,16 @@ static const struct attribute_group mxt_attr_group = { static void mxt_start(struct mxt_data *data) { - mxt_set_t7_power_cfg(data, MXT_POWER_CFG_RUN); - - /* Recalibrate since chip has been in deep sleep */ - mxt_t6_command(data, MXT_COMMAND_CALIBRATE, 1, false); + /* Touch enable */ + mxt_write_object(data, + MXT_TOUCH_MULTI_T9, MXT_TOUCH_CTRL, 0x83); } static void mxt_stop(struct mxt_data *data) { - mxt_set_t7_power_cfg(data, MXT_POWER_CFG_DEEPSLEEP); + /* Touch disable */ + mxt_write_object(data, + MXT_TOUCH_MULTI_T9, MXT_TOUCH_CTRL, 0); } static int mxt_input_open(struct input_dev *dev) @@ -2266,6 +2217,8 @@ static int __maybe_unused mxt_resume(struct device *dev) struct mxt_data *data = i2c_get_clientdata(client); struct input_dev *input_dev = data->input_dev; + mxt_soft_reset(data); + mutex_lock(&input_dev->mutex); if (input_dev->users) -- cgit v1.2.1