Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
77aa8e65
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
77aa8e65
编写于
3月 20, 2012
作者:
J
Jiri Kosina
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'roccat' and 'wacom' into for-linus
上级
3abee352
bd393dbd
7e503a37
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
90 addition
and
70 deletion
+90
-70
drivers/hid/Kconfig
drivers/hid/Kconfig
+4
-51
drivers/hid/Makefile
drivers/hid/Makefile
+3
-8
drivers/hid/hid-wacom.c
drivers/hid/hid-wacom.c
+83
-11
未找到文件。
drivers/hid/Kconfig
浏览文件 @
77aa8e65
...
...
@@ -478,59 +478,12 @@ config HID_PRIMAX
HID standard.
config HID_ROCCAT
tristate "Roccat
special event
support"
tristate "Roccat
device
support"
depends on USB_HID
select HID_ROCCAT_COMMON
---help---
Support for Roccat special events.
Say Y here if you have a Roccat mouse or keyboard and want OSD or
macro execution support.
config HID_ROCCAT_COMMON
tristate
depends on HID_ROCCAT
config HID_ROCCAT_ARVO
tristate "Roccat Arvo keyboard support"
depends on USB_HID
depends on HID_ROCCAT
---help---
Support for Roccat Arvo keyboard.
config HID_ROCCAT_ISKU
tristate "Roccat Isku keyboard support"
depends on USB_HID
depends on HID_ROCCAT
---help---
Support for Roccat Isku keyboard.
config HID_ROCCAT_KONE
tristate "Roccat Kone Mouse support"
depends on USB_HID
depends on HID_ROCCAT
---help---
Support for Roccat Kone mouse.
config HID_ROCCAT_KONEPLUS
tristate "Roccat Kone[+] mouse support"
depends on USB_HID
depends on HID_ROCCAT
---help---
Support for Roccat Kone[+] mouse.
config HID_ROCCAT_KOVAPLUS
tristate "Roccat Kova[+] mouse support"
depends on USB_HID
depends on HID_ROCCAT
---help---
Support for Roccat Kova[+] mouse.
config HID_ROCCAT_PYRA
tristate "Roccat Pyra mouse support"
depends on USB_HID
depends on HID_ROCCAT
---help---
Support for Roccat Pyra mouse.
Support for Roccat devices.
Say Y here if you have a Roccat mouse or keyboard and want
support for its special functionalities.
config HID_SAMSUNG
tristate "Samsung InfraRed remote control or keyboards"
...
...
drivers/hid/Makefile
浏览文件 @
77aa8e65
...
...
@@ -64,14 +64,9 @@ obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
obj-$(CONFIG_HID_PETALYNX)
+=
hid-petalynx.o
obj-$(CONFIG_HID_PICOLCD)
+=
hid-picolcd.o
obj-$(CONFIG_HID_PRIMAX)
+=
hid-primax.o
obj-$(CONFIG_HID_ROCCAT)
+=
hid-roccat.o
obj-$(CONFIG_HID_ROCCAT_COMMON)
+=
hid-roccat-common.o
obj-$(CONFIG_HID_ROCCAT_ARVO)
+=
hid-roccat-arvo.o
obj-$(CONFIG_HID_ROCCAT_ISKU)
+=
hid-roccat-isku.o
obj-$(CONFIG_HID_ROCCAT_KONE)
+=
hid-roccat-kone.o
obj-$(CONFIG_HID_ROCCAT_KONEPLUS)
+=
hid-roccat-koneplus.o
obj-$(CONFIG_HID_ROCCAT_KOVAPLUS)
+=
hid-roccat-kovaplus.o
obj-$(CONFIG_HID_ROCCAT_PYRA)
+=
hid-roccat-pyra.o
obj-$(CONFIG_HID_ROCCAT)
+=
hid-roccat.o hid-roccat-common.o
\
hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o
\
hid-roccat-koneplus.o hid-roccat-kovaplus.o hid-roccat-pyra.o
obj-$(CONFIG_HID_SAMSUNG)
+=
hid-samsung.o
obj-$(CONFIG_HID_SMARTJOYPLUS)
+=
hid-sjoy.o
obj-$(CONFIG_HID_SONY)
+=
hid-sony.o
...
...
drivers/hid/hid-wacom.c
浏览文件 @
77aa8e65
...
...
@@ -31,10 +31,15 @@
#include "hid-ids.h"
#define PAD_DEVICE_ID 0x0F
struct
wacom_data
{
__u16
tool
;
unsigned
char
butstate
;
__u16
butstate
;
__u8
whlstate
;
__u8
features
;
__u32
id
;
__u32
serial
;
unsigned
char
high_speed
;
#ifdef CONFIG_HID_WACOM_POWER_SUPPLY
int
battery_capacity
;
...
...
@@ -314,30 +319,82 @@ static int wacom_gr_parse_report(struct hid_device *hdev,
return
1
;
}
static
void
wacom_i4_parse_button_report
(
struct
wacom_data
*
wdata
,
struct
input_dev
*
input
,
unsigned
char
*
data
)
{
__u16
new_butstate
;
__u8
new_whlstate
;
__u8
sync
=
0
;
new_whlstate
=
data
[
1
];
if
(
new_whlstate
!=
wdata
->
whlstate
)
{
wdata
->
whlstate
=
new_whlstate
;
if
(
new_whlstate
&
0x80
)
{
input_report_key
(
input
,
BTN_TOUCH
,
1
);
input_report_abs
(
input
,
ABS_WHEEL
,
(
new_whlstate
&
0x7f
));
input_report_key
(
input
,
BTN_TOOL_FINGER
,
1
);
}
else
{
input_report_key
(
input
,
BTN_TOUCH
,
0
);
input_report_abs
(
input
,
ABS_WHEEL
,
0
);
input_report_key
(
input
,
BTN_TOOL_FINGER
,
0
);
}
sync
=
1
;
}
new_butstate
=
(
data
[
3
]
<<
1
)
|
(
data
[
2
]
&
0x01
);
if
(
new_butstate
!=
wdata
->
butstate
)
{
wdata
->
butstate
=
new_butstate
;
input_report_key
(
input
,
BTN_0
,
new_butstate
&
0x001
);
input_report_key
(
input
,
BTN_1
,
new_butstate
&
0x002
);
input_report_key
(
input
,
BTN_2
,
new_butstate
&
0x004
);
input_report_key
(
input
,
BTN_3
,
new_butstate
&
0x008
);
input_report_key
(
input
,
BTN_4
,
new_butstate
&
0x010
);
input_report_key
(
input
,
BTN_5
,
new_butstate
&
0x020
);
input_report_key
(
input
,
BTN_6
,
new_butstate
&
0x040
);
input_report_key
(
input
,
BTN_7
,
new_butstate
&
0x080
);
input_report_key
(
input
,
BTN_8
,
new_butstate
&
0x100
);
input_report_key
(
input
,
BTN_TOOL_FINGER
,
1
);
sync
=
1
;
}
if
(
sync
)
{
input_report_abs
(
input
,
ABS_MISC
,
PAD_DEVICE_ID
);
input_event
(
input
,
EV_MSC
,
MSC_SERIAL
,
0xffffffff
);
input_sync
(
input
);
}
}
static
void
wacom_i4_parse_pen_report
(
struct
wacom_data
*
wdata
,
struct
input_dev
*
input
,
unsigned
char
*
data
)
{
__u16
x
,
y
,
pressure
;
__u
32
id
;
__u
8
distance
;
switch
(
data
[
1
])
{
case
0x80
:
/* Out of proximity report */
wdata
->
tool
=
0
;
input_report_key
(
input
,
BTN_TOUCH
,
0
);
input_report_abs
(
input
,
ABS_PRESSURE
,
0
);
input_report_key
(
input
,
BTN_STYLUS
,
0
);
input_report_key
(
input
,
BTN_STYLUS2
,
0
);
input_report_key
(
input
,
wdata
->
tool
,
0
);
input_report_abs
(
input
,
ABS_MISC
,
0
);
input_event
(
input
,
EV_MSC
,
MSC_SERIAL
,
wdata
->
serial
);
wdata
->
tool
=
0
;
input_sync
(
input
);
break
;
case
0xC2
:
/* Tool report */
id
=
((
data
[
2
]
<<
4
)
|
(
data
[
3
]
>>
4
)
|
wdata
->
id
=
((
data
[
2
]
<<
4
)
|
(
data
[
3
]
>>
4
)
|
((
data
[
7
]
&
0x0f
)
<<
20
)
|
((
data
[
8
]
&
0xf0
)
<<
12
))
&
0xfffff
;
((
data
[
8
]
&
0xf0
)
<<
12
));
wdata
->
serial
=
((
data
[
3
]
&
0x0f
)
<<
28
)
+
(
data
[
4
]
<<
20
)
+
(
data
[
5
]
<<
12
)
+
(
data
[
6
]
<<
4
)
+
(
data
[
7
]
>>
4
);
switch
(
id
)
{
case
0x802
:
switch
(
wdata
->
id
)
{
case
0x
100
802
:
wdata
->
tool
=
BTN_TOOL_PEN
;
break
;
case
0x80A
:
case
0x
100
80A
:
wdata
->
tool
=
BTN_TOOL_RUBBER
;
break
;
}
...
...
@@ -347,6 +404,7 @@ static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
y
=
data
[
4
]
<<
9
|
data
[
5
]
<<
1
|
(
data
[
9
]
&
0x01
);
pressure
=
(
data
[
6
]
<<
3
)
|
((
data
[
7
]
&
0xC0
)
>>
5
)
|
(
data
[
1
]
&
0x01
);
distance
=
(
data
[
9
]
>>
2
)
&
0x3f
;
input_report_key
(
input
,
BTN_TOUCH
,
pressure
>
1
);
...
...
@@ -356,6 +414,10 @@ static void wacom_i4_parse_pen_report(struct wacom_data *wdata,
input_report_abs
(
input
,
ABS_X
,
x
);
input_report_abs
(
input
,
ABS_Y
,
y
);
input_report_abs
(
input
,
ABS_PRESSURE
,
pressure
);
input_report_abs
(
input
,
ABS_DISTANCE
,
distance
);
input_report_abs
(
input
,
ABS_MISC
,
wdata
->
id
);
input_event
(
input
,
EV_MSC
,
MSC_SERIAL
,
wdata
->
serial
);
input_report_key
(
input
,
wdata
->
tool
,
1
);
input_sync
(
input
);
break
;
}
...
...
@@ -377,6 +439,7 @@ static void wacom_i4_parse_report(struct hid_device *hdev,
wdata
->
features
=
data
[
2
];
break
;
case
0x0C
:
/* Button report */
wacom_i4_parse_button_report
(
wdata
,
input
,
data
);
break
;
default:
hid_err
(
hdev
,
"Unknown report: %d,%d
\n
"
,
data
[
0
],
data
[
1
]);
...
...
@@ -451,9 +514,7 @@ static int wacom_input_mapped(struct hid_device *hdev, struct hid_input *hi,
__set_bit
(
BTN_MIDDLE
,
input
->
keybit
);
/* Pad */
input
->
evbit
[
0
]
|=
BIT
(
EV_MSC
);
__set_bit
(
MSC_SERIAL
,
input
->
mscbit
);
input_set_capability
(
input
,
EV_MSC
,
MSC_SERIAL
);
__set_bit
(
BTN_0
,
input
->
keybit
);
__set_bit
(
BTN_1
,
input
->
keybit
);
...
...
@@ -471,9 +532,20 @@ static int wacom_input_mapped(struct hid_device *hdev, struct hid_input *hi,
input_set_abs_params
(
input
,
ABS_DISTANCE
,
0
,
32
,
0
,
0
);
break
;
case
USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH
:
__set_bit
(
ABS_WHEEL
,
input
->
absbit
);
__set_bit
(
ABS_MISC
,
input
->
absbit
);
__set_bit
(
BTN_2
,
input
->
keybit
);
__set_bit
(
BTN_3
,
input
->
keybit
);
__set_bit
(
BTN_4
,
input
->
keybit
);
__set_bit
(
BTN_5
,
input
->
keybit
);
__set_bit
(
BTN_6
,
input
->
keybit
);
__set_bit
(
BTN_7
,
input
->
keybit
);
__set_bit
(
BTN_8
,
input
->
keybit
);
input_set_abs_params
(
input
,
ABS_WHEEL
,
0
,
71
,
0
,
0
);
input_set_abs_params
(
input
,
ABS_X
,
0
,
40640
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_Y
,
0
,
25400
,
4
,
0
);
input_set_abs_params
(
input
,
ABS_PRESSURE
,
0
,
2047
,
0
,
0
);
input_set_abs_params
(
input
,
ABS_DISTANCE
,
0
,
63
,
0
,
0
);
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录