aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/testing/sysfs-bus-soundwire-slave (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-10-01ABI: sysfs-bus-soundwire-slave: use wildcards on What definitionsMauro Carvalho Chehab1-31/+31
An "N" upper letter is not a wildcard, nor can easily be identified by script, specially since the USB sysfs define things like. bNumInterfaces. Use, instead, <N>, in order to let script/get_abi.pl to convert it into a Regex. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/416f4a746c116147abb08fb0155a6a4ed065dfd7.1631782432.git.mchehab+huawei@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-09-28soundwire: sysfs: add slave status and device number before probePierre-Louis Bossart1-0/+18
The MIPI DisCo device properties that are read by the driver from platform firmware, or hard-coded in the driver, should only be provided as sysfs entries when a driver probes successfully. However the device status and device number is updated even when there is no driver present, and hence can be updated when a Slave device is detected on the bus without being described in platform firmware and without any driver registered/probed. As suggested by GregKH, the attribute group for Slave status and device number is is added by default upon device registration. Credits to Vinod Koul for the status_show() function, shared in a separate patch and used as is here. The status table was modified to remove an unnecessary enum and status_show() is handled in a different group attribute than what was suggested by Vinod. Tested-by: Srinivas Kandgatla <srinivas.kandagatla@linaro.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Co-developed-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20200924194430.121058-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-05-20soundwire: add Slave sysfs supportPierre-Louis Bossart1-0/+91
Expose MIPI DisCo Slave properties in sysfs. For Slave properties and Data Port 0, the attributes are managed with simple devm_ support. A Slave Device may have more than one Data Port (DPN), and each Data Port can be sink or source. The attributes are created dynamically using pre-canned macros, but still use devm_ with a name attribute group to avoid creating kobjects - as requested by GregKH. In the _show function, we use container_of() to retrieve port number and direction required to extract the information. Audio modes are not supported for now. Depending on the discussions the SoundWire Device Class, we may add it later as is or follow the new specification. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20200518203551.2053-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>