From: Vinod Koul <vinod.koul@intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
ALSA <alsa-devel@alsa-project.org>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Sudheer Papothi <spapothi@codeaurora.org>,
Takashi <tiwai@suse.de>,
plai@codeaurora.org, LKML <linux-kernel@vger.kernel.org>,
patches.audio@intel.com, Mark <broonie@kernel.org>,
srinivas.kandagatla@linaro.org,
Sagar Dharia <sdharia@codeaurora.org>,
alan@linux.intel.com
Subject: Re: [alsa-devel] [PATCH v4 03/15] soundwire: Add Master registration
Date: Sun, 3 Dec 2017 22:11:20 +0530 [thread overview]
Message-ID: <20171203164119.GL32417@localhost> (raw)
In-Reply-To: <435d9db4-eb3c-f4b4-d978-e5d10b921f71@linux.intel.com>
On Fri, Dec 01, 2017 at 04:10:55PM -0600, Pierre-Louis Bossart wrote:
> On 12/1/17 3:56 AM, Vinod Koul wrote:
> >A Master registers with SoundWire bus and scans the firmware provided
>
> nitpick: is the 'register' correct? You create a bus instance for each
> hardware master interface. Or is my brain fried?
naah, thankfully it is not :)
I will reword this, I see it can cause ambguity :)
> >+int sdw_add_bus_master(struct sdw_bus *bus)
> >+{
> >+ int ret;
> >+
> >+ if (!bus->dev) {
> >+ pr_err("SoundWire bus has no device");
> >+ return -ENODEV;
> >+ }
> >+
> >+ mutex_init(&bus->bus_lock);
> >+ INIT_LIST_HEAD(&bus->slaves);
> >+
> >+ /*
> >+ * Device numbers in SoundWire are 0 thru 15 with 0 being
> >+ * Enumeration device number and 15 broadcast device number. So
> >+ * they are not used for assignment so mask these and other
> >+ * higher bits
>
> device 14 is used for the master and is not supported by these patches.
> While allowed, if you use device 12 and 13 (groups) you can't get the status
> information in a PING command so the recommendation is to avoid them.
> Those device numbers should never be used really (on top of 0 and 15 as
> explained above)
Yeah we should also exclude 12 thru 14 here. The group alllocation when done
need to do differently that this one, so will mask those too.
> >+void sdw_extract_slave_id(struct sdw_bus *bus,
> >+ u64 addr, struct sdw_slave_id *id)
> >+{
> >+ dev_dbg(bus->dev, "SDW Slave Addr: %llx", addr);
> >+
> >+ /*
> >+ * Spec definition
> >+ * Register Bit Contents
> >+ * DevId_0 [7:4] 47:44 sdw_version
> >+ * DevId_0 [3:0] 43:40 unique_id
> >+ * DevId_1 39:32 mfg_id [15:8]
> >+ * DevId_2 31:24 mfg_id [7:0]
>
> Add a reference to mid.mipi.org (here or in the summary) ?
Will add in summary, makes sense on that page
> >+int sdw_acpi_find_slaves(struct sdw_bus *bus)
> >+{
> >+ struct acpi_device *adev, *parent;
> >+
> >+ parent = ACPI_COMPANION(bus->dev);
> >+ if (!parent) {
> >+ dev_err(bus->dev, "Can't find parent for acpi bind\n");
> >+ return -ENODEV;
> >+ }
> >+
> >+ list_for_each_entry(adev, &parent->children, node) {
> >+ unsigned long long addr;
> >+ struct sdw_slave_id id;
> >+ unsigned int link_id;
> >+ acpi_status status;
> >+
> >+ status = acpi_evaluate_integer(adev->handle,
> >+ METHOD_NAME__ADR, NULL, &addr);
> >+
> >+ if (ACPI_FAILURE(status)) {
> >+ dev_err(bus->dev, "_ADR resolution failed: %x\n",
> >+ status);
> >+ return status;
> >+ }
> >+
> >+ /* Extract link id from ADR, it is from 48 to 51 bits */
>
> nitpick: in bits 51..48 as defined in the MIPI SoundWire DisCo spec.
ok
> >+/* SDW Enumeration Device Number */
> >+#define SDW_ENUM_DEV_NUM 0
>
> add
> SDW_GROUP12_DEV_NUM 12
> SDW_GROUP12_DEV_NUM 13
you mean SDW_GROUP13_DEV_NUM :D
> SDW_MASTER_DEV_NUM 14 /* not supported in these patches */
These dont help now as we dont support, so kind of dead code.
Lets add them when we really support it
--
~Vinod
next prev parent reply other threads:[~2017-12-03 16:41 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 9:56 [PATCH v4 00/15] soundwire: Add a new SoundWire subsystem Vinod Koul
2017-12-01 9:56 ` [PATCH v4 01/15] Documentation: Add SoundWire summary Vinod Koul
2017-12-01 9:56 ` [PATCH v4 02/15] soundwire: Add SoundWire bus type Vinod Koul
2017-12-01 9:56 ` [PATCH v4 03/15] soundwire: Add Master registration Vinod Koul
2017-12-01 22:10 ` [alsa-devel] " Pierre-Louis Bossart
2017-12-03 16:41 ` Vinod Koul [this message]
2017-12-04 2:44 ` Pierre-Louis Bossart
2017-12-04 2:59 ` Vinod Koul
2017-12-01 9:56 ` [PATCH v4 04/15] soundwire: Add MIPI DisCo property helpers Vinod Koul
2017-12-01 22:49 ` [alsa-devel] " Pierre-Louis Bossart
2017-12-03 16:52 ` Vinod Koul
2017-12-04 2:50 ` Pierre-Louis Bossart
2017-12-01 9:56 ` [PATCH v4 05/15] soundwire: Add SoundWire MIPI defined registers Vinod Koul
2017-12-01 9:56 ` [PATCH v4 06/15] soundwire: Add IO transfer Vinod Koul
2017-12-01 23:27 ` [alsa-devel] " Pierre-Louis Bossart
2017-12-03 17:04 ` Vinod Koul
2017-12-04 3:01 ` [alsa-devel] " Pierre-Louis Bossart
2017-12-05 6:31 ` Vinod Koul
2017-12-05 13:43 ` Pierre-Louis Bossart
2017-12-05 14:48 ` Pierre-Louis Bossart
2017-12-06 5:58 ` [alsa-devel] " Vinod Koul
2017-12-06 13:32 ` Pierre-Louis Bossart
2017-12-06 14:44 ` [alsa-devel] " Vinod Koul
2017-12-01 9:56 ` [PATCH v4 07/15] regmap: Add SoundWire bus support Vinod Koul
2017-12-01 9:56 ` [PATCH v4 08/15] soundwire: Add Slave status handling helpers Vinod Koul
2017-12-01 23:36 ` [alsa-devel] " Pierre-Louis Bossart
2017-12-03 17:08 ` Vinod Koul
2017-12-04 3:07 ` Pierre-Louis Bossart
2017-12-04 3:13 ` Vinod Koul
2017-12-01 9:56 ` [PATCH v4 09/15] soundwire: Add slave status handling Vinod Koul
2017-12-01 23:52 ` [alsa-devel] " Pierre-Louis Bossart
2017-12-03 17:11 ` Vinod Koul
2017-12-04 3:11 ` [alsa-devel] " Pierre-Louis Bossart
2017-12-04 3:21 ` Vinod Koul
2017-12-04 3:52 ` Pierre-Louis Bossart
2017-12-06 9:44 ` Vinod Koul
2017-12-01 9:56 ` [PATCH v4 10/15] soundwire: Add sysfs for SoundWire DisCo properties Vinod Koul
2017-12-01 9:56 ` [PATCH v4 11/15] soundwire: cdns: Add cadence library Vinod Koul
2017-12-01 9:56 ` [PATCH v4 12/15] soundwire: cdns: Add sdw_master_ops and IO transfer support Vinod Koul
2017-12-02 0:02 ` Pierre-Louis Bossart
2017-12-03 17:10 ` Vinod Koul
2017-12-01 9:56 ` [PATCH v4 13/15] soundwire: intel: Add Intel Master driver Vinod Koul
2017-12-01 9:56 ` [PATCH v4 14/15] soundwire: intel: Add Intel init module Vinod Koul
2017-12-01 9:56 ` [PATCH v4 15/15] MAINTAINERS: Add SoundWire entry Vinod Koul
2017-12-02 0:24 ` [PATCH v4 00/15] soundwire: Add a new SoundWire subsystem Pierre-Louis Bossart
2017-12-03 17:12 ` 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=20171203164119.GL32417@localhost \
--to=vinod.koul@intel.com \
--cc=alan@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches.audio@intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=plai@codeaurora.org \
--cc=sdharia@codeaurora.org \
--cc=spapothi@codeaurora.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).