From patchwork Mon May 8 10:39:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 680233 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E57FC77B7F for ; Mon, 8 May 2023 10:40:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8E122122C; Mon, 8 May 2023 12:39:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8E122122C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683542436; bh=nzYwOM4J+rUoG6e4vx4I1T40A9eqFOzlrLKgr1GlAus=; h=To:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From:Reply-To:Cc:From; b=Gtt9YG7KD2+HynGZPwGKQFuXTKDLY2QsxUKgl0tZCJ8AJZq0kCQX4OkfbDseDZpBu ahasm/sPySx+Z4QVJlegJrrH11FA9hwVJT7sXvMFRIJC5Xioi62ihHkbeGGZW4qjYn HvHp04Mxs/9x7LxIeTSsFnCrS0QBGi2j+g+wXIvQ= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 368ACF80087; Mon, 8 May 2023 12:39:21 +0200 (CEST) To: , Subject: [PATCH] soundwire: intel: Make DEV_NUM_IDA_MIN a module param Date: Mon, 8 May 2023 11:39:01 +0100 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <168354236012.26.18372481370341690989@mailman-core.alsa-project.org> X-Patchwork-Original-From: Richard Fitzgerald via Alsa-devel From: Richard Fitzgerald Reply-To: Richard Fitzgerald 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 Content-Disposition: inline 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 --- 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);