forked from Minki/linux
bcac590299
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>
15 lines
318 B
C
15 lines
318 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright(c) 2015-2020 Intel Corporation. */
|
|
|
|
#ifndef __SDW_SYSFS_LOCAL_H
|
|
#define __SDW_SYSFS_LOCAL_H
|
|
|
|
/*
|
|
* SDW sysfs APIs -
|
|
*/
|
|
|
|
int sdw_slave_sysfs_init(struct sdw_slave *slave);
|
|
int sdw_slave_sysfs_dpn_init(struct sdw_slave *slave);
|
|
|
|
#endif /* __SDW_SYSFS_LOCAL_H */
|