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 Bossart

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; + i

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[] = { + &sdw_slave_dev_attr_group, + NULL +}; ATTRIBUTE_GROUP()? yes. + +int sdw_sysfs_slave_init(struct sdw_slave *