Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-08 Thread Pierre-Louis Bossart
Vinod, the question was not for dp0 and dpN, it's fine to have subdirectories there, but rather why we need separate devices for the master and slave properties. Slave does not have a separate device. IIRC the properties for Slave are in /sys/bus/soundwire/device//... I am not sure this is

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-08 Thread Vinod Koul
On 07-05-19, 08:54, Pierre-Louis Bossart wrote: > On 5/7/19 12:19 AM, Vinod Koul wrote: > > On 06-05-19, 11:46, Pierre-Louis Bossart wrote: > > > On 5/6/19 11:22 AM, Vinod Koul wrote: > > > > On 06-05-19, 17:19, Greg KH wrote: > > > > > On Mon, May 06, 2019 at 09:42:35AM -0500, Pierre-Louis

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-07 Thread Pierre-Louis Bossart
On 5/7/19 12:19 AM, Vinod Koul wrote: On 06-05-19, 11:46, Pierre-Louis Bossart wrote: On 5/6/19 11:22 AM, Vinod Koul wrote: On 06-05-19, 17:19, Greg KH wrote: On Mon, May 06, 2019 at 09:42:35AM -0500, Pierre-Louis Bossart wrote: + +int sdw_sysfs_slave_init(struct sdw_slave *slave) +{ +

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-06 Thread Vinod Koul
On 06-05-19, 11:46, Pierre-Louis Bossart wrote: > On 5/6/19 11:22 AM, Vinod Koul wrote: > > On 06-05-19, 17:19, Greg KH wrote: > > > On Mon, May 06, 2019 at 09:42:35AM -0500, Pierre-Louis Bossart wrote: > > > > > > + > > > > > > +int sdw_sysfs_slave_init(struct sdw_slave *slave) > > > > > > +{ > >

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-06 Thread Pierre-Louis Bossart
On 5/6/19 11:22 AM, Vinod Koul wrote: On 06-05-19, 17:19, Greg KH wrote: On Mon, May 06, 2019 at 09:42:35AM -0500, Pierre-Louis Bossart wrote: + +int sdw_sysfs_slave_init(struct sdw_slave *slave) +{ + struct sdw_slave_sysfs *sysfs; + unsigned int src_dpns, sink_dpns, i, j; +

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-06 Thread Vinod Koul
On 06-05-19, 17:19, Greg KH wrote: > On Mon, May 06, 2019 at 09:42:35AM -0500, Pierre-Louis Bossart wrote: > > > > + > > > > +int sdw_sysfs_slave_init(struct sdw_slave *slave) > > > > +{ > > > > + struct sdw_slave_sysfs *sysfs; > > > > + unsigned int src_dpns, sink_dpns, i, j; > > > >

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-06 Thread Greg KH
On Mon, May 06, 2019 at 09:42:35AM -0500, Pierre-Louis Bossart wrote: > > > + > > > +int sdw_sysfs_slave_init(struct sdw_slave *slave) > > > +{ > > > + struct sdw_slave_sysfs *sysfs; > > > + unsigned int src_dpns, sink_dpns, i, j; > > > + int err; > > > + > > > + if (slave->sysfs) { > > > +

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-06 Thread Pierre-Louis Bossart
+static struct attribute_group sdw_slave_dev_attr_group = { + .attrs = slave_dev_attrs, +}; + +const struct attribute_group *sdw_slave_dev_attr_groups[] = { + _slave_dev_attr_group, + NULL +}; ATTRIBUTE_GROUP()? yes. + +int sdw_sysfs_slave_init(struct sdw_slave

Re: [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-04 Thread Greg KH
On Fri, May 03, 2019 at 08:00:25PM -0500, Pierre-Louis Bossart wrote: > Add DisCo Slave properties as device attributes. > Add a device for Data Port 0 which adds Dp0 properties as attributes. > Add devices for Source and Sink Data Ports, and add Dp-N > properties as attributes. > > The Slave,

[RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-03 Thread Pierre-Louis Bossart
Add DisCo Slave properties as device attributes. Add a device for Data Port 0 which adds Dp0 properties as attributes. Add devices for Source and Sink Data Ports, and add Dp-N properties as attributes. The Slave, DP0 and DPn cases are intentionally handled in separate files to avoid conflicts