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
8246b5b0
Commit
8246b5b0
authored
Dec 15, 2012
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/tpa6130a2' into asoc-next
parents
36adf151
d06080cf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
sound/soc/codecs/tpa6130a2.c
sound/soc/codecs/tpa6130a2.c
+6
-17
No files found.
sound/soc/codecs/tpa6130a2.c
View file @
8246b5b0
...
@@ -398,7 +398,8 @@ static int tpa6130a2_probe(struct i2c_client *client,
...
@@ -398,7 +398,8 @@ static int tpa6130a2_probe(struct i2c_client *client,
TPA6130A2_MUTE_L
;
TPA6130A2_MUTE_L
;
if
(
data
->
power_gpio
>=
0
)
{
if
(
data
->
power_gpio
>=
0
)
{
ret
=
gpio_request
(
data
->
power_gpio
,
"tpa6130a2 enable"
);
ret
=
devm_gpio_request
(
dev
,
data
->
power_gpio
,
"tpa6130a2 enable"
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
dev_err
(
dev
,
"Failed to request power GPIO (%d)
\n
"
,
dev_err
(
dev
,
"Failed to request power GPIO (%d)
\n
"
,
data
->
power_gpio
);
data
->
power_gpio
);
...
@@ -419,16 +420,16 @@ static int tpa6130a2_probe(struct i2c_client *client,
...
@@ -419,16 +420,16 @@ static int tpa6130a2_probe(struct i2c_client *client,
break
;
break
;
}
}
data
->
supply
=
regulator_get
(
dev
,
regulator
);
data
->
supply
=
devm_
regulator_get
(
dev
,
regulator
);
if
(
IS_ERR
(
data
->
supply
))
{
if
(
IS_ERR
(
data
->
supply
))
{
ret
=
PTR_ERR
(
data
->
supply
);
ret
=
PTR_ERR
(
data
->
supply
);
dev_err
(
dev
,
"Failed to request supply: %d
\n
"
,
ret
);
dev_err
(
dev
,
"Failed to request supply: %d
\n
"
,
ret
);
goto
err_
regulator
;
goto
err_
gpio
;
}
}
ret
=
tpa6130a2_power
(
1
);
ret
=
tpa6130a2_power
(
1
);
if
(
ret
!=
0
)
if
(
ret
!=
0
)
goto
err_
power
;
goto
err_
gpio
;
/* Read version */
/* Read version */
...
@@ -440,15 +441,10 @@ static int tpa6130a2_probe(struct i2c_client *client,
...
@@ -440,15 +441,10 @@ static int tpa6130a2_probe(struct i2c_client *client,
/* Disable the chip */
/* Disable the chip */
ret
=
tpa6130a2_power
(
0
);
ret
=
tpa6130a2_power
(
0
);
if
(
ret
!=
0
)
if
(
ret
!=
0
)
goto
err_
power
;
goto
err_
gpio
;
return
0
;
return
0
;
err_power:
regulator_put
(
data
->
supply
);
err_regulator:
if
(
data
->
power_gpio
>=
0
)
gpio_free
(
data
->
power_gpio
);
err_gpio:
err_gpio:
tpa6130a2_client
=
NULL
;
tpa6130a2_client
=
NULL
;
...
@@ -457,14 +453,7 @@ static int tpa6130a2_probe(struct i2c_client *client,
...
@@ -457,14 +453,7 @@ static int tpa6130a2_probe(struct i2c_client *client,
static
int
tpa6130a2_remove
(
struct
i2c_client
*
client
)
static
int
tpa6130a2_remove
(
struct
i2c_client
*
client
)
{
{
struct
tpa6130a2_data
*
data
=
i2c_get_clientdata
(
client
);
tpa6130a2_power
(
0
);
tpa6130a2_power
(
0
);
if
(
data
->
power_gpio
>=
0
)
gpio_free
(
data
->
power_gpio
);
regulator_put
(
data
->
supply
);
tpa6130a2_client
=
NULL
;
tpa6130a2_client
=
NULL
;
return
0
;
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