diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2020-09-24 22:44:29 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-28 08:47:40 +0300 |
commit | fcb9d730be1d3010e0c8fdc5aaff62836d7a942c (patch) | |
tree | a137dd77e43bb7bbbb92a07b0030074263c662c7 /drivers/soundwire/bus.c | |
parent | 5ec3215e56af8f7ce30c3d9d39029a85616713c0 (diff) | |
download | linux-fcb9d730be1d3010e0c8fdc5aaff62836d7a942c.tar.xz |
soundwire: bus: add enumerated Slave device to device list
Currently Slave devices are only added on startup, either from Device
Tree or ACPI entries. However Slave devices that are physically
present on the bus, but not described in platform firmware, will never
be added to the device list. The user/integrator can only know the
list of devices by looking a dynamic debug logs.
This patch suggests adding a Slave device even if there is no matching
DT or ACPI entry, so that we can see this in sysfs entry.
Initial code from Srinivas. Comments, fixes for ACPI probe and edits
of commit message by Pierre.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200924194430.121058-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/bus.c')
-rw-r--r-- | drivers/soundwire/bus.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index e3fe53f38708..f4c7887c3234 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -747,6 +747,15 @@ static int sdw_program_device_num(struct sdw_bus *bus) if (!found) { /* TODO: Park this device in Group 13 */ + + /* + * add Slave device even if there is no platform + * firmware description. There will be no driver probe + * but the user/integration will be able to see the + * device, enumeration status and device number in sysfs + */ + sdw_slave_add(bus, &id, NULL); + dev_err(bus->dev, "Slave Entry not found\n"); } |