Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp137563ybi; Fri, 7 Jun 2019 05:35:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYcT+vZV632/3rp2n7W7gy019apkBhlLTKTxO5EZWxAMBGJzi63wHOJhoa614WOnRvvorP X-Received: by 2002:a17:902:4181:: with SMTP id f1mr53429167pld.22.1559910920754; Fri, 07 Jun 2019 05:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559910920; cv=none; d=google.com; s=arc-20160816; b=rnWFgnTkZc7W+FAG2pF3FxRZya2hbwpke2xZ2JOgzh0n+V+/fQDCWrvUXJ/jNrZbas uftKE8Y60yrFBOPVN+JyKTJPTIkU0XZ3DWE5h5FwnY476OfqX9KSo+vhqG43FP7HyOGM GZzLTsLjFVHttZBWrDy6QuX77x6WapnYGpZbm3JtBqNDrdPvy5Ca/s2stHgE0Fch0ZPE ZcqDGidnkTeTukfHY/VCD+PjtyTJ5rBsL5ejdX2IyccQCirkdWZhTr/26sJM3rGpZMYj kdfaqFScYYpRzg77JJBzhoURNE+bFdALK60LOiNRqB2Odv4anRxnYLI1y7Cr2AT+DPAg +z9g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=64DolzIwp7gXfD2gO9jX1p+bFJ3U2SZMQuMOeCONyfQ=; b=wrzP9ESd12lbWPa8U06DcQrQub2gztzhXo2+3AKRT7hz3O0LDGAp7dYXvT9+GmPKKa u4cuycWt6LlHljEocb/0DwTSANELw6c4AYuezuFTdM/BjwI3YHVwCuxyTzT6xiOOW2Zj V/v+0bIBWJDQV1tx3LJK1RDLQJpaCOqc0g2ID9aqCToxp8OTenACWD5lvjJiDkKp5YSO 8wxgx9iskaz+gAqrt4jtQ04fB5OYrE9u8B9Ua94BhjaKkJ836Rh9Zw7DuE5TrXhh9h0o ygcjqgjIOhO4zmdkvgvev1M6Yj5CsLYeizsxMUZeqawpavANGBhKhXQTUVOd44PfMkjI BitA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si1662846plk.120.2019.06.07.05.35.03; Fri, 07 Jun 2019 05:35:20 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729094AbfFGMcN (ORCPT + 99 others); Fri, 7 Jun 2019 08:32:13 -0400 Received: from mga12.intel.com ([192.55.52.136]:41805 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728786AbfFGMcN (ORCPT ); Fri, 7 Jun 2019 08:32:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jun 2019 05:32:12 -0700 X-ExtLoop1: 1 Received: from linux.intel.com ([10.54.29.200]) by fmsmga005.fm.intel.com with ESMTP; 07 Jun 2019 05:32:11 -0700 Received: from kwong4-mobl.amr.corp.intel.com (unknown [10.252.203.122]) by linux.intel.com (Postfix) with ESMTP id 04D3A58044F; Fri, 7 Jun 2019 05:32:10 -0700 (PDT) Subject: Re: [alsa-devel] [RFC PATCH 3/6] soundwire: core: define SDW_MAX_PORT To: Srinivas Kandagatla , broonie@kernel.org, vkoul@kernel.org Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org References: <20190607085643.932-1-srinivas.kandagatla@linaro.org> <20190607085643.932-4-srinivas.kandagatla@linaro.org> From: Pierre-Louis Bossart Message-ID: Date: Fri, 7 Jun 2019 07:31:59 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190607085643.932-4-srinivas.kandagatla@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/7/19 3:56 AM, Srinivas Kandagatla wrote: > 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(+) > > 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 That's an ambiguous definition. You can have 16 ports per the SoundWire spec, but DP0 is reserved for control and DP15 is an alias for all ports (same idea as device 15 for broadcast operations but limited to a single device), which leaves 14 ports for audio usages. In the MIPI specs, specifically the DisCo part, the difference is called about with the the DP0 and DPn notations, so this could be SDW_MAX_DPn. Alternatively you could use SDW_MAX_AUDIO_PORTS which is more self-explanatory and does not require in-depth familiarity with the spec. > #define SDW_VALID_PORT_RANGE(n) ((n) <= 14 && (n) >= 1) > > #define SDW_DAI_ID_RANGE_START 100 >