Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-09 Thread Greg KH
On Wed, May 08, 2019 at 03:57:49PM -0500, Pierre-Louis Bossart wrote: > > > On 5/8/19 11:59 AM, Greg KH wrote: > > On Wed, May 08, 2019 at 11:42:15AM -0500, Pierre-Louis Bossart wrote: > > > > > > > > > On 5/8/19 4:16 AM, Greg KH wrote: > > > > On Wed, May 08, 2019 at 01:16:06PM +0530, Vinod Ko

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-08 Thread Vinod Koul
On 08-05-19, 15:57, Pierre-Louis Bossart wrote: > > > On 5/8/19 11:59 AM, Greg KH wrote: > > On Wed, May 08, 2019 at 11:42:15AM -0500, Pierre-Louis Bossart wrote: > > > > > > > > > On 5/8/19 4:16 AM, Greg KH wrote: > > > > On Wed, May 08, 2019 at 01:16:06PM +0530, Vinod Koul wrote: > > > > > On

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-08 Thread Greg KH
On Wed, May 08, 2019 at 11:42:15AM -0500, Pierre-Louis Bossart wrote: > > > On 5/8/19 4:16 AM, Greg KH wrote: > > On Wed, May 08, 2019 at 01:16:06PM +0530, Vinod Koul wrote: > > > On 07-05-19, 17:49, Pierre-Louis Bossart wrote: > > > > > > > > > > The model here is that Master device is PCI or P

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-08 Thread Pierre-Louis Bossart
On 5/8/19 4:16 AM, Greg KH wrote: On Wed, May 08, 2019 at 01:16:06PM +0530, Vinod Koul wrote: On 07-05-19, 17:49, Pierre-Louis Bossart wrote: The model here is that Master device is PCI or Platform device and then creates a bus instance which has soundwire slave devices. So for any attrib

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-08 Thread Greg KH
On Wed, May 08, 2019 at 01:16:06PM +0530, Vinod Koul wrote: > On 07-05-19, 17:49, Pierre-Louis Bossart wrote: > > > > > > The model here is that Master device is PCI or Platform device and then > > > > creates a bus instance which has soundwire slave devices. > > > > > > > > So for any attribute

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-08 Thread Vinod Koul
On 07-05-19, 17:49, Pierre-Louis Bossart wrote: > > > > The model here is that Master device is PCI or Platform device and then > > > creates a bus instance which has soundwire slave devices. > > > > > > So for any attribute on Master device (which has properties as well and > > > representation

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-07 Thread Pierre-Louis Bossart
The model here is that Master device is PCI or Platform device and then creates a bus instance which has soundwire slave devices. So for any attribute on Master device (which has properties as well and representation in sysfs), device specfic struct (PCI/platfrom doesn't help). For slave that

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-07 Thread Greg KH
On Tue, May 07, 2019 at 04:33:31PM +0530, Vinod Koul wrote: > On 07-05-19, 07:54, Greg KH wrote: > > On Tue, May 07, 2019 at 10:57:32AM +0530, Vinod Koul wrote: > > > On 06-05-19, 21:24, Pierre-Louis Bossart wrote: > > > > > > > > > > +int sdw_sysfs_bus_init(struct sdw_bus *bus) > > > > > > +{ > >

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-07 Thread Vinod Koul
On 07-05-19, 07:54, Greg KH wrote: > On Tue, May 07, 2019 at 10:57:32AM +0530, Vinod Koul wrote: > > On 06-05-19, 21:24, Pierre-Louis Bossart wrote: > > > > > > > > +int sdw_sysfs_bus_init(struct sdw_bus *bus) > > > > > +{ > > > > > + struct sdw_master_sysfs *master; > > > > > + int err; >

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-06 Thread Greg KH
On Tue, May 07, 2019 at 10:57:32AM +0530, Vinod Koul wrote: > On 06-05-19, 21:24, Pierre-Louis Bossart wrote: > > > > > > +int sdw_sysfs_bus_init(struct sdw_bus *bus) > > > > +{ > > > > + struct sdw_master_sysfs *master; > > > > + int err; > > > > + > > > > + if (bus->sysfs) { >

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-06 Thread Vinod Koul
On 06-05-19, 21:24, Pierre-Louis Bossart wrote: > > > > +int sdw_sysfs_bus_init(struct sdw_bus *bus) > > > +{ > > > + struct sdw_master_sysfs *master; > > > + int err; > > > + > > > + if (bus->sysfs) { > > > + dev_err(bus->dev, "SDW sysfs is already initialized\n"); > > > + return

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-06 Thread Pierre-Louis Bossart
+int sdw_sysfs_bus_init(struct sdw_bus *bus) +{ + struct sdw_master_sysfs *master; + int err; + + if (bus->sysfs) { + dev_err(bus->dev, "SDW sysfs is already initialized\n"); + return -EIO; + } + + master = kzalloc(sizeof(*master), GFP_K

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-06 Thread Pierre-Louis Bossart
Thanks for the quick feedback Greg! +static const struct attribute_group sdw_master_node_group = { + .attrs = master_node_attrs, +}; + +static const struct attribute_group *sdw_master_node_groups[] = { + &sdw_master_node_group, + NULL +}; Minor nit, you can use the ATTRIBUTE_