Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
0a6b8a85
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看板
提交
0a6b8a85
编写于
11月 12, 2008
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
V4L/DVB (9612): Fix key repetition with HVR-950 IR
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
上级
91812fa7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
4 deletion
+17
-4
drivers/media/video/em28xx/em28xx-input.c
drivers/media/video/em28xx/em28xx-input.c
+17
-4
未找到文件。
drivers/media/video/em28xx/em28xx-input.c
浏览文件 @
0a6b8a85
...
...
@@ -67,6 +67,7 @@ struct em28xx_IR {
u32
mask_keycode
;
u32
mask_keydown
;
u32
mask_keyup
;
u32
mask_repeat
;
int
(
*
get_key
)(
struct
em28xx_IR
*
);
};
...
...
@@ -165,15 +166,17 @@ static int default_polling_getkey(struct em28xx_IR *ir)
{
struct
em28xx
*
dev
=
ir
->
dev
;
int
rc
;
u
32
msg
;
u
8
msg
[
4
]
=
{
0
,
0
,
0
,
0
}
;
/* Read key toggle, brand, and key code */
/* Read key toggle, brand, and key code
on registers 0x45, 0x46 and 0x47
*/
rc
=
dev
->
em28xx_read_reg_req_len
(
dev
,
0
,
EM28XX_R45_IR
,
(
u8
*
)
&
msg
,
sizeof
(
msg
));
msg
,
sizeof
(
msg
));
if
(
rc
<
0
)
return
rc
;
return
(
int
)(
msg
&
0x7fffffffl
);
return
(
int
)(
le32_to_cpu
(
*
(
u32
*
)
msg
)
);
}
/**********************************************************
...
...
@@ -192,6 +195,7 @@ static void em28xx_ir_handle_key(struct em28xx_IR *ir)
if
(
gpio
==
ir
->
last_gpio
)
return
;
ir
->
last_gpio
=
gpio
;
/* extract data */
...
...
@@ -214,6 +218,14 @@ static void em28xx_ir_handle_key(struct em28xx_IR *ir)
ir_input_keydown
(
ir
->
input
,
&
ir
->
ir
,
data
,
data
);
else
ir_input_nokey
(
ir
->
input
,
&
ir
->
ir
);
}
else
if
(
ir
->
mask_repeat
)
{
int
count
=
ir
->
mask_repeat
&
gpio
;
/* Avoid keyboard bouncing */
if
((
count
==
1
)
||
(
count
>=
5
))
{
ir_input_keydown
(
ir
->
input
,
&
ir
->
ir
,
data
,
data
);
ir_input_nokey
(
ir
->
input
,
&
ir
->
ir
);
}
}
else
{
/* can't distinguish keydown/up :-/ */
ir_input_keydown
(
ir
->
input
,
&
ir
->
ir
,
data
,
data
);
...
...
@@ -274,6 +286,7 @@ int em28xx_ir_init(struct em28xx *dev)
ir_type
=
IR_TYPE_OTHER
;
ir_codes
=
ir_codes_hauppauge_new
;
ir
->
mask_keycode
=
0x007f0000
;
ir
->
mask_repeat
=
0x0000007f
;
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录