[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMEQRlviWBJA0Rwd@kroah.com>
Date: Wed, 9 Jun 2021 21:02:30 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc: Vinod Koul <vkoul@...nel.org>, alsa-devel@...a-project.org,
Leon Romanovsky <leon@...nel.org>,
linux-kernel@...r.kernel.org,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
hui.wang@...onical.com, Jason Gunthorpe <jgg@...dia.com>,
Dave Ertman <david.m.ertman@...el.com>,
sanyog.r.kale@...el.com,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
rander.wang@...ux.intel.com, bard.liao@...el.com
Subject: Re: [PATCH v4] soundwire: intel: move to auxiliary bus
On Wed, Jun 09, 2021 at 09:44:08AM -0500, Pierre-Louis Bossart wrote:
> The model is exactly the same as what we have today with the platform
> devices. We did not add ANY new fields or information, what is passed in
> that structure is exactly the same as what we do upstream today with the
> platform devices.
>
> To make my point, here is the structure in intel.h as of v5.13-rc1
>
> struct sdw_intel_link_res {
> struct platform_device *pdev;
> void __iomem *mmio_base; /* not strictly needed, useful for debug */
> void __iomem *registers;
> void __iomem *shim;
> void __iomem *alh;
> int irq;
> const struct sdw_intel_ops *ops;
> struct device *dev;
> struct mutex *shim_lock; /* protect shared registers */
> u32 *shim_mask;
> u32 clock_stop_quirks;
> u32 link_mask;
> struct sdw_cdns *cdns;
> struct list_head list;
> };
>
> and here's what we suggested in this patch:
>
> struct sdw_intel_link_res {
> void __iomem *mmio_base; /* not strictly needed, useful for debug */
> void __iomem *registers;
> void __iomem *shim;
> void __iomem *alh;
> int irq;
> const struct sdw_intel_ops *ops;
> struct device *dev;
> struct mutex *shim_lock; /* protect shared registers */
> u32 *shim_mask;
> u32 clock_stop_quirks;
> u32 link_mask;
> struct sdw_cdns *cdns;
> struct list_head list;
> };
>
> You will notice that we removed the platform_device *pdev, but embedded this
> structure into a larger one to make use of container_of()
>
> struct sdw_intel_link_dev {
> struct auxiliary_device auxdev;
> struct sdw_intel_link_res link_res;
> };
>
> That's it. We did not change anything else, all the other fields are
> identical. We are only changing the TYPE of device and the interfaces for
> probe/remove but using the same information and the same device hierarchy.
And this is the correct thing to do, you have done it properly here,
nice work.
greg k-h
Powered by blists - more mailing lists