Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2969869b
Commit
2969869b
authored
May 17, 2020
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-linus' into next
Merge for-linus branch to sync Elan touchscreen driver code.
parents
04e49867
d34fced4
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
87 additions
and
72 deletions
+87
-72
drivers/input/evdev.c
drivers/input/evdev.c
+4
-15
drivers/input/joystick/xpad.c
drivers/input/joystick/xpad.c
+12
-0
drivers/input/keyboard/applespi.c
drivers/input/keyboard/applespi.c
+1
-1
drivers/input/keyboard/cros_ec_keyb.c
drivers/input/keyboard/cros_ec_keyb.c
+5
-9
drivers/input/keyboard/dlink-dir685-touchkeys.c
drivers/input/keyboard/dlink-dir685-touchkeys.c
+1
-1
drivers/input/misc/axp20x-pek.c
drivers/input/misc/axp20x-pek.c
+37
-35
drivers/input/rmi4/rmi_driver.c
drivers/input/rmi4/rmi_driver.c
+3
-2
drivers/input/serio/i8042-x86ia64io.h
drivers/input/serio/i8042-x86ia64io.h
+7
-0
drivers/input/touchscreen/elants_i2c.c
drivers/input/touchscreen/elants_i2c.c
+10
-1
drivers/input/touchscreen/mms114.c
drivers/input/touchscreen/mms114.c
+5
-7
drivers/input/touchscreen/usbtouchscreen.c
drivers/input/touchscreen/usbtouchscreen.c
+1
-0
include/linux/input/lm8333.h
include/linux/input/lm8333.h
+1
-1
No files found.
drivers/input/evdev.c
View file @
2969869b
...
...
@@ -327,20 +327,6 @@ static int evdev_fasync(int fd, struct file *file, int on)
return
fasync_helper
(
fd
,
file
,
on
,
&
client
->
fasync
);
}
static
int
evdev_flush
(
struct
file
*
file
,
fl_owner_t
id
)
{
struct
evdev_client
*
client
=
file
->
private_data
;
struct
evdev
*
evdev
=
client
->
evdev
;
mutex_lock
(
&
evdev
->
mutex
);
if
(
evdev
->
exist
&&
!
client
->
revoked
)
input_flush_device
(
&
evdev
->
handle
,
file
);
mutex_unlock
(
&
evdev
->
mutex
);
return
0
;
}
static
void
evdev_free
(
struct
device
*
dev
)
{
struct
evdev
*
evdev
=
container_of
(
dev
,
struct
evdev
,
dev
);
...
...
@@ -454,6 +440,10 @@ static int evdev_release(struct inode *inode, struct file *file)
unsigned
int
i
;
mutex_lock
(
&
evdev
->
mutex
);
if
(
evdev
->
exist
&&
!
client
->
revoked
)
input_flush_device
(
&
evdev
->
handle
,
file
);
evdev_ungrab
(
evdev
,
client
);
mutex_unlock
(
&
evdev
->
mutex
);
...
...
@@ -1311,7 +1301,6 @@ static const struct file_operations evdev_fops = {
.
compat_ioctl
=
evdev_ioctl_compat
,
#endif
.
fasync
=
evdev_fasync
,
.
flush
=
evdev_flush
,
.
llseek
=
no_llseek
,
};
...
...
drivers/input/joystick/xpad.c
View file @
2969869b
...
...
@@ -458,6 +458,16 @@ static const u8 xboxone_fw2015_init[] = {
0x05
,
0x20
,
0x00
,
0x01
,
0x00
};
/*
* This packet is required for Xbox One S (0x045e:0x02ea)
* and Xbox One Elite Series 2 (0x045e:0x0b00) pads to
* initialize the controller that was previously used in
* Bluetooth mode.
*/
static
const
u8
xboxone_s_init
[]
=
{
0x05
,
0x20
,
0x00
,
0x0f
,
0x06
};
/*
* This packet is required for the Titanfall 2 Xbox One pads
* (0x0e6f:0x0165) to finish initialization and for Hori pads
...
...
@@ -516,6 +526,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
XBOXONE_INIT_PKT
(
0x0e6f
,
0x0165
,
xboxone_hori_init
),
XBOXONE_INIT_PKT
(
0x0f0d
,
0x0067
,
xboxone_hori_init
),
XBOXONE_INIT_PKT
(
0x0000
,
0x0000
,
xboxone_fw2015_init
),
XBOXONE_INIT_PKT
(
0x045e
,
0x02ea
,
xboxone_s_init
),
XBOXONE_INIT_PKT
(
0x045e
,
0x0b00
,
xboxone_s_init
),
XBOXONE_INIT_PKT
(
0x0e6f
,
0x0000
,
xboxone_pdp_init1
),
XBOXONE_INIT_PKT
(
0x0e6f
,
0x0000
,
xboxone_pdp_init2
),
XBOXONE_INIT_PKT
(
0x24c6
,
0x541a
,
xboxone_rumblebegin_init
),
...
...
drivers/input/keyboard/applespi.c
View file @
2969869b
...
...
@@ -186,7 +186,7 @@ struct touchpad_protocol {
u8
number_of_fingers
;
u8
clicked2
;
u8
unknown3
[
16
];
struct
tp_finger
fingers
[
0
];
struct
tp_finger
fingers
[];
};
/**
...
...
drivers/input/keyboard/cros_ec_keyb.c
View file @
2969869b
...
...
@@ -347,18 +347,14 @@ static int cros_ec_keyb_info(struct cros_ec_device *ec_dev,
params
->
info_type
=
info_type
;
params
->
event_type
=
event_type
;
ret
=
cros_ec_cmd_xfer
(
ec_dev
,
msg
);
if
(
ret
<
0
)
{
dev_warn
(
ec_dev
->
dev
,
"Transfer error %d/%d: %d
\n
"
,
(
int
)
info_type
,
(
int
)
event_type
,
ret
);
}
else
if
(
msg
->
result
==
EC_RES_INVALID_VERSION
)
{
ret
=
cros_ec_cmd_xfer_status
(
ec_dev
,
msg
);
if
(
ret
==
-
ENOTSUPP
)
{
/* With older ECs we just return 0 for everything */
memset
(
result
,
0
,
result_size
);
ret
=
0
;
}
else
if
(
msg
->
result
!=
EC_RES_SUCCESS
)
{
dev_warn
(
ec_dev
->
dev
,
"Error getting info %d/%d: %d
\n
"
,
(
int
)
info_type
,
(
int
)
event_type
,
msg
->
result
);
ret
=
-
EPROTO
;
}
else
if
(
ret
<
0
)
{
dev_warn
(
ec_dev
->
dev
,
"Transfer error %d/%d: %d
\n
"
,
(
int
)
info_type
,
(
int
)
event_type
,
ret
);
}
else
if
(
ret
!=
result_size
)
{
dev_warn
(
ec_dev
->
dev
,
"Wrong size %d/%d: %d != %zu
\n
"
,
(
int
)
info_type
,
(
int
)
event_type
,
...
...
drivers/input/keyboard/dlink-dir685-touchkeys.c
View file @
2969869b
...
...
@@ -143,7 +143,7 @@ MODULE_DEVICE_TABLE(of, dir685_tk_of_match);
static
struct
i2c_driver
dir685_tk_i2c_driver
=
{
.
driver
=
{
.
name
=
"dlin-dir685-touchkeys"
,
.
name
=
"dlin
k
-dir685-touchkeys"
,
.
of_match_table
=
of_match_ptr
(
dir685_tk_of_match
),
},
.
probe
=
dir685_tk_probe
,
...
...
drivers/input/misc/axp20x-pek.c
View file @
2969869b
...
...
@@ -205,8 +205,11 @@ ATTRIBUTE_GROUPS(axp20x);
static
irqreturn_t
axp20x_pek_irq
(
int
irq
,
void
*
pwr
)
{
struct
input_dev
*
idev
=
pwr
;
struct
axp20x_pek
*
axp20x_pek
=
input_get_drvdata
(
idev
);
struct
axp20x_pek
*
axp20x_pek
=
pwr
;
struct
input_dev
*
idev
=
axp20x_pek
->
input
;
if
(
!
idev
)
return
IRQ_HANDLED
;
/*
* The power-button is connected to ground so a falling edge (dbf)
...
...
@@ -225,22 +228,9 @@ static irqreturn_t axp20x_pek_irq(int irq, void *pwr)
static
int
axp20x_pek_probe_input_device
(
struct
axp20x_pek
*
axp20x_pek
,
struct
platform_device
*
pdev
)
{
struct
axp20x_dev
*
axp20x
=
axp20x_pek
->
axp20x
;
struct
input_dev
*
idev
;
int
error
;
axp20x_pek
->
irq_dbr
=
platform_get_irq_byname
(
pdev
,
"PEK_DBR"
);
if
(
axp20x_pek
->
irq_dbr
<
0
)
return
axp20x_pek
->
irq_dbr
;
axp20x_pek
->
irq_dbr
=
regmap_irq_get_virq
(
axp20x
->
regmap_irqc
,
axp20x_pek
->
irq_dbr
);
axp20x_pek
->
irq_dbf
=
platform_get_irq_byname
(
pdev
,
"PEK_DBF"
);
if
(
axp20x_pek
->
irq_dbf
<
0
)
return
axp20x_pek
->
irq_dbf
;
axp20x_pek
->
irq_dbf
=
regmap_irq_get_virq
(
axp20x
->
regmap_irqc
,
axp20x_pek
->
irq_dbf
);
axp20x_pek
->
input
=
devm_input_allocate_device
(
&
pdev
->
dev
);
if
(
!
axp20x_pek
->
input
)
return
-
ENOMEM
;
...
...
@@ -255,24 +245,6 @@ static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek,
input_set_drvdata
(
idev
,
axp20x_pek
);
error
=
devm_request_any_context_irq
(
&
pdev
->
dev
,
axp20x_pek
->
irq_dbr
,
axp20x_pek_irq
,
0
,
"axp20x-pek-dbr"
,
idev
);
if
(
error
<
0
)
{
dev_err
(
&
pdev
->
dev
,
"Failed to request dbr IRQ#%d: %d
\n
"
,
axp20x_pek
->
irq_dbr
,
error
);
return
error
;
}
error
=
devm_request_any_context_irq
(
&
pdev
->
dev
,
axp20x_pek
->
irq_dbf
,
axp20x_pek_irq
,
0
,
"axp20x-pek-dbf"
,
idev
);
if
(
error
<
0
)
{
dev_err
(
&
pdev
->
dev
,
"Failed to request dbf IRQ#%d: %d
\n
"
,
axp20x_pek
->
irq_dbf
,
error
);
return
error
;
}
error
=
input_register_device
(
idev
);
if
(
error
)
{
dev_err
(
&
pdev
->
dev
,
"Can't register input device: %d
\n
"
,
...
...
@@ -280,8 +252,6 @@ static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek,
return
error
;
}
device_init_wakeup
(
&
pdev
->
dev
,
true
);
return
0
;
}
...
...
@@ -339,6 +309,18 @@ static int axp20x_pek_probe(struct platform_device *pdev)
axp20x_pek
->
axp20x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
axp20x_pek
->
irq_dbr
=
platform_get_irq_byname
(
pdev
,
"PEK_DBR"
);
if
(
axp20x_pek
->
irq_dbr
<
0
)
return
axp20x_pek
->
irq_dbr
;
axp20x_pek
->
irq_dbr
=
regmap_irq_get_virq
(
axp20x_pek
->
axp20x
->
regmap_irqc
,
axp20x_pek
->
irq_dbr
);
axp20x_pek
->
irq_dbf
=
platform_get_irq_byname
(
pdev
,
"PEK_DBF"
);
if
(
axp20x_pek
->
irq_dbf
<
0
)
return
axp20x_pek
->
irq_dbf
;
axp20x_pek
->
irq_dbf
=
regmap_irq_get_virq
(
axp20x_pek
->
axp20x
->
regmap_irqc
,
axp20x_pek
->
irq_dbf
);
if
(
axp20x_pek_should_register_input
(
axp20x_pek
,
pdev
))
{
error
=
axp20x_pek_probe_input_device
(
axp20x_pek
,
pdev
);
if
(
error
)
...
...
@@ -347,6 +329,26 @@ static int axp20x_pek_probe(struct platform_device *pdev)
axp20x_pek
->
info
=
(
struct
axp20x_info
*
)
match
->
driver_data
;
error
=
devm_request_any_context_irq
(
&
pdev
->
dev
,
axp20x_pek
->
irq_dbr
,
axp20x_pek_irq
,
0
,
"axp20x-pek-dbr"
,
axp20x_pek
);
if
(
error
<
0
)
{
dev_err
(
&
pdev
->
dev
,
"Failed to request dbr IRQ#%d: %d
\n
"
,
axp20x_pek
->
irq_dbr
,
error
);
return
error
;
}
error
=
devm_request_any_context_irq
(
&
pdev
->
dev
,
axp20x_pek
->
irq_dbf
,
axp20x_pek_irq
,
0
,
"axp20x-pek-dbf"
,
axp20x_pek
);
if
(
error
<
0
)
{
dev_err
(
&
pdev
->
dev
,
"Failed to request dbf IRQ#%d: %d
\n
"
,
axp20x_pek
->
irq_dbf
,
error
);
return
error
;
}
device_init_wakeup
(
&
pdev
->
dev
,
true
);
platform_set_drvdata
(
pdev
,
axp20x_pek
);
return
0
;
...
...
drivers/input/rmi4/rmi_driver.c
View file @
2969869b
...
...
@@ -205,7 +205,7 @@ static irqreturn_t rmi_irq_fn(int irq, void *dev_id)
if
(
count
)
{
kfree
(
attn_data
.
data
);
attn_data
.
data
=
NULL
;
drvdata
->
attn_data
.
data
=
NULL
;
}
if
(
!
kfifo_is_empty
(
&
drvdata
->
attn_fifo
))
...
...
@@ -1210,7 +1210,8 @@ static int rmi_driver_probe(struct device *dev)
if
(
data
->
input
)
{
rmi_driver_set_input_name
(
rmi_dev
,
data
->
input
);
if
(
!
rmi_dev
->
xport
->
input
)
{
if
(
input_register_device
(
data
->
input
))
{
retval
=
input_register_device
(
data
->
input
);
if
(
retval
)
{
dev_err
(
dev
,
"%s: Failed to register input device.
\n
"
,
__func__
);
goto
err_destroy_functions
;
...
...
drivers/input/serio/i8042-x86ia64io.h
View file @
2969869b
...
...
@@ -662,6 +662,13 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = {
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"P65xRP"
),
},
},
{
/* Lenovo ThinkPad Twist S230u */
.
matches
=
{
DMI_MATCH
(
DMI_SYS_VENDOR
,
"LENOVO"
),
DMI_MATCH
(
DMI_PRODUCT_NAME
,
"33474HU"
),
},
},
{
}
};
...
...
drivers/input/touchscreen/elants_i2c.c
View file @
2969869b
...
...
@@ -19,6 +19,7 @@
*/
#include <linux/bits.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/interrupt.h>
...
...
@@ -73,6 +74,7 @@
#define FW_POS_STATE 1
#define FW_POS_TOTAL 2
#define FW_POS_XY 3
#define FW_POS_TOOL_TYPE 33
#define FW_POS_CHECKSUM 34
#define FW_POS_WIDTH 35
#define FW_POS_PRESSURE 45
...
...
@@ -843,6 +845,7 @@ static void elants_i2c_mt_event(struct elants_data *ts, u8 *buf)
{
struct
input_dev
*
input
=
ts
->
input
;
unsigned
int
n_fingers
;
unsigned
int
tool_type
;
u16
finger_state
;
int
i
;
...
...
@@ -853,6 +856,10 @@ static void elants_i2c_mt_event(struct elants_data *ts, u8 *buf)
dev_dbg
(
&
ts
->
client
->
dev
,
"n_fingers: %u, state: %04x
\n
"
,
n_fingers
,
finger_state
);
/* Note: all fingers have the same tool type */
tool_type
=
buf
[
FW_POS_TOOL_TYPE
]
&
BIT
(
0
)
?
MT_TOOL_FINGER
:
MT_TOOL_PALM
;
for
(
i
=
0
;
i
<
MAX_CONTACT_NUM
&&
n_fingers
;
i
++
)
{
if
(
finger_state
&
1
)
{
unsigned
int
x
,
y
,
p
,
w
;
...
...
@@ -868,7 +875,7 @@ static void elants_i2c_mt_event(struct elants_data *ts, u8 *buf)
i
,
x
,
y
,
p
,
w
);
input_mt_slot
(
input
,
i
);
input_mt_report_slot_state
(
input
,
MT_TOOL_FINGER
,
true
);
input_mt_report_slot_state
(
input
,
tool_type
,
true
);
input_event
(
input
,
EV_ABS
,
ABS_MT_POSITION_X
,
x
);
input_event
(
input
,
EV_ABS
,
ABS_MT_POSITION_Y
,
y
);
input_event
(
input
,
EV_ABS
,
ABS_MT_PRESSURE
,
p
);
...
...
@@ -1333,6 +1340,8 @@ static int elants_i2c_probe(struct i2c_client *client,
input_set_abs_params
(
ts
->
input
,
ABS_MT_POSITION_Y
,
0
,
ts
->
y_max
,
0
,
0
);
input_set_abs_params
(
ts
->
input
,
ABS_MT_TOUCH_MAJOR
,
0
,
255
,
0
,
0
);
input_set_abs_params
(
ts
->
input
,
ABS_MT_PRESSURE
,
0
,
255
,
0
,
0
);
input_set_abs_params
(
ts
->
input
,
ABS_MT_TOOL_TYPE
,
0
,
MT_TOOL_PALM
,
0
,
0
);
input_abs_set_res
(
ts
->
input
,
ABS_MT_POSITION_X
,
ts
->
x_res
);
input_abs_set_res
(
ts
->
input
,
ABS_MT_POSITION_Y
,
ts
->
y_res
);
input_abs_set_res
(
ts
->
input
,
ABS_MT_TOUCH_MAJOR
,
1
);
...
...
drivers/input/touchscreen/mms114.c
View file @
2969869b
...
...
@@ -92,15 +92,15 @@ static int __mms114_read_reg(struct mms114_data *data, unsigned int reg,
if
(
reg
<=
MMS114_MODE_CONTROL
&&
reg
+
len
>
MMS114_MODE_CONTROL
)
BUG
();
/* Write register
: use repeated start
*/
/* Write register */
xfer
[
0
].
addr
=
client
->
addr
;
xfer
[
0
].
flags
=
I2C_M_TEN
|
I2C_M_NOSTART
;
xfer
[
0
].
flags
=
client
->
flags
&
I2C_M_TEN
;
xfer
[
0
].
len
=
1
;
xfer
[
0
].
buf
=
&
buf
;
/* Read data */
xfer
[
1
].
addr
=
client
->
addr
;
xfer
[
1
].
flags
=
I2C_M_RD
;
xfer
[
1
].
flags
=
(
client
->
flags
&
I2C_M_TEN
)
|
I2C_M_RD
;
xfer
[
1
].
len
=
len
;
xfer
[
1
].
buf
=
val
;
...
...
@@ -438,10 +438,8 @@ static int mms114_probe(struct i2c_client *client,
const
void
*
match_data
;
int
error
;
if
(
!
i2c_check_functionality
(
client
->
adapter
,
I2C_FUNC_PROTOCOL_MANGLING
))
{
dev_err
(
&
client
->
dev
,
"Need i2c bus that supports protocol mangling
\n
"
);
if
(
!
i2c_check_functionality
(
client
->
adapter
,
I2C_FUNC_I2C
))
{
dev_err
(
&
client
->
dev
,
"Not supported I2C adapter
\n
"
);
return
-
ENODEV
;
}
...
...
drivers/input/touchscreen/usbtouchscreen.c
View file @
2969869b
...
...
@@ -182,6 +182,7 @@ static const struct usb_device_id usbtouch_devices[] = {
#endif
#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
{
USB_DEVICE
(
0x255e
,
0x0001
),
.
driver_info
=
DEVTYPE_IRTOUCH
},
{
USB_DEVICE
(
0x595a
,
0x0001
),
.
driver_info
=
DEVTYPE_IRTOUCH
},
{
USB_DEVICE
(
0x6615
,
0x0001
),
.
driver_info
=
DEVTYPE_IRTOUCH
},
{
USB_DEVICE
(
0x6615
,
0x0012
),
.
driver_info
=
DEVTYPE_IRTOUCH_HIRES
},
...
...
include/linux/input/lm8333.h
View file @
2969869b
/*
* public include for LM8333 keypad driver - same license as driver
* Copyright (C) 2012 Wolfram Sang, Pengutronix <
w.sang
@pengutronix.de>
* Copyright (C) 2012 Wolfram Sang, Pengutronix <
kernel
@pengutronix.de>
*/
#ifndef _LM8333_H
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment