From: Greg KH <gregkh@linuxfoundation.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Vinod Koul <vkoul@kernel.org>,
alsa-devel@alsa-project.org, Leon Romanovsky <leon@kernel.org>,
linux-kernel@vger.kernel.org,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
hui.wang@canonical.com, Jason Gunthorpe <jgg@nvidia.com>,
Dave Ertman <david.m.ertman@intel.com>,
sanyog.r.kale@intel.com,
Bard Liao <yung-chuan.liao@linux.intel.com>,
rander.wang@linux.intel.com, bard.liao@intel.com
Subject: Re: [PATCH v4] soundwire: intel: move to auxiliary bus
Date: Wed, 9 Jun 2021 21:02:30 +0200 [thread overview]
Message-ID: <YMEQRlviWBJA0Rwd@kroah.com> (raw)
In-Reply-To: <07dbe0a2-0abb-810b-ef39-b83511d3f3e0@linux.intel.com>
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
next prev parent reply other threads:[~2021-06-09 19:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 5:21 [PATCH v4] soundwire: intel: move to auxiliary bus Bard Liao
2021-05-25 18:30 ` Pierre-Louis Bossart
2021-05-31 10:19 ` Vinod Koul
2021-06-01 13:56 ` Pierre-Louis Bossart
2021-06-09 4:46 ` Vinod Koul
2021-06-09 14:44 ` Pierre-Louis Bossart
2021-06-09 15:10 ` Jason Gunthorpe
2021-06-09 16:00 ` Pierre-Louis Bossart
2021-06-11 11:26 ` Vinod Koul
2021-06-11 13:29 ` Greg KH
2021-06-09 19:02 ` Greg KH [this message]
2021-06-11 11:59 ` Vinod Koul
2021-06-11 14:51 ` Pierre-Louis Bossart
2021-06-14 4:43 ` Vinod Koul
2021-06-14 4:42 ` 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=YMEQRlviWBJA0Rwd@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=bard.liao@intel.com \
--cc=david.m.ertman@intel.com \
--cc=hui.wang@canonical.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox