mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:30:52 +07:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov: "A few fixups for the input subsystem" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: document INPUT_PROP_TOPBUTTONPAD Input: fix defuzzing logic Input: sirfsoc-onkey - fix GPL v2 license string typo Input: st-keyscan - fix 'defined but not used' compiler warnings Input: synaptics - add min/max quirk for pnp-id LEN2002 (Edge E531) Input: i8042 - add Acer Aspire 5710 to nomux blacklist Input: ti_am335x_tsc - warn about incorrect spelling Input: wacom - cleanup multitouch code when touch_max is 2
This commit is contained in:
commit
b292d6b5c4
@ -281,6 +281,19 @@ gestures can normally be extracted from it.
|
||||
If INPUT_PROP_SEMI_MT is not set, the device is assumed to be a true MT
|
||||
device.
|
||||
|
||||
INPUT_PROP_TOPBUTTONPAD:
|
||||
-----------------------
|
||||
Some laptops, most notably the Lenovo *40 series provide a trackstick
|
||||
device but do not have physical buttons associated with the trackstick
|
||||
device. Instead, the top area of the touchpad is marked to show
|
||||
visual/haptic areas for left, middle, right buttons intended to be used
|
||||
with the trackstick.
|
||||
|
||||
If INPUT_PROP_TOPBUTTONPAD is set, userspace should emulate buttons
|
||||
accordingly. This property does not affect kernel behavior.
|
||||
The kernel does not provide button emulation for such devices but treats
|
||||
them as any other INPUT_PROP_BUTTONPAD device.
|
||||
|
||||
Guidelines:
|
||||
==========
|
||||
The guidelines below ensure proper single-touch and multi-finger functionality.
|
||||
|
@ -257,9 +257,10 @@ static int input_handle_abs_event(struct input_dev *dev,
|
||||
}
|
||||
|
||||
static int input_get_disposition(struct input_dev *dev,
|
||||
unsigned int type, unsigned int code, int value)
|
||||
unsigned int type, unsigned int code, int *pval)
|
||||
{
|
||||
int disposition = INPUT_IGNORE_EVENT;
|
||||
int value = *pval;
|
||||
|
||||
switch (type) {
|
||||
|
||||
@ -357,6 +358,7 @@ static int input_get_disposition(struct input_dev *dev,
|
||||
break;
|
||||
}
|
||||
|
||||
*pval = value;
|
||||
return disposition;
|
||||
}
|
||||
|
||||
@ -365,7 +367,7 @@ static void input_handle_event(struct input_dev *dev,
|
||||
{
|
||||
int disposition;
|
||||
|
||||
disposition = input_get_disposition(dev, type, code, value);
|
||||
disposition = input_get_disposition(dev, type, code, &value);
|
||||
|
||||
if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
|
||||
dev->event(dev, type, code, value);
|
||||
|
@ -215,6 +215,7 @@ static int keyscan_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int keyscan_suspend(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
@ -249,6 +250,7 @@ static int keyscan_resume(struct device *dev)
|
||||
mutex_unlock(&input->mutex);
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(keyscan_dev_pm_ops, keyscan_suspend, keyscan_resume);
|
||||
|
||||
|
@ -213,7 +213,7 @@ static struct platform_driver sirfsoc_pwrc_driver = {
|
||||
|
||||
module_platform_driver(sirfsoc_pwrc_driver);
|
||||
|
||||
MODULE_LICENSE("GPLv2");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Binghua Duan <Binghua.Duan@csr.com>, Xianglong Du <Xianglong.Du@csr.com>");
|
||||
MODULE_DESCRIPTION("CSR Prima2 PWRC Driver");
|
||||
MODULE_ALIAS("platform:sirfsoc-pwrc");
|
||||
|
@ -132,7 +132,8 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
|
||||
1232, 5710, 1156, 4696
|
||||
},
|
||||
{
|
||||
(const char * const []){"LEN0034", "LEN0036", "LEN2004", NULL},
|
||||
(const char * const []){"LEN0034", "LEN0036", "LEN2002",
|
||||
"LEN2004", NULL},
|
||||
1024, 5112, 2024, 4832
|
||||
},
|
||||
{
|
||||
@ -168,7 +169,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
|
||||
"LEN0049",
|
||||
"LEN2000",
|
||||
"LEN2001", /* Edge E431 */
|
||||
"LEN2002",
|
||||
"LEN2002", /* Edge E531 */
|
||||
"LEN2003",
|
||||
"LEN2004", /* L440 */
|
||||
"LEN2005",
|
||||
|
@ -401,6 +401,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
|
||||
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 = {
|
||||
|
@ -1217,9 +1217,9 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
|
||||
* a=(pi*r^2)/C.
|
||||
*/
|
||||
int a = data[5];
|
||||
int x_res = input_abs_get_res(input, ABS_X);
|
||||
int y_res = input_abs_get_res(input, ABS_Y);
|
||||
width = 2 * int_sqrt(a * WACOM_CONTACT_AREA_SCALE);
|
||||
int x_res = input_abs_get_res(input, ABS_MT_POSITION_X);
|
||||
int y_res = input_abs_get_res(input, ABS_MT_POSITION_Y);
|
||||
width = 2 * int_sqrt(a * WACOM_CONTACT_AREA_SCALE);
|
||||
height = width * y_res / x_res;
|
||||
}
|
||||
|
||||
@ -1587,7 +1587,7 @@ static void wacom_abs_set_axis(struct input_dev *input_dev,
|
||||
input_abs_set_res(input_dev, ABS_X, features->x_resolution);
|
||||
input_abs_set_res(input_dev, ABS_Y, features->y_resolution);
|
||||
} else {
|
||||
if (features->touch_max <= 2) {
|
||||
if (features->touch_max == 1) {
|
||||
input_set_abs_params(input_dev, ABS_X, 0,
|
||||
features->x_max, features->x_fuzz, 0);
|
||||
input_set_abs_params(input_dev, ABS_Y, 0,
|
||||
@ -1815,14 +1815,8 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
|
||||
case MTTPC:
|
||||
case MTTPC_B:
|
||||
case TABLETPC2FG:
|
||||
if (features->device_type == BTN_TOOL_FINGER) {
|
||||
unsigned int flags = INPUT_MT_DIRECT;
|
||||
|
||||
if (wacom_wac->features.type == TABLETPC2FG)
|
||||
flags = 0;
|
||||
|
||||
input_mt_init_slots(input_dev, features->touch_max, flags);
|
||||
}
|
||||
if (features->device_type == BTN_TOOL_FINGER && features->touch_max > 1)
|
||||
input_mt_init_slots(input_dev, features->touch_max, INPUT_MT_DIRECT);
|
||||
/* fall through */
|
||||
|
||||
case TABLETPC:
|
||||
@ -1883,10 +1877,6 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
|
||||
__set_bit(BTN_RIGHT, input_dev->keybit);
|
||||
|
||||
if (features->touch_max) {
|
||||
/* touch interface */
|
||||
unsigned int flags = INPUT_MT_POINTER;
|
||||
|
||||
__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
|
||||
if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
|
||||
input_set_abs_params(input_dev,
|
||||
ABS_MT_TOUCH_MAJOR,
|
||||
@ -1894,12 +1884,8 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
|
||||
input_set_abs_params(input_dev,
|
||||
ABS_MT_TOUCH_MINOR,
|
||||
0, features->y_max, 0, 0);
|
||||
} else {
|
||||
__set_bit(BTN_TOOL_FINGER, input_dev->keybit);
|
||||
__set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
|
||||
flags = 0;
|
||||
}
|
||||
input_mt_init_slots(input_dev, features->touch_max, flags);
|
||||
input_mt_init_slots(input_dev, features->touch_max, INPUT_MT_POINTER);
|
||||
} else {
|
||||
/* buttons/keys only interface */
|
||||
__clear_bit(ABS_X, input_dev->absbit);
|
||||
|
@ -359,9 +359,12 @@ static int titsc_parse_dt(struct platform_device *pdev,
|
||||
*/
|
||||
err = of_property_read_u32(node, "ti,coordinate-readouts",
|
||||
&ts_dev->coordinate_readouts);
|
||||
if (err < 0)
|
||||
if (err < 0) {
|
||||
dev_warn(&pdev->dev, "please use 'ti,coordinate-readouts' instead\n");
|
||||
err = of_property_read_u32(node, "ti,coordiante-readouts",
|
||||
&ts_dev->coordinate_readouts);
|
||||
}
|
||||
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user