Repository navigation
soundwire: properly assign ACPI_COMPANION #2625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,6 @@ int sdw_slave_add(struct sdw_bus *bus, | |
| /* Initialize data structure */ | ||
| memcpy(&slave->id, id, sizeof(*id)); | ||
| slave->dev.parent = bus->dev; | ||
| slave->dev.fwnode = fwnode; | ||
|
|
||
| if (id->unique_id == SDW_IGNORED_UNIQUE_ID) { | ||
| /* name shall be sdw:link:mfg:part:class */ | ||
|
|
@@ -53,6 +52,9 @@ int sdw_slave_add(struct sdw_bus *bus, | |
| slave->dev.of_node = of_node_get(to_of_node(fwnode)); | ||
| slave->dev.type = &sdw_slave_type; | ||
| slave->dev.groups = sdw_slave_status_attr_groups; | ||
| /* To make sure fwnode is a primary fwnode */ | ||
| fwnode->secondary = NULL; | ||
| set_primary_fwnode(&slave->dev, fwnode); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The commit message needs to be updated, e.g. Properties may be added to a codec as a secondary fwnode. When the slave device is removed, the fwnode remains tagged as secondary, which causes a side effect if the slave device is re-added in module load/unload tests. Forcing the fwnode as primary is required, otherwise the dev->fwnode will be overridden with the properties. |
||
| slave->bus = bus; | ||
| slave->status = SDW_SLAVE_UNATTACHED; | ||
| init_completion(&slave->enumeration_complete); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is really necessary?
Do we hit any issues without this?
Also this wouldn't work for Qualcomm (not using ACPI), I think we have to use set_primary_fwnode() directly.