diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-19 23:10:54 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-19 23:10:54 +0200 |
commit | c6cfaf4f86d9d15e5541adb3bb899d0b80f89ec7 (patch) | |
tree | 4d6906d1ac94afee030934116d304e9a5bbf311f /drivers/input/mouse | |
parent | Merge tag 'for-linus-5.4-1' of git://github.com/cminyard/linux-ipmi (diff) | |
parent | Merge branch 'next' into for-linus (diff) | |
download | linux-c6cfaf4f86d9d15e5541adb3bb899d0b80f89ec7.tar.xz linux-c6cfaf4f86d9d15e5541adb3bb899d0b80f89ec7.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
- input core allows hardware drivers to specify a [more precise]
timestamp (normally taken in top half) to better track velocity of
contacts
- input_dev instances now support "polling" mode so that drivers could
use the same object for polled and interrupt-driven operation. The
plan is to convert existing drivers and retire input_polled_dev API
- a new driver for the FlySky FS-iA6B RC receiver
- a refresh of BU21013 touchpad driver
- w90x900 keyboard and touchpad drivers are removed as the platform is
gone
- assorted fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (45 commits)
Input: sidewinder - make array seq static const, makes object smaller
Input: reset device timestamp on sync
Input: bu21013_ts - switch to using standard touchscreen properties
Input: bu21013_ts - switch to using MT-B (slotted) protocol
Input: bu21013_ts - fix suspend when wake source
Input: bu21013_ts - use interrupt from I2C client
Input: bu21013_ts - remove support for platform data
Input: bu21013_ts - convert to using managed resources
Input: bu21013_ts - remove useless comments
Input: bu21013_ts - annotate supend/resume methods as __maybe_unused
Input: bu21013_ts - rename some variables
Input: bu21013_ts - convert to use GPIO descriptors
ARM: ux500: improve BU21013 touchpad bindings
Input: i8042 - enable wakeup on a stable struct device
Input: soc_button_array - use platform_device_register_resndata()
Input: psmouse - drop all unneeded functions from mouse headers
Input: add support for polling to input devices
Input: wacom_w8001 - allocate additional space for 'phys'
Input: cros_ec_keyb - add back missing mask for event_type
Input: remove dev_err() usage after platform_get_irq()
...
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r-- | drivers/input/mouse/alps.h | 11 | ||||
-rw-r--r-- | drivers/input/mouse/byd.h | 11 | ||||
-rw-r--r-- | drivers/input/mouse/cyapa.c | 16 | ||||
-rw-r--r-- | drivers/input/mouse/cypress_ps2.h | 11 | ||||
-rw-r--r-- | drivers/input/mouse/elan_i2c_core.c | 20 | ||||
-rw-r--r-- | drivers/input/mouse/elantech.h | 18 | ||||
-rw-r--r-- | drivers/input/mouse/hgpk.h | 13 | ||||
-rw-r--r-- | drivers/input/mouse/lifebook.h | 13 | ||||
-rw-r--r-- | drivers/input/mouse/logips2pp.h | 7 | ||||
-rw-r--r-- | drivers/input/mouse/pxa930_trkball.c | 4 | ||||
-rw-r--r-- | drivers/input/mouse/sentelic.h | 11 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/touchkit_ps2.h | 8 | ||||
-rw-r--r-- | drivers/input/mouse/trackpoint.h | 8 | ||||
-rw-r--r-- | drivers/input/mouse/vmmouse.h | 11 |
15 files changed, 13 insertions, 151 deletions
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h index f4bab629739c..0a1048cf23f6 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h @@ -323,18 +323,7 @@ struct alps_data { #define ALPS_QUIRK_TRACKSTICK_BUTTONS 1 /* trakcstick buttons in trackstick packet */ -#ifdef CONFIG_MOUSE_PS2_ALPS int alps_detect(struct psmouse *psmouse, bool set_properties); int alps_init(struct psmouse *psmouse); -#else -inline int alps_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENOSYS; -} -inline int alps_init(struct psmouse *psmouse) -{ - return -ENOSYS; -} -#endif /* CONFIG_MOUSE_PS2_ALPS */ #endif diff --git a/drivers/input/mouse/byd.h b/drivers/input/mouse/byd.h index 8cb90d904186..ff2771e2dd2e 100644 --- a/drivers/input/mouse/byd.h +++ b/drivers/input/mouse/byd.h @@ -2,18 +2,7 @@ #ifndef _BYD_H #define _BYD_H -#ifdef CONFIG_MOUSE_PS2_BYD int byd_detect(struct psmouse *psmouse, bool set_properties); int byd_init(struct psmouse *psmouse); -#else -static inline int byd_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENOSYS; -} -static inline int byd_init(struct psmouse *psmouse) -{ - return -ENOSYS; -} -#endif /* CONFIG_MOUSE_PS2_BYD */ #endif /* _BYD_H */ diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c index dfd3873513e4..c675f156948b 100644 --- a/drivers/input/mouse/cyapa.c +++ b/drivers/input/mouse/cyapa.c @@ -1238,13 +1238,6 @@ static const struct attribute_group cyapa_sysfs_group = { .attrs = cyapa_sysfs_entries, }; -static void cyapa_remove_sysfs_group(void *data) -{ - struct cyapa *cyapa = data; - - sysfs_remove_group(&cyapa->client->dev.kobj, &cyapa_sysfs_group); -} - static void cyapa_disable_regulator(void *data) { struct cyapa *cyapa = data; @@ -1312,19 +1305,12 @@ static int cyapa_probe(struct i2c_client *client, return error; } - error = sysfs_create_group(&dev->kobj, &cyapa_sysfs_group); + error = devm_device_add_group(dev, &cyapa_sysfs_group); if (error) { dev_err(dev, "failed to create sysfs entries: %d\n", error); return error; } - error = devm_add_action(dev, cyapa_remove_sysfs_group, cyapa); - if (error) { - cyapa_remove_sysfs_group(cyapa); - dev_err(dev, "failed to add sysfs cleanup action: %d\n", error); - return error; - } - error = cyapa_prepare_wakeup_controls(cyapa); if (error) { dev_err(dev, "failed to prepare wakeup controls: %d\n", error); diff --git a/drivers/input/mouse/cypress_ps2.h b/drivers/input/mouse/cypress_ps2.h index 1eaddd818004..bb4979d06bf9 100644 --- a/drivers/input/mouse/cypress_ps2.h +++ b/drivers/input/mouse/cypress_ps2.h @@ -170,18 +170,7 @@ struct cytp_data { }; -#ifdef CONFIG_MOUSE_PS2_CYPRESS int cypress_detect(struct psmouse *psmouse, bool set_properties); int cypress_init(struct psmouse *psmouse); -#else -inline int cypress_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENOSYS; -} -inline int cypress_init(struct psmouse *psmouse) -{ - return -ENOSYS; -} -#endif /* CONFIG_MOUSE_PS2_CYPRESS */ #endif /* _CYPRESS_PS2_H */ diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index d9b103a81a79..8719da540383 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -1138,13 +1138,6 @@ static void elan_disable_regulator(void *_data) regulator_disable(data->vcc); } -static void elan_remove_sysfs_groups(void *_data) -{ - struct elan_tp_data *data = _data; - - sysfs_remove_groups(&data->client->dev.kobj, elan_sysfs_groups); -} - static int elan_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) { @@ -1194,9 +1187,8 @@ static int elan_probe(struct i2c_client *client, return error; } - error = devm_add_action(dev, elan_disable_regulator, data); + error = devm_add_action_or_reset(dev, elan_disable_regulator, data); if (error) { - regulator_disable(data->vcc); dev_err(dev, "Failed to add disable regulator action: %d\n", error); return error; @@ -1269,20 +1261,12 @@ static int elan_probe(struct i2c_client *client, return error; } - error = sysfs_create_groups(&dev->kobj, elan_sysfs_groups); + error = devm_device_add_groups(dev, elan_sysfs_groups); if (error) { dev_err(dev, "failed to create sysfs attributes: %d\n", error); return error; } - error = devm_add_action(dev, elan_remove_sysfs_groups, data); - if (error) { - elan_remove_sysfs_groups(data); - dev_err(dev, "Failed to add sysfs cleanup action: %d\n", - error); - return error; - } - error = input_register_device(data->input); if (error) { dev_err(dev, "failed to register input device: %d\n", error); diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h index 46343998522b..e0a3e59d4f1b 100644 --- a/drivers/input/mouse/elantech.h +++ b/drivers/input/mouse/elantech.h @@ -184,32 +184,18 @@ struct elantech_data { void (*original_set_rate)(struct psmouse *psmouse, unsigned int rate); }; -#ifdef CONFIG_MOUSE_PS2_ELANTECH int elantech_detect(struct psmouse *psmouse, bool set_properties); int elantech_init_ps2(struct psmouse *psmouse); + +#ifdef CONFIG_MOUSE_PS2_ELANTECH int elantech_init(struct psmouse *psmouse); #else -static inline int elantech_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENOSYS; -} static inline int elantech_init(struct psmouse *psmouse) { return -ENOSYS; } -static inline int elantech_init_ps2(struct psmouse *psmouse) -{ - return -ENOSYS; -} #endif /* CONFIG_MOUSE_PS2_ELANTECH */ -#if defined(CONFIG_MOUSE_PS2_ELANTECH_SMBUS) int elantech_init_smbus(struct psmouse *psmouse); -#else -static inline int elantech_init_smbus(struct psmouse *psmouse) -{ - return -ENOSYS; -} -#endif /* CONFIG_MOUSE_PS2_ELANTECH_SMBUS */ #endif diff --git a/drivers/input/mouse/hgpk.h b/drivers/input/mouse/hgpk.h index 98b7b384229b..ce041591f1a8 100644 --- a/drivers/input/mouse/hgpk.h +++ b/drivers/input/mouse/hgpk.h @@ -47,22 +47,15 @@ struct hgpk_data { int xsaw_secondary, ysaw_secondary; /* jumpiness detection */ }; -#ifdef CONFIG_MOUSE_PS2_OLPC -void hgpk_module_init(void); int hgpk_detect(struct psmouse *psmouse, bool set_properties); int hgpk_init(struct psmouse *psmouse); + +#ifdef CONFIG_MOUSE_PS2_OLPC +void hgpk_module_init(void); #else static inline void hgpk_module_init(void) { } -static inline int hgpk_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENODEV; -} -static inline int hgpk_init(struct psmouse *psmouse) -{ - return -ENODEV; -} #endif #endif diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h index 573f2ca1983d..d989cca62dd6 100644 --- a/drivers/input/mouse/lifebook.h +++ b/drivers/input/mouse/lifebook.h @@ -8,22 +8,15 @@ #ifndef _LIFEBOOK_H #define _LIFEBOOK_H -#ifdef CONFIG_MOUSE_PS2_LIFEBOOK -void lifebook_module_init(void); int lifebook_detect(struct psmouse *psmouse, bool set_properties); int lifebook_init(struct psmouse *psmouse); + +#ifdef CONFIG_MOUSE_PS2_LIFEBOOK +void lifebook_module_init(void); #else static inline void lifebook_module_init(void) { } -static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENOSYS; -} -static inline int lifebook_init(struct psmouse *psmouse) -{ - return -ENOSYS; -} #endif #endif diff --git a/drivers/input/mouse/logips2pp.h b/drivers/input/mouse/logips2pp.h index 5f9344135f70..df885c4874df 100644 --- a/drivers/input/mouse/logips2pp.h +++ b/drivers/input/mouse/logips2pp.h @@ -8,13 +8,6 @@ #ifndef _LOGIPS2PP_H #define _LOGIPS2PP_H -#ifdef CONFIG_MOUSE_PS2_LOGIPS2PP int ps2pp_detect(struct psmouse *psmouse, bool set_properties); -#else -static inline int ps2pp_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENOSYS; -} -#endif /* CONFIG_MOUSE_PS2_LOGIPS2PP */ #endif diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c index 87bac8cff6f7..41acde60b60f 100644 --- a/drivers/input/mouse/pxa930_trkball.c +++ b/drivers/input/mouse/pxa930_trkball.c @@ -147,10 +147,8 @@ static int pxa930_trkball_probe(struct platform_device *pdev) int irq, error; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "failed to get trkball irq\n"); + if (irq < 0) return -ENXIO; - } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h index dc88a93adf85..02cac0e7ad63 100644 --- a/drivers/input/mouse/sentelic.h +++ b/drivers/input/mouse/sentelic.h @@ -106,19 +106,8 @@ struct fsp_data { unsigned int last_mt_fgr; /* Last seen finger(multitouch) */ }; -#ifdef CONFIG_MOUSE_PS2_SENTELIC extern int fsp_detect(struct psmouse *psmouse, bool set_properties); extern int fsp_init(struct psmouse *psmouse); -#else -static inline int fsp_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENOSYS; -} -static inline int fsp_init(struct psmouse *psmouse) -{ - return -ENOSYS; -} -#endif #endif /* __KERNEL__ */ diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 46bbe99d6511..56fae3472114 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -193,7 +193,7 @@ static const char * const forcepad_pnp_ids[] = { }; /* - * Send a command to the synpatics touchpad by special commands + * Send a command to the synaptics touchpad by special commands */ static int synaptics_send_cmd(struct psmouse *psmouse, u8 cmd, u8 *param) { diff --git a/drivers/input/mouse/touchkit_ps2.h b/drivers/input/mouse/touchkit_ps2.h index 5acb76464a5b..c808fe6c782f 100644 --- a/drivers/input/mouse/touchkit_ps2.h +++ b/drivers/input/mouse/touchkit_ps2.h @@ -9,14 +9,6 @@ #ifndef _TOUCHKIT_PS2_H #define _TOUCHKIT_PS2_H -#ifdef CONFIG_MOUSE_PS2_TOUCHKIT int touchkit_ps2_detect(struct psmouse *psmouse, bool set_properties); -#else -static inline int touchkit_ps2_detect(struct psmouse *psmouse, - bool set_properties) -{ - return -ENOSYS; -} -#endif /* CONFIG_MOUSE_PS2_TOUCHKIT */ #endif diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h index 77110f3ec21d..5cb93ed26085 100644 --- a/drivers/input/mouse/trackpoint.h +++ b/drivers/input/mouse/trackpoint.h @@ -155,14 +155,6 @@ struct trackpoint_data { bool ext_dev; }; -#ifdef CONFIG_MOUSE_PS2_TRACKPOINT int trackpoint_detect(struct psmouse *psmouse, bool set_properties); -#else -static inline int trackpoint_detect(struct psmouse *psmouse, - bool set_properties) -{ - return -ENOSYS; -} -#endif /* CONFIG_MOUSE_PS2_TRACKPOINT */ #endif /* _TRACKPOINT_H */ diff --git a/drivers/input/mouse/vmmouse.h b/drivers/input/mouse/vmmouse.h index 774549a12930..90157aecade7 100644 --- a/drivers/input/mouse/vmmouse.h +++ b/drivers/input/mouse/vmmouse.h @@ -8,20 +8,9 @@ #ifndef _VMMOUSE_H #define _VMMOUSE_H -#ifdef CONFIG_MOUSE_PS2_VMMOUSE #define VMMOUSE_PSNAME "VirtualPS/2" int vmmouse_detect(struct psmouse *psmouse, bool set_properties); int vmmouse_init(struct psmouse *psmouse); -#else -static inline int vmmouse_detect(struct psmouse *psmouse, bool set_properties) -{ - return -ENOSYS; -} -static inline int vmmouse_init(struct psmouse *psmouse) -{ - return -ENOSYS; -} -#endif #endif |