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
f0f3214e
Commit
f0f3214e
authored
Feb 11, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next
parents
a948cae6
324a7fb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
44 deletions
+21
-44
include/sound/saif.h
include/sound/saif.h
+0
-16
sound/soc/mxs/mxs-saif.c
sound/soc/mxs/mxs-saif.c
+21
-28
No files found.
include/sound/saif.h
deleted
100644 → 0
View file @
a948cae6
/*
* Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __SOUND_SAIF_H__
#define __SOUND_SAIF_H__
struct
mxs_saif_platform_data
{
bool
master_mode
;
/* if true use master mode */
int
master_id
;
/* id of the master if in slave mode */
};
#endif
sound/soc/mxs/mxs-saif.c
View file @
f0f3214e
...
...
@@ -32,7 +32,6 @@
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/saif.h>
#include <asm/mach-types.h>
#include <mach/hardware.h>
#include <mach/mxs.h>
...
...
@@ -662,46 +661,40 @@ static int mxs_saif_probe(struct platform_device *pdev)
struct
device_node
*
np
=
pdev
->
dev
.
of_node
;
struct
resource
*
iores
,
*
dmares
;
struct
mxs_saif
*
saif
;
struct
mxs_saif_platform_data
*
pdata
;
struct
pinctrl
*
pinctrl
;
int
ret
=
0
;
struct
device_node
*
master
;
if
(
!
np
&&
pdev
->
id
>=
ARRAY_SIZE
(
mxs_saif
))
if
(
!
np
)
return
-
EINVAL
;
saif
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
*
saif
),
GFP_KERNEL
);
if
(
!
saif
)
return
-
ENOMEM
;
if
(
np
)
{
struct
device_node
*
master
;
saif
->
id
=
of_alias_get_id
(
np
,
"saif"
);
if
(
saif
->
id
<
0
)
return
saif
->
id
;
/*
* If there is no "fsl,saif-master" phandle, it's a saif
* master. Otherwise, it's a slave and its phandle points
* to the master.
*/
master
=
of_parse_phandle
(
np
,
"fsl,saif-master"
,
0
);
if
(
!
master
)
{
saif
->
master_id
=
saif
->
id
;
}
else
{
saif
->
master_id
=
of_alias_get_id
(
master
,
"saif"
);
if
(
saif
->
master_id
<
0
)
return
saif
->
master_id
;
}
ret
=
of_alias_get_id
(
np
,
"saif"
);
if
(
ret
<
0
)
return
ret
;
else
saif
->
id
=
ret
;
/*
* If there is no "fsl,saif-master" phandle, it's a saif
* master. Otherwise, it's a slave and its phandle points
* to the master.
*/
master
=
of_parse_phandle
(
np
,
"fsl,saif-master"
,
0
);
if
(
!
master
)
{
saif
->
master_id
=
saif
->
id
;
}
else
{
saif
->
id
=
pdev
->
id
;
pdata
=
pdev
->
dev
.
platform_data
;
if
(
pdata
&&
!
pdata
->
master_mode
)
saif
->
master_id
=
pdata
->
master_id
;
ret
=
of_alias_get_id
(
master
,
"saif"
);
if
(
ret
<
0
)
return
ret
;
else
saif
->
master_id
=
saif
->
id
;
saif
->
master_id
=
ret
;
}
if
(
saif
->
master_id
<
0
||
saif
->
master_id
>=
ARRAY_SIZE
(
mxs_saif
))
{
if
(
saif
->
master_id
>=
ARRAY_SIZE
(
mxs_saif
))
{
dev_err
(
&
pdev
->
dev
,
"get wrong master id
\n
"
);
return
-
EINVAL
;
}
...
...
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