Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
8c64f932
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看板
提交
8c64f932
编写于
7月 21, 2011
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[media] mt2063: Don't violate the DVB API
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
上级
01e0dafc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
42 deletion
+9
-42
drivers/media/common/tuners/mt2063.c
drivers/media/common/tuners/mt2063.c
+9
-42
未找到文件。
drivers/media/common/tuners/mt2063.c
浏览文件 @
8c64f932
...
...
@@ -10,10 +10,6 @@ module_param(verbose, int, 0644);
/* Internal structures and types */
/* FIXME: we probably don't need these new FE get/set property types for tuner */
#define DVBFE_TUNER_SOFTWARE_SHUTDOWN 100
#define DVBFE_TUNER_CLEAR_POWER_MASKBITS 101
/* FIXME: Those two error codes need conversion*/
/* Error: Upconverter PLL is not locked */
#define MT2063_UPC_UNLOCK (0x80000002)
...
...
@@ -411,6 +407,9 @@ static u32 MT2063_GetParam(struct mt2063_state *state, enum MT2063_Param param,
static
u32
MT2063_SetReg
(
struct
mt2063_state
*
state
,
u8
reg
,
u8
val
);
static
u32
MT2063_SetParam
(
struct
mt2063_state
*
state
,
enum
MT2063_Param
param
,
enum
MT2063_DNC_Output_Enable
nValue
);
static
u32
MT2063_SoftwareShutdown
(
struct
mt2063_state
*
state
,
u8
Shutdown
);
static
u32
MT2063_ClearPowerMaskBits
(
struct
mt2063_state
*
state
,
enum
MT2063_Mask_Bits
Bits
);
/*****************/
/* From drivers/media/common/tuners/mt2063_cfg.h */
...
...
@@ -466,34 +465,12 @@ unsigned int mt2063_lockStatus(struct dvb_frontend *fe)
return
err
;
}
unsigned
int
tuner_MT2063_Open
(
struct
dvb_frontend
*
fe
)
{
struct
dvb_frontend_ops
*
frontend_ops
=
&
fe
->
ops
;
struct
dvb_tuner_ops
*
tuner_ops
=
&
frontend_ops
->
tuner_ops
;
struct
tuner_state
t_state
;
int
err
=
0
;
if
(
&
fe
->
ops
)
frontend_ops
=
&
fe
->
ops
;
if
(
&
frontend_ops
->
tuner_ops
)
tuner_ops
=
&
frontend_ops
->
tuner_ops
;
if
(
tuner_ops
->
set_state
)
{
if
((
err
=
tuner_ops
->
set_state
(
fe
,
DVBFE_TUNER_OPEN
,
&
t_state
))
<
0
)
{
printk
(
"%s: Invalid parameter
\n
"
,
__func__
);
return
err
;
}
}
return
err
;
}
unsigned
int
tuner_MT2063_SoftwareShutdown
(
struct
dvb_frontend
*
fe
)
{
struct
mt2063_state
*
state
=
fe
->
tuner_priv
;
struct
dvb_frontend_ops
*
frontend_ops
=
&
fe
->
ops
;
struct
dvb_tuner_ops
*
tuner_ops
=
&
frontend_ops
->
tuner_ops
;
struct
tuner_state
t_state
;
int
err
=
0
;
if
(
&
fe
->
ops
)
...
...
@@ -501,9 +478,8 @@ unsigned int tuner_MT2063_SoftwareShutdown(struct dvb_frontend *fe)
if
(
&
frontend_ops
->
tuner_ops
)
tuner_ops
=
&
frontend_ops
->
tuner_ops
;
if
(
tuner_ops
->
set_state
)
{
if
((
err
=
tuner_ops
->
set_state
(
fe
,
DVBFE_TUNER_SOFTWARE_SHUTDOWN
,
&
t_state
))
<
0
)
{
err
=
MT2063_SoftwareShutdown
(
state
,
1
);
if
(
err
<
0
)
{
printk
(
"%s: Invalid parameter
\n
"
,
__func__
);
return
err
;
}
...
...
@@ -514,9 +490,9 @@ unsigned int tuner_MT2063_SoftwareShutdown(struct dvb_frontend *fe)
unsigned
int
tuner_MT2063_ClearPowerMaskBits
(
struct
dvb_frontend
*
fe
)
{
struct
mt2063_state
*
state
=
fe
->
tuner_priv
;
struct
dvb_frontend_ops
*
frontend_ops
=
&
fe
->
ops
;
struct
dvb_tuner_ops
*
tuner_ops
=
&
frontend_ops
->
tuner_ops
;
struct
tuner_state
t_state
;
int
err
=
0
;
if
(
&
fe
->
ops
)
...
...
@@ -524,9 +500,8 @@ unsigned int tuner_MT2063_ClearPowerMaskBits(struct dvb_frontend *fe)
if
(
&
frontend_ops
->
tuner_ops
)
tuner_ops
=
&
frontend_ops
->
tuner_ops
;
if
(
tuner_ops
->
set_state
)
{
if
((
err
=
tuner_ops
->
set_state
(
fe
,
DVBFE_TUNER_CLEAR_POWER_MASKBITS
,
&
t_state
))
<
0
)
{
err
=
MT2063_ClearPowerMaskBits
(
state
,
MT2063_ALL_SD
);
if
(
err
<
0
)
{
printk
(
"%s: Invalid parameter
\n
"
,
__func__
);
return
err
;
}
...
...
@@ -3771,14 +3746,6 @@ static int mt2063_set_state(struct dvb_frontend *fe,
case
DVBFE_TUNER_REFCLOCK
:
break
;
case
DVBFE_TUNER_SOFTWARE_SHUTDOWN
:
status
=
MT2063_SoftwareShutdown
(
state
,
1
);
break
;
case
DVBFE_TUNER_CLEAR_POWER_MASKBITS
:
status
=
MT2063_ClearPowerMaskBits
(
state
,
MT2063_ALL_SD
);
break
;
default:
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录