From patchwork Fri Jun 7 08:56:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 166076 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp368681ili; Fri, 7 Jun 2019 01:57:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmSMCAauXmbykZRrAzzOGg6kO8Jc+u06H0BIdIQqRxXchzsgkntxE/qz8BdoaIO0zgqFSm X-Received: by 2002:a62:8c97:: with SMTP id m145mr56857277pfd.62.1559897851832; Fri, 07 Jun 2019 01:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559897851; cv=none; d=google.com; s=arc-20160816; b=PksH1Mn1BrvNfU4zITwDesnJzwj0ppBPpC5bx+NjL3OZD2jCY2BMmHzxvxfD1Kc88g WQ/DuVs0DwT7xscFmoRWS2t3SQOQvXJwcSMVDdYgbrbJ9FTqL6pw+tIxmq81PtTMA3di wCyOyFazuBm46D+D1VyujMSpd1CsmSrPubC0maQvqtieMNRrMSukqd7jQcJ5sNBhmVCs pLppFpmjc3UmRa9AgCknXaHsN0IRwf/NOO6IjymcEXv2185qMRrUSI5B3NC2vg705cR+ OquOOI9naDDoZKyKsJ+WSbxJbl7ohHEh0GDl7HGKJNbITfNPD3jxncAfrzFfXaUDzWc+ kr0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Nk/ajWW2fVH/9L9yBJ6zZfHfEglcI3MSG9DcJjyJ+A=; b=YEDiHj9M8wgoi75S1qsSrOBORi0MlQqZlV3v4pmAQ/fTW1HsWbprevstORgYxmvR6b 6Hba8XSYfk4up0h9y21+WWPau28jt+d3m9dLFUC1JQ8ZGFFdOBWtOjD/ti9HI5reZJh0 0GRGBCFiVIvWEXNlOhtCy3T0bTiT6NSAkLN137ZBG3nAaE8QhXf02Uu5J7PN3kSU4E4H COGoho8PD9to0VgrLE/ggUBCJsPL55w6E40YBZKfpr8KyqZ92+NNTndgB6BCjr20esPJ 6PCSo4p5gMcmLazfNs+K89SXCCekosYVQ84VF7tVQzMFGQ2aEEGdpp+YuY5EFK1YPs72 o+Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lGf990GU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id z3si1254187plo.159.2019.06.07.01.57.31; Fri, 07 Jun 2019 01:57:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lGf990GU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727705AbfFGI5M (ORCPT + 30 others); Fri, 7 Jun 2019 04:57:12 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42608 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727267AbfFGI5K (ORCPT ); Fri, 7 Jun 2019 04:57:10 -0400 Received: by mail-wr1-f67.google.com with SMTP id x17so1304794wrl.9 for ; Fri, 07 Jun 2019 01:57:08 -0700 (PDT) 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=3Nk/ajWW2fVH/9L9yBJ6zZfHfEglcI3MSG9DcJjyJ+A=; b=lGf990GUa32z0NWIrq3IT6/tA3Tr8dWI3lrZM3jaURZmclg6wXHKJYFjEWQHzF3XIg /m/7PkryJ8qIuEbig95LkE1ACJ7vLBmvws+COjHV+uc5rLqRm40f7TDDINmKXQquq7s7 W5SkXYwzLakiKIMVw/RMB9xwCfM0uhLqzlxAULjh8N78xMuyizZS4nojgOYLt0c9LUjn qZrx1OdGESo+38kl0Enl+Gp4WMpsRkxPx/y60Vd8NvYLkHJs0Cfq0ZhqWjYwlw606Pos wS77pebk39PKtajivrkP1jwJ1U94AyJUtC+grClHgRgbn0tbUqbqnTvZlInDE8HmL6N7 ETyw== 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=3Nk/ajWW2fVH/9L9yBJ6zZfHfEglcI3MSG9DcJjyJ+A=; b=jf7GBbNzpBorf09ULwE+Cq9b2UWT2Yw/6Lm3sB5cQkOenwOYrmZfGq6LUuRkU+Z5hY h655xtQ4vRuf5E6vew0VpNopSWXEzNVTkWm3/ueyJHeI/XTl8tAdnSHXLzzA3hVzrQTb dGmczsGxLDX3bxmOKgqBuPUcA2xZ/i/iqGGUrPc7NbD+r7b4/3Vgd0lOYW3UXjK4f4ps yFbBA3u3gwh66fsLAFsMEYhf1tscW3rugtACvqVi9OYlDzBhO52qk/hgC6lpDUE1zsBt 2hzIYwvVHtrPTMTsXDbF0s/j9xcKkZFzVOmlSBA0C+8tYLi+E0+N988ttbrNoVjzx7+9 OeDw== X-Gm-Message-State: APjAAAVl3U5zTLqycvLZDtny697iUtsFNzxKHMu00wGNIOxWAbApIFWY Jt3DiZd1/PYNcAt4f8y6/EZqKg== X-Received: by 2002:adf:ee49:: with SMTP id w9mr9789849wro.112.1559897828100; Fri, 07 Jun 2019 01:57:08 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id d10sm2035308wrh.91.2019.06.07.01.57.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 07 Jun 2019 01:57:07 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, vkoul@kernel.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, mark.rutland@arm.com, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [RFC PATCH 1/6] ASoC: core: add support to snd_soc_dai_get_sdw_stream() Date: Fri, 7 Jun 2019 09:56:38 +0100 Message-Id: <20190607085643.932-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607085643.932-1-srinivas.kandagatla@linaro.org> References: <20190607085643.932-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On platforms which have smart speaker amplifiers connected via soundwire and modeled as aux devices in ASoC, in such usecases machine driver should be able to get sdw master stream from dai so that it can use the runtime stream to setup slave streams. soundwire already as a set function, get function would provide more flexibility to above configurations. Signed-off-by: Srinivas Kandagatla --- include/sound/soc-dai.h | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.21.0 diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index f5d70041108f..9f90b936fd9a 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -177,6 +177,7 @@ struct snd_soc_dai_ops { int (*set_sdw_stream)(struct snd_soc_dai *dai, void *stream, int direction); + void *(*get_sdw_stream)(struct snd_soc_dai *dai, int direction); /* * DAI digital mute - optional. * Called by soc-core to minimise any pops. @@ -385,4 +386,13 @@ static inline int snd_soc_dai_set_sdw_stream(struct snd_soc_dai *dai, return -ENOTSUPP; } +static inline void *snd_soc_dai_get_sdw_stream(struct snd_soc_dai *dai, int direction) +{ + if (dai->driver->ops->get_sdw_stream) + return dai->driver->ops->get_sdw_stream(dai, direction); + else + return NULL; + +} + #endif From patchwork Fri Jun 7 08:56:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 166073 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp368514ili; Fri, 7 Jun 2019 01:57:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyHdn6C+mffvtCE0kvk1t7Q/QNLD9fiVtzVqQ1vZpE9bDXBDd9RHREK0VcJX3wx4AZhk6e X-Received: by 2002:a63:3141:: with SMTP id x62mr1829828pgx.282.1559897837599; Fri, 07 Jun 2019 01:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559897837; cv=none; d=google.com; s=arc-20160816; b=NAL8D+BIQ4QyQUInLhytMO51ts/Z47oEXNGBeUkT6ymntysSPqVXuOeK7a7dfwhdu+ WHhIWJytYWsN1Ca/+vLm6V+3IrIMQ1qYTVn+UYMO5FLB1YKKbslEtZjyDznLECwa4XBh Keo+nVKazCQ+3LojgvXyFUY9UM5sNRmTBRMvUeT4owFIa+TxwCYvkL+qbMywVrrC8rcE 9xgot3C7I91pFZ0aHDDBqr7nC+mDfp864xPYrL+Zh9aVhKKVhou67+9o1csyCmex5Hmp 9Ntuo75hWFOHdT1rlB0SnTSfxkHrkK0gSjn/78au4T3HfDUWupOmFNQxBOSOu0Y1Pa7t DEMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KUhboSAFmz5mtk8bqOkf7FrFn2o/dLGKQrpvRYoaznc=; b=eCTodi8vYTFDIKOs/9SH/fR0q1kFHulpjT1uC7G62y25SzPxGdBmeTgM+CXP9+OmpU +WmankqCjKmbBkdq6tiTeHoQN0FiTjbq2whrH4QGL6rOiXh41Sjf0sgJZGbX+teFWKi4 d839tuS4cKTMGpyT2qbfV7Fauwt4M+3UGjCjnPj0YJAmfDGL75b39EupW21Wi1AQs4i7 9tuej6kPQ6+5fe1M+Q4w1xoLQrym9QfJD5pqFkXt1piFfpNfS92f4z2OfYrYvyv7GUCo LOfvn+XzjnMDZMSW2hgl53vdDW9oENMonMlyJ7Fl05tJiKgtnCWlP8j3T5U26oDwDhfG 2lKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qzcDMMv6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id c1si1391507pld.418.2019.06.07.01.57.17; Fri, 07 Jun 2019 01:57:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qzcDMMv6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727843AbfFGI5Q (ORCPT + 30 others); Fri, 7 Jun 2019 04:57:16 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50365 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbfFGI5L (ORCPT ); Fri, 7 Jun 2019 04:57:11 -0400 Received: by mail-wm1-f67.google.com with SMTP id c66so1191314wmf.0 for ; Fri, 07 Jun 2019 01:57:10 -0700 (PDT) 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=KUhboSAFmz5mtk8bqOkf7FrFn2o/dLGKQrpvRYoaznc=; b=qzcDMMv6/dC+W88mLNVStn/1exwxI5WCsOypC3gl2r3+gaoDMIOQYEYcuG41mZg4K4 W1+wDi7jZIIjYFe0bNSdJb8dlG/Hdk64D0lQNdVEqzyU9mQixYMn/sVvGQUgfbOb4OqH n96hpVWConp+8aolrBLU5RAXiICd9cEHnv2TAUrcSEaayPHCnj6dJSpJrXjOzMRw5IA0 mBvyCeu658+xZPj40wPPTfT7en/Xiv5jINsfwExCLe7XtZ4ZG2ApUlR4ftF4W3DT1GzV tVPKkImfEiPpV3dHfL4xblmzzRC5VoTyVg0NLYHV3VcSB2vR8W52pxL4AhlnKiak1Hy5 V9qQ== 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=KUhboSAFmz5mtk8bqOkf7FrFn2o/dLGKQrpvRYoaznc=; b=inNOC4Gtk6bDrpwoymyraucovozfktxcLwFuiWvef0CYKovxL7pgM3RuT5kUx4SKum gV1837RVMwQFqU8XcICoeVJnrGWOJ1Gp3g+ScUCwj6hAeNRjEz3ij2Xw+BmeA1WBcgY0 4/+XW9U04XIc1+OHsdsrhJgv2W7xtmbawnfIYeexcwFed6yPEOkTHWmuo96GjiO/Riw6 OFzjgf8WA+wA5dv4nG6JC2MdREUjAqVRB4YwNKasUXo+mzAwuiE5ExKgu41srPro+dh6 tM4tgly1IhSG9kUNf01w00udvJtGT1Q06oyJGwKF04/EpqY5DOd7tsUv1caYcsXGFwJf fhyA== X-Gm-Message-State: APjAAAVgm68aABx96NQhyz+oDcnaqy7SqUdRNC0qUu/53ElnDwWzeU2N 0rJoIxYJq8CF5vCEwVbseNYyAQ== X-Received: by 2002:a1c:9a53:: with SMTP id c80mr2627868wme.173.1559897829451; Fri, 07 Jun 2019 01:57:09 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id d10sm2035308wrh.91.2019.06.07.01.57.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 07 Jun 2019 01:57:08 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, vkoul@kernel.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, mark.rutland@arm.com, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [RFC PATCH 2/6] soundwire: Add compute_params callback Date: Fri, 7 Jun 2019 09:56:39 +0100 Message-Id: <20190607085643.932-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607085643.932-1-srinivas.kandagatla@linaro.org> References: <20190607085643.932-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vinod Koul This callback allows masters to compute the bus parameters required. Signed-off-by: Vinod Koul Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/stream.c | 9 +++++++++ include/linux/soundwire/sdw.h | 2 ++ 2 files changed, 11 insertions(+) -- 2.21.0 diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 73c52cd4fec8..b86992145799 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -1485,6 +1485,15 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream) bus->params.bandwidth += m_rt->stream->params.rate * m_rt->ch_count * m_rt->stream->params.bps; + /* Compute params */ + if (bus->compute_params) { + ret = bus->compute_params(bus); + if (ret < 0) { + dev_err(bus->dev, "Compute params failed: %d", ret); + return ret; + } + } + /* Program params */ ret = sdw_program_params(bus); if (ret < 0) { diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index bea46bd8b6ce..aac68e879fae 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -718,6 +718,7 @@ struct sdw_master_ops { * Bit set implies used number, bit clear implies unused number. * @bus_lock: bus lock * @msg_lock: message lock + * @compute_params: points to Bus resource management implementation * @ops: Master callback ops * @port_ops: Master port callback ops * @params: Current bus parameters @@ -739,6 +740,7 @@ struct sdw_bus { DECLARE_BITMAP(assigned, SDW_MAX_DEVICES); struct mutex bus_lock; struct mutex msg_lock; + int (*compute_params)(struct sdw_bus *bus); const struct sdw_master_ops *ops; const struct sdw_master_port_ops *port_ops; struct sdw_bus_params params; From patchwork Fri Jun 7 08:56:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 166071 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp368476ili; Fri, 7 Jun 2019 01:57:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8v9uUSkfYRYwK84+QE+b9Pv1a21SPcwVIv2X0Bi/ISguEc1/DE/sK850PEM5rnOPdUfaR X-Received: by 2002:a17:90a:2ec9:: with SMTP id h9mr4434770pjs.130.1559897836048; Fri, 07 Jun 2019 01:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559897836; cv=none; d=google.com; s=arc-20160816; b=SpbzfPeYsFhyiUd6eSXVq70+eT/estj+WFCcgI014YgmdUlH9nDCMOuP/aoQqSchBw GzW2LeeWqNOPIpWzhHa/lJJeJZJPsg2MUVoz5k9mY0MlBN3VxE8MUR+VKm5ns6GwbYgM +3pwrRZomFWqnZJLq0ExS9pc+Yq4GtPk1J3v6iD4Z7b/v7Z1aP/OVx7fL+JCynbI0EO0 ylCutcNEAMB8MoqTBBLQQDiN5YWqGUiiSyGCNERHLEfJ54DqBczsI2yyJ7KhBdyans7a 2DEzhp+sfT5hm007djDgjmzZFKQcwevqVvl1NiXEJwNpuC8ca0FzBlFfBUIvozcGoeV4 YPog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aNrOP9bVL8WzVy3bzvsSNv+Sb0/Lb3pHrKp7Bekeixc=; b=tkdXaWQ5TZZBngp461JiSkbY51ML9KjBjUkKXuGZqYq2drLzAOgCDyqqgCN8rBjlhx maiLzUOzELzRUljh0r62ka/QOWP+o++iROlyCGY5ofqClyszhkiLtQW7p30scpNc0TKi Ejb/EVPqVcFX4wrn7GpSRn1VHd4tjHwlKvd7o8EdCmw4/pTHgUQcLI5ItttQEM1E08cy EmT7HY3/5Bmg7ytVHrkckyT9xiJQh3jivgF4AiyXgXTK6RYfQASHsEBxg66dQf8K//LQ WWYrrOYb5gGWIlRwOrVMU516S5BmJJhcKVte5orkqfobFliPjCkWv1bQtdHvWl0HqY3G eAxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cjb6qcY3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id p18si1333464pgj.126.2019.06.07.01.57.15; Fri, 07 Jun 2019 01:57:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cjb6qcY3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727777AbfFGI5P (ORCPT + 30 others); Fri, 7 Jun 2019 04:57:15 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42611 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727646AbfFGI5L (ORCPT ); Fri, 7 Jun 2019 04:57:11 -0400 Received: by mail-wr1-f65.google.com with SMTP id x17so1304924wrl.9 for ; Fri, 07 Jun 2019 01:57:11 -0700 (PDT) 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=aNrOP9bVL8WzVy3bzvsSNv+Sb0/Lb3pHrKp7Bekeixc=; b=cjb6qcY3L1FVfrYmUwzIy0VkpN6BDjsbZZMFOM7FoHLonsrmUhjkR5K67jGdT/lkWQ m1EsLAPt0M+2H+zVDZs/xmAU8F+ou6qSKR8SqbxW4h23LzXi4lEyYVM07mXgOTJtlu/D mtnJ/5Zrb/7IafTDfAz5E0MsS4lZEia1z/C44kbsJUJS/I6a3EcWI/UE/zvBlAwyvOHH /4DeqmVy215xmQj5xX8S+T8mGEnIWgSOVsW2umlRlxMnzNk7tsl74HO4/yR7eNnHVtHa IH+l6o/tsfoZ+cR30bMAHIZ6uKQ7O5uF7pDeUVJhIXM+TZUs6oVPoLds/5jRUorn91Ts RuxA== 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=aNrOP9bVL8WzVy3bzvsSNv+Sb0/Lb3pHrKp7Bekeixc=; b=CanaI5MYQo5jfVKO/J299a04T6JkIrUA5LnL/Cu9xvaj+AZ89okzEnqzCTD179MPvB ZnIGGFIkYknc0dwZ6aGYrcsUpA0Ltqp2TE2nsQgXXTrj2A/ZgJryCt4PQxvuEkRk2Mvg 6nKxwuUv8AxWPJiCc/CytV4iU/hBqMY/v2mdawp1h0qA/eIcTm7w0CS4W2yd7DXNMnKl mZpdZeD7oKib/nqR5szsKdxDhW9urwjRgNLCnHJKrVJhgRnfKqN90uBg9ze8ikpyZYU5 xz2++TMWvsWCuBnOGtGeZ2Jh+g1lzBJROFa3Wtc3pATouwpDvh/hqMklaOS5Ho5OTCaY CZzA== X-Gm-Message-State: APjAAAWiM32qjIoilfQuRw03/xBjSNiGfVlQbTmd+rGdvK4gZu0s8RSq v/W80TY2pDJWf2wOfaeM53OcrA== X-Received: by 2002:adf:dcc2:: with SMTP id x2mr18944862wrm.55.1559897830398; Fri, 07 Jun 2019 01:57:10 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id d10sm2035308wrh.91.2019.06.07.01.57.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 07 Jun 2019 01:57:09 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, vkoul@kernel.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, mark.rutland@arm.com, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [RFC PATCH 3/6] soundwire: core: define SDW_MAX_PORT Date: Fri, 7 Jun 2019 09:56:40 +0100 Message-Id: <20190607085643.932-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607085643.932-1-srinivas.kandagatla@linaro.org> References: <20190607085643.932-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds SDW_MAX_PORT so that other driver can use it. Signed-off-by: Srinivas Kandagatla --- include/linux/soundwire/sdw.h | 1 + 1 file changed, 1 insertion(+) -- 2.21.0 diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index aac68e879fae..80ca997e4e5d 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -36,6 +36,7 @@ struct sdw_slave; #define SDW_FRAME_CTRL_BITS 48 #define SDW_MAX_DEVICES 11 +#define SDW_MAX_PORTS 14 #define SDW_VALID_PORT_RANGE(n) ((n) <= 14 && (n) >= 1) #define SDW_DAI_ID_RANGE_START 100