Re: [alsa-devel] [PATCH v4 08/15] soundwire: Add Slave status handling helpers

2017-12-03 Thread Vinod Koul
On Sun, Dec 03, 2017 at 09:07:29PM -0600, Pierre-Louis Bossart wrote: > On 12/3/17 11:08 AM, Vinod Koul wrote: > >On Fri, Dec 01, 2017 at 05:36:47PM -0600, Pierre-Louis Bossart wrote: > > > >>>+/* called with bus_lock held */ > >>>+static int sdw_get_device_num(struct sdw_slave *slave) > >>>+{ > >>

Re: [alsa-devel] [PATCH v4 08/15] soundwire: Add Slave status handling helpers

2017-12-03 Thread Pierre-Louis Bossart
On 12/3/17 11:08 AM, Vinod Koul wrote: On Fri, Dec 01, 2017 at 05:36:47PM -0600, Pierre-Louis Bossart wrote: +/* called with bus_lock held */ +static int sdw_get_device_num(struct sdw_slave *slave) +{ + int bit; + + bit = find_first_zero_bit(slave->bus->assigned, SDW_MAX_DEVICES); +

Re: [alsa-devel] [PATCH v4 08/15] soundwire: Add Slave status handling helpers

2017-12-03 Thread Vinod Koul
On Fri, Dec 01, 2017 at 05:36:47PM -0600, Pierre-Louis Bossart wrote: > >+/* called with bus_lock held */ > >+static int sdw_get_device_num(struct sdw_slave *slave) > >+{ > >+int bit; > >+ > >+bit = find_first_zero_bit(slave->bus->assigned, SDW_MAX_DEVICES); > >+if (bit == SDW_MAX_DEVI

Re: [alsa-devel] [PATCH v4 08/15] soundwire: Add Slave status handling helpers

2017-12-01 Thread Pierre-Louis Bossart
On 12/1/17 3:56 AM, Vinod Koul wrote: From: Sanyog Kale SoundWire Slaves report status to bus. Add helpers to handle the status changes. Signed-off-by: Hardik T Shah Signed-off-by: Sanyog Kale Signed-off-by: Vinod Koul --- drivers/soundwire/bus.c | 202 ++

[PATCH v4 08/15] soundwire: Add Slave status handling helpers

2017-12-01 Thread Vinod Koul
From: Sanyog Kale SoundWire Slaves report status to bus. Add helpers to handle the status changes. Signed-off-by: Hardik T Shah Signed-off-by: Sanyog Kale Signed-off-by: Vinod Koul --- drivers/soundwire/bus.c | 202 ++ drivers/soundwire/bus.h