Repository navigation
Conversation
|
SOFCI TEST |
76a2a0c to
ed5ab15
Compare
c2625f3 to
222eecc
Compare
| 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; | ||
| ACPI_COMPANION_SET(&slave->dev, to_acpi_device_node(fwnode)); |
There was a problem hiding this comment.
This is basically set_primary_fwnode(&slave->dev, fwnode);. No need to use macros.
We never used ACPI_SET_COMPANION which is used by others, e.g. I2C adapters. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
222eecc to
21f355d
Compare
plbossart
left a comment
There was a problem hiding this comment.
I think we need to revisit the master.c change, it's not clear if it's needed and it wouldn't work for Qualcomm, and the commit message for the slave.c is too vague.
|
|
||
| dev_set_name(&md->dev, "sdw-master-%d", bus->id); | ||
| /* make sure ACPI companion is set based on parent */ | ||
| ACPI_COMPANION_SET(&md->dev, ACPI_COMPANION(parent)); |
There was a problem hiding this comment.
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.
| 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); |
There was a problem hiding this comment.
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.
|
let's discuses it on #2635 |
We never used ACPI_SET_COMPANION which is used by others, e.g. I2C
adapters.
Suggested-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Fixes: #2599