diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2019-08-21 20:58:18 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2019-08-23 08:31:02 +0200 |
commit | bf03473d5bcc85fbe9533fa042f67809d8520c4e (patch) | |
tree | f7011ad3cc5026c8d2644ba7bede251510ec2d98 /drivers/soundwire/bus.c | |
parent | soundwire: intel: remove unused variables (diff) | |
download | linux-bf03473d5bcc85fbe9533fa042f67809d8520c4e.tar.xz linux-bf03473d5bcc85fbe9533fa042f67809d8520c4e.zip |
soundwire: add debugfs support
Add base debugfs mechanism for SoundWire bus by creating soundwire
root and master-N and slave-x hierarchy.
Also add SDW Slave SCP, DP0 and DP-N register debug file.
Registers not implemented will print as "XX"
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Sanyog Kale <sanyog.r.kale@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190821185821.12690-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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 50f9cc5eb5f6..728db3ebad6e 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -49,6 +49,8 @@ int sdw_add_bus_master(struct sdw_bus *bus) } } + sdw_bus_debugfs_init(bus); + /* * Device numbers in SoundWire are 0 through 15. Enumeration device * number (0), Broadcast device number (15), Group numbers (12 and @@ -109,6 +111,8 @@ static int sdw_delete_slave(struct device *dev, void *data) struct sdw_slave *slave = dev_to_sdw_dev(dev); struct sdw_bus *bus = slave->bus; + sdw_slave_debugfs_exit(slave); + mutex_lock(&bus->bus_lock); if (slave->dev_num) /* clear dev_num if assigned */ @@ -130,6 +134,8 @@ static int sdw_delete_slave(struct device *dev, void *data) void sdw_delete_bus_master(struct sdw_bus *bus) { device_for_each_child(bus->dev, NULL, sdw_delete_slave); + + sdw_bus_debugfs_exit(bus); } EXPORT_SYMBOL(sdw_delete_bus_master); |