From patchwork Tue Mar 9 14:15:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 395987 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2621064jai; Tue, 9 Mar 2021 06:16:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7qSZTQHp+z88eSd3Dwil6taCxjNMNJoDh0g3NiaT6f6OysCBow9QcB1J99yDqNrX4wZEL X-Received: by 2002:a17:906:a2d3:: with SMTP id by19mr16150721ejb.98.1615299392983; Tue, 09 Mar 2021 06:16:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615299392; cv=none; d=google.com; s=arc-20160816; b=PUMHI+mw5Yr1K5bHY7Guam+G0ZyjnjkUgS2Vd3Yvhg17QNdebVfHEgVpgRWrcVlaPb lyVH4ltks/b7HCv2REdskvdauaOjx5WNX3ROrqGzJeITsAsumlxNrnFGkdP+Z+Q/C56O P8cwICQqzDoCCPt6wJksBcdrl8+F2a0yenfmePSnTEoItjtZAYTY+Tk3jg37n5TKd3S3 QOnb4lyb7oBn6hoxQ1B4GvbcvELyvYm9VYhkraRmoz8HGzBg7YvEKTXP+VJ0Fu3c0DL6 3XhQLjx8Ll0Tfl4n/0x4CLMsU4V+MgvAiSu3UMVPMjuWuv4KxeWsOgI5hTTbfJ6sffuU HlpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7gDmC37JxzQ5hGBDDct3/T0SwytsBBauAUrn0ZFgLOw=; b=cc6bvSVDzqPv8UvPtVtkco2bzAP4OstlIhPubmn5U5QjpKii79Tj6OmwfsQhIhHTcz i/Sa2FULeYofV+OJwnwhhXg0YoUdd0aWm12f5SiGBH2bQu9uPUGcHO686FlDC5ZG6fT8 1fiRB16Tm00NGhGTJnzF1eBv8c27b1ufdKrIJNCspVsBRPBpuYSvlW6kNTbxbqbd/Oyk BoUTFCsV8WnOUoujPSlmOnnLe59/mqinsMg/3ftXMaKkCcA/DiDJRIJlzB2vno6sldDN zN741i0EULyQFDUKvU5MGzx9tjiAKuqExZbQA1LGdV8dRL7E4c/5RIJe0TcmmXLhgiRh txpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="VMfw2/F3"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h26si9227740edq.453.2021.03.09.06.16.32; Tue, 09 Mar 2021 06:16:32 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="VMfw2/F3"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbhCIOQA (ORCPT + 6 others); Tue, 9 Mar 2021 09:16:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbhCIOPf (ORCPT ); Tue, 9 Mar 2021 09:15:35 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5F30C06174A for ; Tue, 9 Mar 2021 06:15:34 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id a18so15851240wrc.13 for ; Tue, 09 Mar 2021 06:15:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7gDmC37JxzQ5hGBDDct3/T0SwytsBBauAUrn0ZFgLOw=; b=VMfw2/F318b244pqC02hJYJaHUKyllWsXMoL96g5Bx3Exg5BpOWKfk396oEP6ylN6h Htuzw4Jb7IrefcX1arcdOlAxcp3FHx4SG6Vm9yRoboFzvTvQqx+auDxgKm66yNq6C9wK sFnQ92HhHYDwTwdbOUEI6JfWH7wU83fWUqXByEvXQTp1VgaSpZn1TpV6DhwWk7vDMsis QWltgCtEx4awHj0350HhRtv3mPIu3YT9AFda+jjqlKDLQDq32/XVDJPFuHclO6J49rV3 fCGiBPfkiBvcLRzvc2ktHCGlUR1bNS9FH+0nk8Nm5FCDVS2Wr5m6NK0Y2B/8zs5LjjcY JQJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7gDmC37JxzQ5hGBDDct3/T0SwytsBBauAUrn0ZFgLOw=; b=TgfzQXt6zSeqMUdU+AuFQwMLNhoTx+fAChT0mwndv523X6xzmv36xvrZ6431PcvJlT 5I716NmsXfMg10Dw2N+9u78GZO95cyQdn1GqIMO8B9YxkL3raAw5KezcE3Q+e+bGlSoj IewcxDqbxLjOGvfI0r4TawbH9GLSI1CxyCwZ11kVMiwmB5E6JGhfBLu+Pl02LPWObkvb r+ZXgqgfwmTAC3QKw9QIjtLh03woicvp/WVBJaAvjcntFFUyLDhYZWJS7xgZeJhAl4eh N0FmR7k3aToCMEjRVZEf0dEWSC+/mT9U+mHX5KEuwfQAvCY86SSfhw585IudVP75j0az 9Wdg== X-Gm-Message-State: AOAM532X2XKCgF1H0RlDjjXK65n1lt/i2TL+qriUG5rS2gOdgWQkPxtj 547gkHgCIFkAYm0ILc/w7Eq7ig== X-Received: by 2002:adf:e34f:: with SMTP id n15mr28566940wrj.224.1615299333563; Tue, 09 Mar 2021 06:15:33 -0800 (PST) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id u20sm28007579wru.6.2021.03.09.06.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 06:15:32 -0800 (PST) From: Srinivas Kandagatla To: broonie@kernel.org, vkoul@kernel.org Cc: robh@kernel.org, devicetree@vger.kernel.org, yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Srinivas Kandagatla Subject: [PATCH v2 1/5] soundwire: add static port mapping support Date: Tue, 9 Mar 2021 14:15:10 +0000 Message-Id: <20210309141514.24744-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210309141514.24744-1-srinivas.kandagatla@linaro.org> References: <20210309141514.24744-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some of the SoundWire device ports are statically mapped to Controller ports during design, however there is no way to expose this information to the controller. Controllers like Qualcomm ones use this info to setup static bandwith parameters for those ports. A generic port allocation is not possible in this cases! So this patch adds a new member m_port_map to struct sdw_slave to expose this static map. Signed-off-by: Srinivas Kandagatla --- include/linux/soundwire/sdw.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.21.0 diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index d08039d65825..2f52d6609076 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -614,6 +614,7 @@ struct sdw_slave_ops { * @debugfs: Slave debugfs * @node: node for bus list * @port_ready: Port ready completion flag for each Slave port + * @m_port_map: static Master port map for each Slave port * @dev_num: Current Device Number, values can be 0 or dev_num_sticky * @dev_num_sticky: one-time static Device Number assigned by Bus * @probed: boolean tracking driver state @@ -645,6 +646,7 @@ struct sdw_slave { #endif struct list_head node; struct completion port_ready[SDW_MAX_PORTS]; + unsigned int m_port_map[SDW_MAX_PORTS]; enum sdw_clk_stop_mode curr_clk_stop_mode; u16 dev_num; u16 dev_num_sticky;