[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200511090003.GT1375924@vkoul-mobl>
Date: Mon, 11 May 2020 14:30:03 +0530
From: Vinod Koul <vkoul@...nel.org>
To: "Liao, Bard" <bard.liao@...el.com>
Cc: Bard Liao <yung-chuan.liao@...ux.intel.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tiwai@...e.de" <tiwai@...e.de>,
"broonie@...nel.org" <broonie@...nel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"jank@...ence.com" <jank@...ence.com>,
"srinivas.kandagatla@...aro.org" <srinivas.kandagatla@...aro.org>,
"rander.wang@...ux.intel.com" <rander.wang@...ux.intel.com>,
"ranjani.sridharan@...ux.intel.com"
<ranjani.sridharan@...ux.intel.com>,
"hui.wang@...onical.com" <hui.wang@...onical.com>,
"pierre-louis.bossart@...ux.intel.com"
<pierre-louis.bossart@...ux.intel.com>,
"Kale, Sanyog R" <sanyog.r.kale@...el.com>,
"Blauciak, Slawomir" <slawomir.blauciak@...el.com>,
"Lin, Mengdong" <mengdong.lin@...el.com>
Subject: Re: [PATCH 3/3] soundwire: bus_type: add sdw_master_device support
On 11-05-20, 08:04, Liao, Bard wrote:
> > -----Original Message-----
> > From: Vinod Koul <vkoul@...nel.org>
> > Sent: Monday, May 11, 2020 2:32 PM
> > To: Bard Liao <yung-chuan.liao@...ux.intel.com>
> > Cc: alsa-devel@...a-project.org; linux-kernel@...r.kernel.org; tiwai@...e.de;
> > broonie@...nel.org; gregkh@...uxfoundation.org; jank@...ence.com;
> > srinivas.kandagatla@...aro.org; rander.wang@...ux.intel.com;
> > ranjani.sridharan@...ux.intel.com; hui.wang@...onical.com; pierre-
> > louis.bossart@...ux.intel.com; Kale, Sanyog R <sanyog.r.kale@...el.com>;
> > Blauciak, Slawomir <slawomir.blauciak@...el.com>; Lin, Mengdong
> > <mengdong.lin@...el.com>; Liao, Bard <bard.liao@...el.com>
> > Subject: Re: [PATCH 3/3] soundwire: bus_type: add sdw_master_device support
> >
> > On 30-04-20, 02:51, Bard Liao wrote:
> > > @@ -24,9 +24,14 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct
> > device *parent,
> > > struct sdw_master_prop *prop = NULL;
> > > int ret;
> > >
> > > - if (!bus->dev) {
> > > - pr_err("SoundWire bus has no device\n");
> > > - return -ENODEV;
> >
> > This check is removed and not moved into sdw_master_device_add() either, can
> > you add here or in patch 1 and keep checking the parent device please
>
> We will set bus->dev = &md->dev in the end of sdw_master_device_add().
We need to test if this is valid or not :)
> That's why we remove the test. But now I am wandering does it make sense
> to set bus->dev = &md->dev? Maybe it makes more sense to set bus->dev =
> sdw control device.
> A follow up question is that should slave device a child of bus device or
> master device? I would prefer bus device if it makes sense.
> I will check bus->dev and parent and remove bus->dev = &md->dev in the
> next version.
the parent is bus->dev and sdw_master_device created would be child of
this and should be set as such. You can remove it from bus object and
keep in sdw_master_device object, that is fine by me.
The sdw_slave is child of sdw_master_device now and looks to be set
correct.
--
~Vinod
Powered by blists - more mailing lists