Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-26 Thread Pierre-Louis Bossart
On 3/24/21 10:36 AM, Greg KH wrote: On Wed, Mar 24, 2021 at 09:55:01AM -0500, Pierre-Louis Bossart wrote: Note at this point it would mean an API change and impact the existing Nvidia/Mellanox code, we are using the same sequence as them THere is no "stable api" in the kernel, so if

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-24 Thread Greg KH
On Wed, Mar 24, 2021 at 09:55:01AM -0500, Pierre-Louis Bossart wrote: > Note at this point it would mean an API change and impact the existing > Nvidia/Mellanox code, we are using the same sequence as them THere is no "stable api" in the kernel, so if something has to change, that's fine, we can

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-24 Thread Pierre-Louis Bossart
On 3/24/21 5:50 AM, Vinod Koul wrote: On 23-03-21, 12:29, Pierre-Louis Bossart wrote: Thanks Greg and Vinod for the reviews -static int intel_master_probe(struct platform_device *pdev) +static int intel_link_probe(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id) {

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-24 Thread Pierre-Louis Bossart
Note that the auxiliary bus API has separate init and add steps, which requires more attention in the error unwinding paths. The main loop needs to deal with kfree() and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-24 Thread Vinod Koul
On 23-03-21, 12:29, Pierre-Louis Bossart wrote: > Thanks Greg and Vinod for the reviews > > > > > -static int intel_master_probe(struct platform_device *pdev) > > > > +static int intel_link_probe(struct auxiliary_device *auxdev, const > > > > struct auxiliary_device_id *id) > > > > { > > > > -

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-24 Thread Greg KH
On Tue, Mar 23, 2021 at 02:14:18PM -0500, Pierre-Louis Bossart wrote: > > > On 3/23/21 1:32 PM, Greg KH wrote: > > On Tue, Mar 23, 2021 at 01:04:49PM -0500, Pierre-Louis Bossart wrote: > > > > > > > > Note that the auxiliary bus API has separate init and add steps, which > > > > > requires more

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-23 Thread Pierre-Louis Bossart
On 3/23/21 1:32 PM, Greg KH wrote: On Tue, Mar 23, 2021 at 01:04:49PM -0500, Pierre-Louis Bossart wrote: Note that the auxiliary bus API has separate init and add steps, which requires more attention in the error unwinding paths. The main loop needs to deal with kfree() and

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-23 Thread Greg KH
On Tue, Mar 23, 2021 at 01:04:49PM -0500, Pierre-Louis Bossart wrote: > > > > Note that the auxiliary bus API has separate init and add steps, which > > > requires more attention in the error unwinding paths. The main loop > > > needs to deal with kfree() and auxiliary_device_uninit() for the > >

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-23 Thread Pierre-Louis Bossart
Note that the auxiliary bus API has separate init and add steps, which requires more attention in the error unwinding paths. The main loop needs to deal with kfree() and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-23 Thread Pierre-Louis Bossart
Thanks Greg and Vinod for the reviews -static int intel_master_probe(struct platform_device *pdev) +static int intel_link_probe(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id) { - struct device *dev = >dev; + struct device *dev = >dev; + struct

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-23 Thread Greg KH
On Tue, Mar 23, 2021 at 12:18:46PM +0530, Vinod Koul wrote: > On 23-03-21, 08:43, Bard Liao wrote: > > From: Pierre-Louis Bossart > > > > Now that the auxiliary_bus exists, there's no reason to use platform > > devices as children of a PCI device any longer. > > > > This patch refactors the

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-23 Thread Greg KH
On Tue, Mar 23, 2021 at 08:43:25AM +0800, Bard Liao wrote: > From: Pierre-Louis Bossart > > Now that the auxiliary_bus exists, there's no reason to use platform > devices as children of a PCI device any longer. > > This patch refactors the code by extending a basic auxiliary device > with Intel

Re: [PATCH] soundwire: intel: move to auxiliary bus

2021-03-23 Thread Vinod Koul
On 23-03-21, 08:43, Bard Liao wrote: > From: Pierre-Louis Bossart > > Now that the auxiliary_bus exists, there's no reason to use platform > devices as children of a PCI device any longer. > > This patch refactors the code by extending a basic auxiliary device > with Intel link-specific

[PATCH] soundwire: intel: move to auxiliary bus

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart Now that the auxiliary_bus exists, there's no reason to use platform devices as children of a PCI device any longer. This patch refactors the code by extending a basic auxiliary device with Intel link-specific structures that need to be passed between controller and