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
14345a58
Commit
14345a58
authored
Jun 17, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/sgtl5000' into asoc-next
parents
1ee9271d
b9840124
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
220 additions
and
84 deletions
+220
-84
Documentation/devicetree/bindings/sound/sgtl5000.txt
Documentation/devicetree/bindings/sound/sgtl5000.txt
+3
-0
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/sgtl5000.c
+208
-59
sound/soc/codecs/sgtl5000.h
sound/soc/codecs/sgtl5000.h
+1
-1
sound/soc/fsl/imx-sgtl5000.c
sound/soc/fsl/imx-sgtl5000.c
+8
-24
No files found.
Documentation/devicetree/bindings/sound/sgtl5000.txt
View file @
14345a58
...
...
@@ -5,9 +5,12 @@ Required properties:
- reg : the I2C address of the device
- clocks : the clock provider of SYS_MCLK
Example:
codec: sgtl5000@0a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
clocks = <&clks 150>;
};
sound/soc/codecs/sgtl5000.c
View file @
14345a58
This diff is collapsed.
Click to expand it.
sound/soc/codecs/sgtl5000.h
View file @
14345a58
...
...
@@ -12,7 +12,7 @@
#define _SGTL5000_H
/*
* Register
values.
* Register
s addresses
*/
#define SGTL5000_CHIP_ID 0x0000
#define SGTL5000_CHIP_DIG_POWER 0x0002
...
...
sound/soc/fsl/imx-sgtl5000.c
View file @
14345a58
...
...
@@ -128,21 +128,11 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
goto
fail
;
}
data
->
codec_clk
=
clk_get
(
&
codec_dev
->
dev
,
NULL
);
if
(
IS_ERR
(
data
->
codec_clk
))
{
/* assuming clock enabled by default */
data
->
codec_clk
=
NULL
;
ret
=
of_property_read_u32
(
codec_np
,
"clock-frequency"
,
&
data
->
clk_frequency
);
if
(
ret
)
{
dev_err
(
&
codec_dev
->
dev
,
"clock-frequency missing or invalid
\n
"
);
goto
fail
;
}
}
else
{
data
->
clk_frequency
=
clk_get_rate
(
data
->
codec_clk
);
clk_prepare_enable
(
data
->
codec_clk
);
}
data
->
codec_clk
=
devm_clk_get
(
&
codec_dev
->
dev
,
NULL
);
if
(
IS_ERR
(
data
->
codec_clk
))
goto
fail
;
data
->
clk_frequency
=
clk_get_rate
(
data
->
codec_clk
);
data
->
dai
.
name
=
"HiFi"
;
data
->
dai
.
stream_name
=
"HiFi"
;
...
...
@@ -157,10 +147,10 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
data
->
card
.
dev
=
&
pdev
->
dev
;
ret
=
snd_soc_of_parse_card_name
(
&
data
->
card
,
"model"
);
if
(
ret
)
goto
clk_
fail
;
goto
fail
;
ret
=
snd_soc_of_parse_audio_routing
(
&
data
->
card
,
"audio-routing"
);
if
(
ret
)
goto
clk_
fail
;
goto
fail
;
data
->
card
.
num_links
=
1
;
data
->
card
.
owner
=
THIS_MODULE
;
data
->
card
.
dai_link
=
&
data
->
dai
;
...
...
@@ -170,7 +160,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
ret
=
snd_soc_register_card
(
&
data
->
card
);
if
(
ret
)
{
dev_err
(
&
pdev
->
dev
,
"snd_soc_register_card failed (%d)
\n
"
,
ret
);
goto
clk_
fail
;
goto
fail
;
}
platform_set_drvdata
(
pdev
,
data
);
...
...
@@ -179,8 +169,6 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
return
0
;
clk_fail:
clk_put
(
data
->
codec_clk
);
fail:
if
(
ssi_np
)
of_node_put
(
ssi_np
);
...
...
@@ -194,10 +182,6 @@ static int imx_sgtl5000_remove(struct platform_device *pdev)
{
struct
imx_sgtl5000_data
*
data
=
platform_get_drvdata
(
pdev
);
if
(
data
->
codec_clk
)
{
clk_disable_unprepare
(
data
->
codec_clk
);
clk_put
(
data
->
codec_clk
);
}
snd_soc_unregister_card
(
&
data
->
card
);
return
0
;
...
...
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