Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
93d4c1e0
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看板
提交
93d4c1e0
编写于
6月 17, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/tegra' into asoc-next
上级
bfe617d3
249e66c3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
56 addition
and
18 deletion
+56
-18
sound/soc/tegra/tegra30_ahub.c
sound/soc/tegra/tegra30_ahub.c
+25
-0
sound/soc/tegra/tegra30_i2s.c
sound/soc/tegra/tegra30_i2s.c
+26
-0
sound/soc/tegra/tegra_asoc_utils.c
sound/soc/tegra/tegra_asoc_utils.c
+5
-18
未找到文件。
sound/soc/tegra/tegra30_ahub.c
浏览文件 @
93d4c1e0
...
...
@@ -627,9 +627,34 @@ static int tegra30_ahub_remove(struct platform_device *pdev)
return
0
;
}
#ifdef CONFIG_PM_SLEEP
static
int
tegra30_ahub_suspend
(
struct
device
*
dev
)
{
regcache_mark_dirty
(
ahub
->
regmap_ahub
);
regcache_mark_dirty
(
ahub
->
regmap_apbif
);
return
0
;
}
static
int
tegra30_ahub_resume
(
struct
device
*
dev
)
{
int
ret
;
ret
=
pm_runtime_get_sync
(
dev
);
if
(
ret
<
0
)
return
ret
;
ret
=
regcache_sync
(
ahub
->
regmap_ahub
);
ret
|=
regcache_sync
(
ahub
->
regmap_apbif
);
pm_runtime_put
(
dev
);
return
ret
;
}
#endif
static
const
struct
dev_pm_ops
tegra30_ahub_pm_ops
=
{
SET_RUNTIME_PM_OPS
(
tegra30_ahub_runtime_suspend
,
tegra30_ahub_runtime_resume
,
NULL
)
SET_SYSTEM_SLEEP_PM_OPS
(
tegra30_ahub_suspend
,
tegra30_ahub_resume
)
};
static
struct
platform_driver
tegra30_ahub_driver
=
{
...
...
sound/soc/tegra/tegra30_i2s.c
浏览文件 @
93d4c1e0
...
...
@@ -514,6 +514,31 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev)
return
0
;
}
#ifdef CONFIG_PM_SLEEP
static
int
tegra30_i2s_suspend
(
struct
device
*
dev
)
{
struct
tegra30_i2s
*
i2s
=
dev_get_drvdata
(
dev
);
regcache_mark_dirty
(
i2s
->
regmap
);
return
0
;
}
static
int
tegra30_i2s_resume
(
struct
device
*
dev
)
{
struct
tegra30_i2s
*
i2s
=
dev_get_drvdata
(
dev
);
int
ret
;
ret
=
pm_runtime_get_sync
(
dev
);
if
(
ret
<
0
)
return
ret
;
ret
=
regcache_sync
(
i2s
->
regmap
);
pm_runtime_put
(
dev
);
return
ret
;
}
#endif
static
const
struct
of_device_id
tegra30_i2s_of_match
[]
=
{
{
.
compatible
=
"nvidia,tegra30-i2s"
,
},
{},
...
...
@@ -522,6 +547,7 @@ static const struct of_device_id tegra30_i2s_of_match[] = {
static
const
struct
dev_pm_ops
tegra30_i2s_pm_ops
=
{
SET_RUNTIME_PM_OPS
(
tegra30_i2s_runtime_suspend
,
tegra30_i2s_runtime_resume
,
NULL
)
SET_SYSTEM_SLEEP_PM_OPS
(
tegra30_i2s_suspend
,
tegra30_i2s_resume
)
};
static
struct
platform_driver
tegra30_i2s_driver
=
{
...
...
sound/soc/tegra/tegra_asoc_utils.c
浏览文件 @
93d4c1e0
...
...
@@ -173,7 +173,6 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
struct
device
*
dev
)
{
int
ret
;
bool
new_clocks
=
false
;
data
->
dev
=
dev
;
...
...
@@ -181,40 +180,28 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
data
->
soc
=
TEGRA_ASOC_UTILS_SOC_TEGRA20
;
else
if
(
of_machine_is_compatible
(
"nvidia,tegra30"
))
data
->
soc
=
TEGRA_ASOC_UTILS_SOC_TEGRA30
;
else
if
(
of_machine_is_compatible
(
"nvidia,tegra114"
))
{
else
if
(
of_machine_is_compatible
(
"nvidia,tegra114"
))
data
->
soc
=
TEGRA_ASOC_UTILS_SOC_TEGRA114
;
new_clocks
=
true
;
}
else
{
else
{
dev_err
(
data
->
dev
,
"SoC unknown to Tegra ASoC utils
\n
"
);
return
-
EINVAL
;
}
if
(
new_clocks
)
data
->
clk_pll_a
=
clk_get
(
dev
,
"pll_a"
);
else
data
->
clk_pll_a
=
clk_get_sys
(
NULL
,
"pll_a"
);
data
->
clk_pll_a
=
clk_get
(
dev
,
"pll_a"
);
if
(
IS_ERR
(
data
->
clk_pll_a
))
{
dev_err
(
data
->
dev
,
"Can't retrieve clk pll_a
\n
"
);
ret
=
PTR_ERR
(
data
->
clk_pll_a
);
goto
err
;
}
if
(
new_clocks
)
data
->
clk_pll_a_out0
=
clk_get
(
dev
,
"pll_a_out0"
);
else
data
->
clk_pll_a_out0
=
clk_get_sys
(
NULL
,
"pll_a_out0"
);
data
->
clk_pll_a_out0
=
clk_get
(
dev
,
"pll_a_out0"
);
if
(
IS_ERR
(
data
->
clk_pll_a_out0
))
{
dev_err
(
data
->
dev
,
"Can't retrieve clk pll_a_out0
\n
"
);
ret
=
PTR_ERR
(
data
->
clk_pll_a_out0
);
goto
err_put_pll_a
;
}
if
(
new_clocks
)
data
->
clk_cdev1
=
clk_get
(
dev
,
"mclk"
);
else
if
(
data
->
soc
==
TEGRA_ASOC_UTILS_SOC_TEGRA20
)
data
->
clk_cdev1
=
clk_get_sys
(
NULL
,
"cdev1"
);
else
data
->
clk_cdev1
=
clk_get_sys
(
"extern1"
,
NULL
);
data
->
clk_cdev1
=
clk_get
(
dev
,
"mclk"
);
if
(
IS_ERR
(
data
->
clk_cdev1
))
{
dev_err
(
data
->
dev
,
"Can't retrieve clk cdev1
\n
"
);
ret
=
PTR_ERR
(
data
->
clk_cdev1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录