Re: [PATCH v2 2/4] soundwire: core: add device tree support for slave devices

2019-08-09 Thread Srinivas Kandagatla
On 09/08/2019 06:07, Vinod Koul wrote: On 08-08-19, 15:45, Srinivas Kandagatla wrote: This patch adds support to parsing device tree based SoundWire slave devices. Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/bus.c | 2 ++ drivers/soundwire/bus.h | 1 +

Re: [PATCH v2 2/4] soundwire: core: add device tree support for slave devices

2019-08-09 Thread Srinivas Kandagatla
On 09/08/2019 06:46, Vinod Koul wrote: +int sdw_of_find_slaves(struct sdw_bus *bus) +{ +    struct device *dev = bus->dev; +    struct device_node *node; + +    for_each_child_of_node(bus->dev->of_node, node) { +    struct sdw_slave_id id; +    const char *compat = NULL; +    int

Re: [PATCH v2 2/4] soundwire: core: add device tree support for slave devices

2019-08-08 Thread Vinod Koul
On 08-08-19, 16:17, Srinivas Kandagatla wrote: > Thanks for taking time to review. > > On 08/08/2019 16:00, Pierre-Louis Bossart wrote: > > > > > @@ -35,6 +36,7 @@ static int sdw_slave_add(struct sdw_bus *bus, > > >   slave->dev.release = sdw_slave_release; > > >   slave->dev.bus =

Re: [PATCH v2 2/4] soundwire: core: add device tree support for slave devices

2019-08-08 Thread Vinod Koul
On 08-08-19, 15:45, Srinivas Kandagatla wrote: > This patch adds support to parsing device tree based > SoundWire slave devices. > > Signed-off-by: Srinivas Kandagatla > --- > drivers/soundwire/bus.c | 2 ++ > drivers/soundwire/bus.h | 1 + > drivers/soundwire/slave.c | 47

Re: [PATCH v2 2/4] soundwire: core: add device tree support for slave devices

2019-08-08 Thread Srinivas Kandagatla
Thanks for taking time to review. On 08/08/2019 16:00, Pierre-Louis Bossart wrote: @@ -35,6 +36,7 @@ static int sdw_slave_add(struct sdw_bus *bus,   slave->dev.release = sdw_slave_release;   slave->dev.bus = _bus_type; +    slave->dev.of_node = of_node_get(to_of_node(fwnode));

Re: [PATCH v2 2/4] soundwire: core: add device tree support for slave devices

2019-08-08 Thread Pierre-Louis Bossart
@@ -35,6 +36,7 @@ static int sdw_slave_add(struct sdw_bus *bus, slave->dev.release = sdw_slave_release; slave->dev.bus = _bus_type; + slave->dev.of_node = of_node_get(to_of_node(fwnode)); shouldn't this protected by #if IS_ENABLED(CONFIG_OF) ? slave->bus = bus;

[PATCH v2 2/4] soundwire: core: add device tree support for slave devices

2019-08-08 Thread Srinivas Kandagatla
This patch adds support to parsing device tree based SoundWire slave devices. Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/bus.c | 2 ++ drivers/soundwire/bus.h | 1 + drivers/soundwire/slave.c | 47 +++ 3 files changed, 50 insertions(+)