All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Liao, Bard" <bard.liao@intel.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"tiwai@suse.de" <tiwai@suse.de>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"jank@cadence.com" <jank@cadence.com>,
	"srinivas.kandagatla@linaro.org" <srinivas.kandagatla@linaro.org>,
	"rander.wang@linux.intel.com" <rander.wang@linux.intel.com>,
	"ranjani.sridharan@linux.intel.com" 
	<ranjani.sridharan@linux.intel.com>,
	"hui.wang@canonical.com" <hui.wang@canonical.com>,
	"pierre-louis.bossart@linux.intel.com" 
	<pierre-louis.bossart@linux.intel.com>,
	"Kale, Sanyog R" <sanyog.r.kale@intel.com>,
	"Blauciak, Slawomir" <slawomir.blauciak@intel.com>,
	"Lin, Mengdong" <mengdong.lin@intel.com>
Subject: RE: [PATCH 3/3] soundwire: bus_type: add sdw_master_device support
Date: Mon, 11 May 2020 11:34:38 +0000	[thread overview]
Message-ID: <DM6PR11MB407432225D0DA6E671DBAF67FFA10@DM6PR11MB4074.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200511090003.GT1375924@vkoul-mobl>



> -----Original Message-----
> From: Vinod Koul <vkoul@kernel.org>
> Sent: Monday, May 11, 2020 5:00 PM
> To: Liao, Bard <bard.liao@intel.com>
> Cc: Bard Liao <yung-chuan.liao@linux.intel.com>; alsa-devel@alsa-project.org;
> linux-kernel@vger.kernel.org; tiwai@suse.de; broonie@kernel.org;
> gregkh@linuxfoundation.org; jank@cadence.com;
> srinivas.kandagatla@linaro.org; rander.wang@linux.intel.com;
> ranjani.sridharan@linux.intel.com; hui.wang@canonical.com; pierre-
> louis.bossart@linux.intel.com; Kale, Sanyog R <sanyog.r.kale@intel.com>;
> Blauciak, Slawomir <slawomir.blauciak@intel.com>; Lin, Mengdong
> <mengdong.lin@intel.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@kernel.org>
> > > Sent: Monday, May 11, 2020 2:32 PM
> > > To: Bard Liao <yung-chuan.liao@linux.intel.com>
> > > Cc: alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org;
> > > tiwai@suse.de; broonie@kernel.org; gregkh@linuxfoundation.org;
> > > jank@cadence.com; srinivas.kandagatla@linaro.org;
> > > rander.wang@linux.intel.com; ranjani.sridharan@linux.intel.com;
> > > hui.wang@canonical.com; pierre- louis.bossart@linux.intel.com; Kale,
> > > Sanyog R <sanyog.r.kale@intel.com>; Blauciak, Slawomir
> > > <slawomir.blauciak@intel.com>; Lin, Mengdong
> > > <mengdong.lin@intel.com>; Liao, Bard <bard.liao@intel.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.

Looks like we don't need the parent and fwnode parameter since we can
get them from bus->dev 😊

> 
> The sdw_slave is child of sdw_master_device now and looks to be set correct.

So, it will be
bus device
    -> master device
         -> slave device
right?

I have a question here. We have pm supported on bus and slave devices,
but not master device. Will pm work with this architecture?
Can it be
bus device
    -> master device & slave device?


> 
> --
> ~Vinod

WARNING: multiple messages have this Message-ID (diff)
From: "Liao, Bard" <bard.liao@intel.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: "pierre-louis.bossart@linux.intel.com"
	<pierre-louis.bossart@linux.intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"tiwai@suse.de" <tiwai@suse.de>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ranjani.sridharan@linux.intel.com"
	<ranjani.sridharan@linux.intel.com>,
	"hui.wang@canonical.com" <hui.wang@canonical.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"srinivas.kandagatla@linaro.org" <srinivas.kandagatla@linaro.org>,
	"jank@cadence.com" <jank@cadence.com>,
	"Lin, Mengdong" <mengdong.lin@intel.com>,
	"Blauciak, Slawomir" <slawomir.blauciak@intel.com>,
	"Kale, Sanyog R" <sanyog.r.kale@intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	"rander.wang@linux.intel.com" <rander.wang@linux.intel.com>
Subject: RE: [PATCH 3/3] soundwire: bus_type: add sdw_master_device support
Date: Mon, 11 May 2020 11:34:38 +0000	[thread overview]
Message-ID: <DM6PR11MB407432225D0DA6E671DBAF67FFA10@DM6PR11MB4074.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200511090003.GT1375924@vkoul-mobl>



> -----Original Message-----
> From: Vinod Koul <vkoul@kernel.org>
> Sent: Monday, May 11, 2020 5:00 PM
> To: Liao, Bard <bard.liao@intel.com>
> Cc: Bard Liao <yung-chuan.liao@linux.intel.com>; alsa-devel@alsa-project.org;
> linux-kernel@vger.kernel.org; tiwai@suse.de; broonie@kernel.org;
> gregkh@linuxfoundation.org; jank@cadence.com;
> srinivas.kandagatla@linaro.org; rander.wang@linux.intel.com;
> ranjani.sridharan@linux.intel.com; hui.wang@canonical.com; pierre-
> louis.bossart@linux.intel.com; Kale, Sanyog R <sanyog.r.kale@intel.com>;
> Blauciak, Slawomir <slawomir.blauciak@intel.com>; Lin, Mengdong
> <mengdong.lin@intel.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@kernel.org>
> > > Sent: Monday, May 11, 2020 2:32 PM
> > > To: Bard Liao <yung-chuan.liao@linux.intel.com>
> > > Cc: alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org;
> > > tiwai@suse.de; broonie@kernel.org; gregkh@linuxfoundation.org;
> > > jank@cadence.com; srinivas.kandagatla@linaro.org;
> > > rander.wang@linux.intel.com; ranjani.sridharan@linux.intel.com;
> > > hui.wang@canonical.com; pierre- louis.bossart@linux.intel.com; Kale,
> > > Sanyog R <sanyog.r.kale@intel.com>; Blauciak, Slawomir
> > > <slawomir.blauciak@intel.com>; Lin, Mengdong
> > > <mengdong.lin@intel.com>; Liao, Bard <bard.liao@intel.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.

Looks like we don't need the parent and fwnode parameter since we can
get them from bus->dev 😊

> 
> The sdw_slave is child of sdw_master_device now and looks to be set correct.

So, it will be
bus device
    -> master device
         -> slave device
right?

I have a question here. We have pm supported on bus and slave devices,
but not master device. Will pm work with this architecture?
Can it be
bus device
    -> master device & slave device?


> 
> --
> ~Vinod

  reply	other threads:[~2020-05-11 11:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 18:51 [PATCH 0/3] soundwire: bus_type: add sdw_master_device support Bard Liao
2020-04-29 18:51 ` Bard Liao
2020-04-29 18:51 ` [PATCH 1/3] soundwire: bus: rename sdw_bus_master_add/delete, add arguments Bard Liao
2020-04-29 18:51   ` Bard Liao
2020-04-29 18:51 ` [PATCH 2/3] soundwire: bus_type: introduce sdw_slave_type and sdw_master_type Bard Liao
2020-04-29 18:51   ` Bard Liao
2020-04-29 18:51 ` [PATCH 3/3] soundwire: bus_type: add sdw_master_device support Bard Liao
2020-04-29 18:51   ` Bard Liao
2020-05-11  6:32   ` Vinod Koul
2020-05-11  6:32     ` Vinod Koul
2020-05-11  8:04     ` Liao, Bard
2020-05-11  8:04       ` Liao, Bard
2020-05-11  9:00       ` Vinod Koul
2020-05-11  9:00         ` Vinod Koul
2020-05-11 11:34         ` Liao, Bard [this message]
2020-05-11 11:34           ` Liao, Bard
2020-05-11 11:41           ` Vinod Koul
2020-05-11 11:41             ` Vinod Koul
2020-05-11 19:00     ` Pierre-Louis Bossart
2020-05-12  3:30       ` Vinod Koul
2020-05-12  3:30         ` Vinod Koul
2020-05-12 14:36         ` Pierre-Louis Bossart
2020-05-12 15:59           ` Vinod Koul
2020-05-12 16:08             ` Pierre-Louis Bossart
2020-05-12 17:01               ` Pierre-Louis Bossart
2020-05-13 10:16                 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB407432225D0DA6E671DBAF67FFA10@DM6PR11MB4074.namprd11.prod.outlook.com \
    --to=bard.liao@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hui.wang@canonical.com \
    --cc=jank@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mengdong.lin@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rander.wang@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=slawomir.blauciak@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.