Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
f6f12427
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f6f12427
编写于
10月 25, 2011
作者:
J
Jiri Kosina
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream-fixes' into for-linus
Conflicts: drivers/hid/hid-wacom.c
上级
b0eae38c
bca62142
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
58 addition
and
42 deletion
+58
-42
drivers/hid/hid-magicmouse.c
drivers/hid/hid-magicmouse.c
+7
-0
drivers/hid/hid-wacom.c
drivers/hid/hid-wacom.c
+43
-38
drivers/hid/hidraw.c
drivers/hid/hidraw.c
+5
-3
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/hid-core.c
+1
-1
drivers/hid/usbhid/hiddev.c
drivers/hid/usbhid/hiddev.c
+2
-0
未找到文件。
drivers/hid/hid-magicmouse.c
浏览文件 @
f6f12427
...
...
@@ -405,6 +405,13 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
__set_bit
(
REL_HWHEEL
,
input
->
relbit
);
}
}
else
{
/* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
/* input->keybit is initialized with incorrect button info
* for Magic Trackpad. There really is only one physical
* button (BTN_LEFT == BTN_MOUSE). Make sure we don't
* advertise buttons that don't exist...
*/
__clear_bit
(
BTN_RIGHT
,
input
->
keybit
);
__clear_bit
(
BTN_MIDDLE
,
input
->
keybit
);
__set_bit
(
BTN_MOUSE
,
input
->
keybit
);
__set_bit
(
BTN_TOOL_FINGER
,
input
->
keybit
);
__set_bit
(
BTN_TOOL_DOUBLETAP
,
input
->
keybit
);
...
...
drivers/hid/hid-wacom.c
浏览文件 @
f6f12427
...
...
@@ -304,11 +304,51 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
return
1
;
}
static
int
wacom_input_mapped
(
struct
hid_device
*
hdev
,
struct
hid_input
*
hi
,
struct
hid_field
*
field
,
struct
hid_usage
*
usage
,
unsigned
long
**
bit
,
int
*
max
)
{
struct
input_dev
*
input
=
hi
->
input
;
__set_bit
(
INPUT_PROP_POINTER
,
input
->
propbit
);
/* Basics */
input
->
evbit
[
0
]
|=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
)
|
BIT
(
EV_REL
);
__set_bit
(
REL_WHEEL
,
input
->
relbit
);
__set_bit
(
BTN_TOOL_PEN
,
input
->
keybit
);
__set_bit
(
BTN_TOUCH
,
input
->
keybit
);
__set_bit
(
BTN_STYLUS
,
input
->
keybit
);
__set_bit
(
BTN_STYLUS2
,
input
->
keybit
);
__set_bit
(
BTN_LEFT
,
input
->
keybit
);
__set_bit
(
BTN_RIGHT
,
input
->
keybit
);
__set_bit
(
BTN_MIDDLE
,
input
->
keybit
);
/* Pad */
input
->
evbit
[
0
]
|=
BIT
(
EV_MSC
);
__set_bit
(
MSC_SERIAL
,
input
->
mscbit
);
__set_bit
(
BTN_0
,
input
->
keybit
);
__set_bit
(
BTN_1
,
input
->
keybit
);
__set_bit
(
BTN_TOOL_FINGER
,
input
->
keybit
);
/* Distance, rubber and mouse */
__set_bit
(
BTN_TOOL_RUBBER
,
input
->
keybit
);
__set_bit
(
BTN_TOOL_MOUSE
,
input
->
keybit
);
input_set_abs_params
(
input
,
ABS_X
,
0
,
16704
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_Y
,
0
,
12064
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_PRESSURE
,
0
,
511
,
0
,
0
);
input_set_abs_params
(
input
,
ABS_DISTANCE
,
0
,
32
,
0
,
0
);
return
0
;
}
static
int
wacom_probe
(
struct
hid_device
*
hdev
,
const
struct
hid_device_id
*
id
)
{
struct
hid_input
*
hidinput
;
struct
input_dev
*
input
;
struct
wacom_data
*
wdata
;
int
ret
;
...
...
@@ -370,42 +410,6 @@ static int wacom_probe(struct hid_device *hdev,
goto
err_ac
;
}
#endif
hidinput
=
list_entry
(
hdev
->
inputs
.
next
,
struct
hid_input
,
list
);
input
=
hidinput
->
input
;
__set_bit
(
INPUT_PROP_POINTER
,
input
->
propbit
);
/* Basics */
input
->
evbit
[
0
]
|=
BIT
(
EV_KEY
)
|
BIT
(
EV_ABS
)
|
BIT
(
EV_REL
);
__set_bit
(
REL_WHEEL
,
input
->
relbit
);
__set_bit
(
BTN_TOOL_PEN
,
input
->
keybit
);
__set_bit
(
BTN_TOUCH
,
input
->
keybit
);
__set_bit
(
BTN_STYLUS
,
input
->
keybit
);
__set_bit
(
BTN_STYLUS2
,
input
->
keybit
);
__set_bit
(
BTN_LEFT
,
input
->
keybit
);
__set_bit
(
BTN_RIGHT
,
input
->
keybit
);
__set_bit
(
BTN_MIDDLE
,
input
->
keybit
);
/* Pad */
input
->
evbit
[
0
]
|=
BIT
(
EV_MSC
);
__set_bit
(
MSC_SERIAL
,
input
->
mscbit
);
__set_bit
(
BTN_0
,
input
->
keybit
);
__set_bit
(
BTN_1
,
input
->
keybit
);
__set_bit
(
BTN_TOOL_FINGER
,
input
->
keybit
);
/* Distance, rubber and mouse */
__set_bit
(
BTN_TOOL_RUBBER
,
input
->
keybit
);
__set_bit
(
BTN_TOOL_MOUSE
,
input
->
keybit
);
input_set_abs_params
(
input
,
ABS_X
,
0
,
16704
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_Y
,
0
,
12064
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_PRESSURE
,
0
,
511
,
0
,
0
);
input_set_abs_params
(
input
,
ABS_DISTANCE
,
0
,
32
,
0
,
0
);
return
0
;
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
...
...
@@ -448,6 +452,7 @@ static struct hid_driver wacom_driver = {
.
probe
=
wacom_probe
,
.
remove
=
wacom_remove
,
.
raw_event
=
wacom_raw_event
,
.
input_mapped
=
wacom_input_mapped
,
};
static
int
__init
wacom_init
(
void
)
...
...
drivers/hid/hidraw.c
浏览文件 @
f6f12427
...
...
@@ -272,8 +272,10 @@ static int hidraw_open(struct inode *inode, struct file *file)
dev
=
hidraw_table
[
minor
];
if
(
!
dev
->
open
++
)
{
err
=
hid_hw_power
(
dev
->
hid
,
PM_HINT_FULLON
);
if
(
err
<
0
)
if
(
err
<
0
)
{
dev
->
open
--
;
goto
out_unlock
;
}
err
=
hid_hw_open
(
dev
->
hid
);
if
(
err
<
0
)
{
...
...
@@ -510,13 +512,12 @@ void hidraw_disconnect(struct hid_device *hid)
{
struct
hidraw
*
hidraw
=
hid
->
hidraw
;
mutex_lock
(
&
minors_lock
);
hidraw
->
exist
=
0
;
device_destroy
(
hidraw_class
,
MKDEV
(
hidraw_major
,
hidraw
->
minor
));
mutex_lock
(
&
minors_lock
);
hidraw_table
[
hidraw
->
minor
]
=
NULL
;
mutex_unlock
(
&
minors_lock
);
if
(
hidraw
->
open
)
{
hid_hw_close
(
hid
);
...
...
@@ -524,6 +525,7 @@ void hidraw_disconnect(struct hid_device *hid)
}
else
{
kfree
(
hidraw
);
}
mutex_unlock
(
&
minors_lock
);
}
EXPORT_SYMBOL_GPL
(
hidraw_disconnect
);
...
...
drivers/hid/usbhid/hid-core.c
浏览文件 @
f6f12427
...
...
@@ -1270,7 +1270,7 @@ static void hid_cancel_delayed_stuff(struct usbhid_device *usbhid)
static
void
hid_cease_io
(
struct
usbhid_device
*
usbhid
)
{
del_timer
(
&
usbhid
->
io_retry
);
del_timer
_sync
(
&
usbhid
->
io_retry
);
usb_kill_urb
(
usbhid
->
urbin
);
usb_kill_urb
(
usbhid
->
urbctrl
);
usb_kill_urb
(
usbhid
->
urbout
);
...
...
drivers/hid/usbhid/hiddev.c
浏览文件 @
f6f12427
...
...
@@ -641,6 +641,8 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct
usb_device
*
dev
=
hid_to_usb_dev
(
hid
);
struct
usbhid_device
*
usbhid
=
hid
->
driver_data
;
memset
(
&
dinfo
,
0
,
sizeof
(
dinfo
));
dinfo
.
bustype
=
BUS_USB
;
dinfo
.
busnum
=
dev
->
bus
->
busnum
;
dinfo
.
devnum
=
dev
->
devnum
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录