Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
f0f3214e
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f0f3214e
编写于
2月 11, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next
上级
a948cae6
324a7fb0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
44 deletion
+21
-44
include/sound/saif.h
include/sound/saif.h
+0
-16
sound/soc/mxs/mxs-saif.c
sound/soc/mxs/mxs-saif.c
+21
-28
未找到文件。
include/sound/saif.h
已删除
100644 → 0
浏览文件 @
a948cae6
/*
* Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __SOUND_SAIF_H__
#define __SOUND_SAIF_H__
struct
mxs_saif_platform_data
{
bool
master_mode
;
/* if true use master mode */
int
master_id
;
/* id of the master if in slave mode */
};
#endif
sound/soc/mxs/mxs-saif.c
浏览文件 @
f0f3214e
...
...
@@ -32,7 +32,6 @@
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/saif.h>
#include <asm/mach-types.h>
#include <mach/hardware.h>
#include <mach/mxs.h>
...
...
@@ -662,46 +661,40 @@ static int mxs_saif_probe(struct platform_device *pdev)
struct
device_node
*
np
=
pdev
->
dev
.
of_node
;
struct
resource
*
iores
,
*
dmares
;
struct
mxs_saif
*
saif
;
struct
mxs_saif_platform_data
*
pdata
;
struct
pinctrl
*
pinctrl
;
int
ret
=
0
;
struct
device_node
*
master
;
if
(
!
np
&&
pdev
->
id
>=
ARRAY_SIZE
(
mxs_saif
))
if
(
!
np
)
return
-
EINVAL
;
saif
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
*
saif
),
GFP_KERNEL
);
if
(
!
saif
)
return
-
ENOMEM
;
if
(
np
)
{
struct
device_node
*
master
;
saif
->
id
=
of_alias_get_id
(
np
,
"saif"
);
if
(
saif
->
id
<
0
)
return
saif
->
id
;
/*
* If there is no "fsl,saif-master" phandle, it's a saif
* master. Otherwise, it's a slave and its phandle points
* to the master.
*/
master
=
of_parse_phandle
(
np
,
"fsl,saif-master"
,
0
);
if
(
!
master
)
{
saif
->
master_id
=
saif
->
id
;
}
else
{
saif
->
master_id
=
of_alias_get_id
(
master
,
"saif"
);
if
(
saif
->
master_id
<
0
)
return
saif
->
master_id
;
}
ret
=
of_alias_get_id
(
np
,
"saif"
);
if
(
ret
<
0
)
return
ret
;
else
saif
->
id
=
ret
;
/*
* If there is no "fsl,saif-master" phandle, it's a saif
* master. Otherwise, it's a slave and its phandle points
* to the master.
*/
master
=
of_parse_phandle
(
np
,
"fsl,saif-master"
,
0
);
if
(
!
master
)
{
saif
->
master_id
=
saif
->
id
;
}
else
{
saif
->
id
=
pdev
->
id
;
pdata
=
pdev
->
dev
.
platform_data
;
if
(
pdata
&&
!
pdata
->
master_mode
)
saif
->
master_id
=
pdata
->
master_id
;
ret
=
of_alias_get_id
(
master
,
"saif"
);
if
(
ret
<
0
)
return
ret
;
else
saif
->
master_id
=
saif
->
id
;
saif
->
master_id
=
ret
;
}
if
(
saif
->
master_id
<
0
||
saif
->
master_id
>=
ARRAY_SIZE
(
mxs_saif
))
{
if
(
saif
->
master_id
>=
ARRAY_SIZE
(
mxs_saif
))
{
dev_err
(
&
pdev
->
dev
,
"get wrong master id
\n
"
);
return
-
EINVAL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录