Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
882aba01
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
882aba01
编写于
9月 07, 2011
作者:
J
Jiri Kosina
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'upstream-fixes' and 'magicmouse' into for-linus
上级
ddf28352
9086617e
35d851df
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
67 addition
and
23 deletion
+67
-23
drivers/hid/hid-ids.h
drivers/hid/hid-ids.h
+1
-0
drivers/hid/hid-magicmouse.c
drivers/hid/hid-magicmouse.c
+55
-11
drivers/hid/hid-wacom.c
drivers/hid/hid-wacom.c
+10
-12
drivers/hid/usbhid/hid-quirks.c
drivers/hid/usbhid/hid-quirks.c
+1
-0
未找到文件。
drivers/hid/hid-ids.h
浏览文件 @
882aba01
...
...
@@ -277,6 +277,7 @@
#define USB_DEVICE_ID_PENPOWER 0x00f4
#define USB_VENDOR_ID_GREENASIA 0x0e8f
#define USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD 0x3013
#define USB_VENDOR_ID_GRETAGMACBETH 0x0971
#define USB_DEVICE_ID_GRETAGMACBETH_HUEY 0x2005
...
...
drivers/hid/hid-magicmouse.c
浏览文件 @
882aba01
...
...
@@ -81,6 +81,28 @@ MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state fie
#define NO_TOUCHES -1
#define SINGLE_TOUCH_UP -2
/* Touch surface information. Dimension is in hundredths of a mm, min and max
* are in units. */
#define MOUSE_DIMENSION_X (float)9056
#define MOUSE_MIN_X -1100
#define MOUSE_MAX_X 1258
#define MOUSE_RES_X ((MOUSE_MAX_X - MOUSE_MIN_X) / (MOUSE_DIMENSION_X / 100))
#define MOUSE_DIMENSION_Y (float)5152
#define MOUSE_MIN_Y -1589
#define MOUSE_MAX_Y 2047
#define MOUSE_RES_Y ((MOUSE_MAX_Y - MOUSE_MIN_Y) / (MOUSE_DIMENSION_Y / 100))
#define TRACKPAD_DIMENSION_X (float)13000
#define TRACKPAD_MIN_X -2909
#define TRACKPAD_MAX_X 3167
#define TRACKPAD_RES_X \
((TRACKPAD_MAX_X - TRACKPAD_MIN_X) / (TRACKPAD_DIMENSION_X / 100))
#define TRACKPAD_DIMENSION_Y (float)11000
#define TRACKPAD_MIN_Y -2456
#define TRACKPAD_MAX_Y 2565
#define TRACKPAD_RES_Y \
((TRACKPAD_MAX_Y - TRACKPAD_MIN_Y) / (TRACKPAD_DIMENSION_Y / 100))
/**
* struct magicmouse_sc - Tracks Magic Mouse-specific data.
* @input: Input device through which we report events.
...
...
@@ -406,17 +428,31 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
* inverse of the reported Y.
*/
if
(
input
->
id
.
product
==
USB_DEVICE_ID_APPLE_MAGICMOUSE
)
{
input_set_abs_params
(
input
,
ABS_MT_POSITION_X
,
-
1100
,
1358
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_MT_POSITION_Y
,
-
1589
,
2047
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_MT_POSITION_X
,
MOUSE_MIN_X
,
MOUSE_MAX_X
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_MT_POSITION_Y
,
MOUSE_MIN_Y
,
MOUSE_MAX_Y
,
4
,
0
);
input_abs_set_res
(
input
,
ABS_MT_POSITION_X
,
MOUSE_RES_X
);
input_abs_set_res
(
input
,
ABS_MT_POSITION_Y
,
MOUSE_RES_Y
);
}
else
{
/* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
input_set_abs_params
(
input
,
ABS_X
,
-
2909
,
3167
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_Y
,
-
2456
,
2565
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_MT_POSITION_X
,
-
2909
,
3167
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_MT_POSITION_Y
,
-
2456
,
2565
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_X
,
TRACKPAD_MIN_X
,
TRACKPAD_MAX_X
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_Y
,
TRACKPAD_MIN_Y
,
TRACKPAD_MAX_Y
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_MT_POSITION_X
,
TRACKPAD_MIN_X
,
TRACKPAD_MAX_X
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_MT_POSITION_Y
,
TRACKPAD_MIN_Y
,
TRACKPAD_MAX_Y
,
4
,
0
);
input_abs_set_res
(
input
,
ABS_X
,
TRACKPAD_RES_X
);
input_abs_set_res
(
input
,
ABS_Y
,
TRACKPAD_RES_Y
);
input_abs_set_res
(
input
,
ABS_MT_POSITION_X
,
TRACKPAD_RES_X
);
input_abs_set_res
(
input
,
ABS_MT_POSITION_Y
,
TRACKPAD_RES_Y
);
}
input_set_events_per_packet
(
input
,
60
);
...
...
@@ -501,9 +537,17 @@ static int magicmouse_probe(struct hid_device *hdev,
}
report
->
size
=
6
;
/*
* Some devices repond with 'invalid report id' when feature
* report switching it into multitouch mode is sent to it.
*
* This results in -EIO from the _raw low-level transport callback,
* but there seems to be no other way of switching the mode.
* Thus the super-ugly hacky success check below.
*/
ret
=
hdev
->
hid_output_raw_report
(
hdev
,
feature
,
sizeof
(
feature
),
HID_FEATURE_REPORT
);
if
(
ret
!=
sizeof
(
feature
))
{
if
(
ret
!=
-
EIO
&&
ret
!=
sizeof
(
feature
))
{
hid_err
(
hdev
,
"unable to request touch data (%d)
\n
"
,
ret
);
goto
err_stop_hw
;
}
...
...
drivers/hid/hid-wacom.c
浏览文件 @
882aba01
...
...
@@ -353,11 +353,7 @@ static int wacom_probe(struct hid_device *hdev,
if
(
ret
)
{
hid_warn
(
hdev
,
"can't create sysfs battery attribute, err: %d
\n
"
,
ret
);
/*
* battery attribute is not critical for the tablet, but if it
* failed then there is no need to create ac attribute
*/
goto
move_on
;
goto
err_battery
;
}
wdata
->
ac
.
properties
=
wacom_ac_props
;
...
...
@@ -371,14 +367,8 @@ static int wacom_probe(struct hid_device *hdev,
if
(
ret
)
{
hid_warn
(
hdev
,
"can't create ac battery attribute, err: %d
\n
"
,
ret
);
/*
* ac attribute is not critical for the tablet, but if it
* failed then we don't want to battery attribute to exist
*/
power_supply_unregister
(
&
wdata
->
battery
);
goto
err_ac
;
}
move_on:
#endif
hidinput
=
list_entry
(
hdev
->
inputs
.
next
,
struct
hid_input
,
list
);
input
=
hidinput
->
input
;
...
...
@@ -416,6 +406,13 @@ static int wacom_probe(struct hid_device *hdev,
return
0
;
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
err_ac:
power_supply_unregister
(
&
wdata
->
battery
);
err_battery:
device_remove_file
(
&
hdev
->
dev
,
&
dev_attr_speed
);
hid_hw_stop
(
hdev
);
#endif
err_free:
kfree
(
wdata
);
return
ret
;
...
...
@@ -426,6 +423,7 @@ static void wacom_remove(struct hid_device *hdev)
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
struct
wacom_data
*
wdata
=
hid_get_drvdata
(
hdev
);
#endif
device_remove_file
(
&
hdev
->
dev
,
&
dev_attr_speed
);
hid_hw_stop
(
hdev
);
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
...
...
drivers/hid/usbhid/hid-quirks.c
浏览文件 @
882aba01
...
...
@@ -47,6 +47,7 @@ static const struct hid_blacklist {
{
USB_VENDOR_ID_AFATECH
,
USB_DEVICE_ID_AFATECH_AF9016
,
HID_QUIRK_FULLSPEED_INTERVAL
},
{
USB_VENDOR_ID_ETURBOTOUCH
,
USB_DEVICE_ID_ETURBOTOUCH
,
HID_QUIRK_MULTI_INPUT
},
{
USB_VENDOR_ID_GREENASIA
,
USB_DEVICE_ID_GREENASIA_DUAL_USB_JOYPAD
,
HID_QUIRK_MULTI_INPUT
},
{
USB_VENDOR_ID_PANTHERLORD
,
USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK
,
HID_QUIRK_MULTI_INPUT
|
HID_QUIRK_SKIP_OUTPUT_REPORTS
},
{
USB_VENDOR_ID_PLAYDOTCOM
,
USB_DEVICE_ID_PLAYDOTCOM_EMS_USBII
,
HID_QUIRK_MULTI_INPUT
},
{
USB_VENDOR_ID_TOUCHPACK
,
USB_DEVICE_ID_TOUCHPACK_RTS
,
HID_QUIRK_MULTI_INPUT
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录