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
nexedi
linux
Commits
57ef0a43
Commit
57ef0a43
authored
Dec 20, 2017
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/rockchip' into asoc-linus
parents
54dbb868
c7b92172
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
sound/soc/rockchip/rockchip_spdif.c
sound/soc/rockchip/rockchip_spdif.c
+13
-5
No files found.
sound/soc/rockchip/rockchip_spdif.c
View file @
57ef0a43
...
@@ -322,26 +322,30 @@ static int rk_spdif_probe(struct platform_device *pdev)
...
@@ -322,26 +322,30 @@ static int rk_spdif_probe(struct platform_device *pdev)
spdif
->
mclk
=
devm_clk_get
(
&
pdev
->
dev
,
"mclk"
);
spdif
->
mclk
=
devm_clk_get
(
&
pdev
->
dev
,
"mclk"
);
if
(
IS_ERR
(
spdif
->
mclk
))
{
if
(
IS_ERR
(
spdif
->
mclk
))
{
dev_err
(
&
pdev
->
dev
,
"Can't retrieve rk_spdif master clock
\n
"
);
dev_err
(
&
pdev
->
dev
,
"Can't retrieve rk_spdif master clock
\n
"
);
return
PTR_ERR
(
spdif
->
mclk
);
ret
=
PTR_ERR
(
spdif
->
mclk
);
goto
err_disable_hclk
;
}
}
ret
=
clk_prepare_enable
(
spdif
->
mclk
);
ret
=
clk_prepare_enable
(
spdif
->
mclk
);
if
(
ret
)
{
if
(
ret
)
{
dev_err
(
spdif
->
dev
,
"clock enable failed %d
\n
"
,
ret
);
dev_err
(
spdif
->
dev
,
"clock enable failed %d
\n
"
,
ret
);
return
ret
;
goto
err_disable_clocks
;
}
}
res
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
res
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
regs
=
devm_ioremap_resource
(
&
pdev
->
dev
,
res
);
regs
=
devm_ioremap_resource
(
&
pdev
->
dev
,
res
);
if
(
IS_ERR
(
regs
))
if
(
IS_ERR
(
regs
))
{
return
PTR_ERR
(
regs
);
ret
=
PTR_ERR
(
regs
);
goto
err_disable_clocks
;
}
spdif
->
regmap
=
devm_regmap_init_mmio_clk
(
&
pdev
->
dev
,
"hclk"
,
regs
,
spdif
->
regmap
=
devm_regmap_init_mmio_clk
(
&
pdev
->
dev
,
"hclk"
,
regs
,
&
rk_spdif_regmap_config
);
&
rk_spdif_regmap_config
);
if
(
IS_ERR
(
spdif
->
regmap
))
{
if
(
IS_ERR
(
spdif
->
regmap
))
{
dev_err
(
&
pdev
->
dev
,
dev_err
(
&
pdev
->
dev
,
"Failed to initialise managed register map
\n
"
);
"Failed to initialise managed register map
\n
"
);
return
PTR_ERR
(
spdif
->
regmap
);
ret
=
PTR_ERR
(
spdif
->
regmap
);
goto
err_disable_clocks
;
}
}
spdif
->
playback_dma_data
.
addr
=
res
->
start
+
SPDIF_SMPDR
;
spdif
->
playback_dma_data
.
addr
=
res
->
start
+
SPDIF_SMPDR
;
...
@@ -373,6 +377,10 @@ static int rk_spdif_probe(struct platform_device *pdev)
...
@@ -373,6 +377,10 @@ static int rk_spdif_probe(struct platform_device *pdev)
err_pm_runtime:
err_pm_runtime:
pm_runtime_disable
(
&
pdev
->
dev
);
pm_runtime_disable
(
&
pdev
->
dev
);
err_disable_clocks:
clk_disable_unprepare
(
spdif
->
mclk
);
err_disable_hclk:
clk_disable_unprepare
(
spdif
->
hclk
);
return
ret
;
return
ret
;
}
}
...
...
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