From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <vkoul@kernel.org>, <pierre-louis.bossart@linux.intel.com>
Cc: <yung-chuan.liao@linux.intel.com>, <sanyog.r.kale@intel.com>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
<patches@opensource.cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH] soundwire: intel: Make DEV_NUM_IDA_MIN a module param
Date: Mon, 8 May 2023 11:39:01 +0100 [thread overview]
Message-ID: <20230508103901.7840-1-rf@opensource.cirrus.com> (raw)
Add a module param so that globally-unique peripheral ID
allocation is only enabled if wanted.
The globally-unique IDs were introduced by
commit c60561014257
("soundwire: bus: allow device number to be unique at system level")
and
commit 1f2dcf3a154a ("soundwire: intel: set dev_num_ida_min")
Assigning globally-unique IDs limits the total number of
peripherals in a system, and the above two commits limit to a
maximum of 8 peripherals. We now have hardware with more than
8 peripherals in total, so this limit is a problem. As the
original commit says that it is only for debug it can be made
optional.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
drivers/soundwire/intel_auxdevice.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c
index b21e86084f7b..9ebbf652e47a 100644
--- a/drivers/soundwire/intel_auxdevice.c
+++ b/drivers/soundwire/intel_auxdevice.c
@@ -23,8 +23,13 @@
#include "intel.h"
#include "intel_auxdevice.h"
-/* IDA min selected to avoid conflicts with HDaudio/iDISP SDI values */
-#define INTEL_DEV_NUM_IDA_MIN 4
+/*
+ * sdw_dev_num_min: Set to non-zero to enable globally-unique peripheral IDs.
+ * The value is the minimum ID that will be allocated.
+ */
+static int intel_dev_num_ida_min;
+module_param_named(sdw_dev_num_min, intel_dev_num_ida_min, int, 0444);
+MODULE_PARM_DESC(sdw_dev_num_min, "SoundWire Intel Master min globally-unique ID (0 to disable)");
#define INTEL_MASTER_SUSPEND_DELAY_MS 3000
@@ -148,7 +153,7 @@ static int intel_link_probe(struct auxiliary_device *auxdev,
cdns->msg_count = 0;
bus->link_id = auxdev->id;
- bus->dev_num_ida_min = INTEL_DEV_NUM_IDA_MIN;
+ bus->dev_num_ida_min = intel_dev_num_ida_min;
bus->clk_stop_timeout = 1;
sdw_cdns_probe(cdns);
--
2.30.2
next reply other threads:[~2023-05-08 10:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 10:39 Richard Fitzgerald [this message]
2023-05-08 13:59 ` [PATCH] soundwire: intel: Make DEV_NUM_IDA_MIN a module param Pierre-Louis Bossart
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=20230508103901.7840-1-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=pierre-louis.bossart@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