Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
c6698697
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
c6698697
编写于
8月 04, 2006
作者:
E
Edwin Huffstutler
提交者:
Dmitry Torokhov
8月 04, 2006
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Input: ati_remote - make filter time a module parameter
Signed-off-by:
N
Dmitry Torokhov
<
dtor@mail.ru
>
上级
3d0f0fa0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
14 deletion
+19
-14
drivers/usb/input/ati_remote.c
drivers/usb/input/ati_remote.c
+19
-14
未找到文件。
drivers/usb/input/ati_remote.c
浏览文件 @
c6698697
...
...
@@ -111,6 +111,16 @@
#define NAME_BUFSIZE 80
/* size of product name, path buffers */
#define DATA_BUFSIZE 63
/* size of URB data buffers */
/*
* Duplicate event filtering time.
* Sequential, identical KIND_FILTERED inputs with less than
* FILTER_TIME milliseconds between them are considered as repeat
* events. The hardware generates 5 events for the first keypress
* and we have to take this into account for an accurate repeat
* behaviour.
*/
#define FILTER_TIME 60
/* msec */
static
unsigned
long
channel_mask
;
module_param
(
channel_mask
,
ulong
,
0444
);
MODULE_PARM_DESC
(
channel_mask
,
"Bitmask of remote control channels to ignore"
);
...
...
@@ -119,6 +129,10 @@ static int debug;
module_param
(
debug
,
int
,
0444
);
MODULE_PARM_DESC
(
debug
,
"Enable extra debug messages and information"
);
static
int
repeat_filter
=
FILTER_TIME
;
module_param
(
repeat_filter
,
int
,
0644
);
MODULE_PARM_DESC
(
repeat_filter
,
"Repeat filter time, default = 60 msec"
);
#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0)
#undef err
#define err(format, arg...) printk(KERN_ERR format , ## arg)
...
...
@@ -146,15 +160,6 @@ static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };
/* Acceleration curve for directional control pad */
static
const
char
accel
[]
=
{
1
,
2
,
4
,
6
,
9
,
13
,
20
};
/* Duplicate event filtering time.
* Sequential, identical KIND_FILTERED inputs with less than
* FILTER_TIME jiffies between them are considered as repeat
* events. The hardware generates 5 events for the first keypress
* and we have to take this into account for an accurate repeat
* behaviour.
*/
#define FILTER_TIME 60
/* msec */
struct
ati_remote
{
struct
input_dev
*
idev
;
struct
usb_device
*
udev
;
...
...
@@ -464,9 +469,9 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs)
if
(
ati_remote_tbl
[
index
].
kind
==
KIND_FILTERED
)
{
/* Filter duplicate events which happen "too close" together. */
if
(
(
ati_remote
->
old_data
[
0
]
==
data
[
1
])
&&
(
ati_remote
->
old_data
[
1
]
==
data
[
2
])
&&
time_before
(
jiffies
,
ati_remote
->
old_jiffies
+
msecs_to_jiffies
(
FILTER_TIME
)))
{
if
(
ati_remote
->
old_data
[
0
]
==
data
[
1
]
&&
ati_remote
->
old_data
[
1
]
==
data
[
2
]
&&
time_before
(
jiffies
,
ati_remote
->
old_jiffies
+
msecs_to_jiffies
(
repeat_filter
)))
{
ati_remote
->
repeat_count
++
;
}
else
{
ati_remote
->
repeat_count
=
0
;
...
...
@@ -476,8 +481,8 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs)
ati_remote
->
old_data
[
1
]
=
data
[
2
];
ati_remote
->
old_jiffies
=
jiffies
;
if
(
(
ati_remote
->
repeat_count
>
0
)
&&
(
ati_remote
->
repeat_count
<
5
)
)
if
(
ati_remote
->
repeat_count
>
0
&&
ati_remote
->
repeat_count
<
5
)
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录