Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
93d4c1e0
Commit
93d4c1e0
authored
Jun 17, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/tegra' into asoc-next
parents
bfe617d3
249e66c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
18 deletions
+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
No files found.
sound/soc/tegra/tegra30_ahub.c
View file @
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
View file @
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
View file @
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment