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
ed29a0a6
Commit
ed29a0a6
authored
Feb 26, 2020
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/asoc' into next
parents
eb751d9f
2c6cff68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
16 deletions
+28
-16
drivers/soundwire/bus.c
drivers/soundwire/bus.c
+5
-16
include/linux/soundwire/sdw.h
include/linux/soundwire/sdw.h
+23
-0
No files found.
drivers/soundwire/bus.c
View file @
ed29a0a6
...
...
@@ -589,22 +589,11 @@ void sdw_extract_slave_id(struct sdw_bus *bus,
{
dev_dbg
(
bus
->
dev
,
"SDW Slave Addr: %llx
\n
"
,
addr
);
/*
* Spec definition
* Register Bit Contents
* DevId_0 [7:4] 47:44 sdw_version
* DevId_0 [3:0] 43:40 unique_id
* DevId_1 39:32 mfg_id [15:8]
* DevId_2 31:24 mfg_id [7:0]
* DevId_3 23:16 part_id [15:8]
* DevId_4 15:08 part_id [7:0]
* DevId_5 07:00 class_id
*/
id
->
sdw_version
=
(
addr
>>
44
)
&
GENMASK
(
3
,
0
);
id
->
unique_id
=
(
addr
>>
40
)
&
GENMASK
(
3
,
0
);
id
->
mfg_id
=
(
addr
>>
24
)
&
GENMASK
(
15
,
0
);
id
->
part_id
=
(
addr
>>
8
)
&
GENMASK
(
15
,
0
);
id
->
class_id
=
addr
&
GENMASK
(
7
,
0
);
id
->
sdw_version
=
SDW_VERSION
(
addr
);
id
->
unique_id
=
SDW_UNIQUE_ID
(
addr
);
id
->
mfg_id
=
SDW_MFG_ID
(
addr
);
id
->
part_id
=
SDW_PART_ID
(
addr
);
id
->
class_id
=
SDW_CLASS_ID
(
addr
);
dev_dbg
(
bus
->
dev
,
"SDW Slave class_id %x, part_id %x, mfg_id %x, unique_id %x, version %x
\n
"
,
...
...
include/linux/soundwire/sdw.h
View file @
ed29a0a6
...
...
@@ -439,6 +439,29 @@ struct sdw_slave_id {
__u8
sdw_version
:
4
;
};
/*
* Helper macros to extract the MIPI-defined IDs
*
* Spec definition
* Register Bit Contents
* DevId_0 [7:4] 47:44 sdw_version
* DevId_0 [3:0] 43:40 unique_id
* DevId_1 39:32 mfg_id [15:8]
* DevId_2 31:24 mfg_id [7:0]
* DevId_3 23:16 part_id [15:8]
* DevId_4 15:08 part_id [7:0]
* DevId_5 07:00 class_id
*
* The MIPI DisCo for SoundWire defines in addition the link_id as bits 51:48
*/
#define SDW_DISCO_LINK_ID(adr) (((adr) >> 48) & GENMASK(3, 0))
#define SDW_VERSION(adr) (((adr) >> 44) & GENMASK(3, 0))
#define SDW_UNIQUE_ID(adr) (((adr) >> 40) & GENMASK(3, 0))
#define SDW_MFG_ID(adr) (((adr) >> 24) & GENMASK(15, 0))
#define SDW_PART_ID(adr) (((adr) >> 8) & GENMASK(15, 0))
#define SDW_CLASS_ID(adr) ((adr) & GENMASK(7, 0))
/**
* struct sdw_slave_intr_status - Slave interrupt status
* @control_port: control port status
...
...
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