Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2827599ybk; Tue, 12 May 2020 09:04:03 -0700 (PDT) X-Google-Smtp-Source: APiQypIRT14OGaH6wo2EmwLffWrJfRIeAkGmsev64vfq9wgJbpDlqUtSf7ZEtiHkJHU9XYllZx6/ X-Received: by 2002:a17:906:5795:: with SMTP id k21mr13353708ejq.374.1589299443512; Tue, 12 May 2020 09:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589299443; cv=none; d=google.com; s=arc-20160816; b=tCs+ZgDpR5azv9uv4s/lrYdNP1FzxuTbpN7dU9nTSoY9Ss8TFYyD9ZwXCkXMzZzWiF X7+0fuZde7R383GCFF0m/rt8zPSNMGS5MgXTi/xGJrVpHGiNZc0wyRfg7SV67F4gYeSf Ehb6CwzXL9fGcypEc8wa3VRjL4SzTBfHAJbAuN+q+fnY+2aIa+zGb6Hftsy2PBQpYiJz F6Dd3E2l5/6BwkJ0zLGF1e1no/9uWhEMIZAZru/4WvoLjfd5lPbLBCv80crqqSz7mzhX jefAtSNvL+SYv2nKRePLdJhkRK1rRjwhrSzrwyHzHzqV1Nkoyhh6DyzzCqfutSI8LLZm Cq3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ikwUfCB32gARfmy8GJugoWf6CCPOpgvy6YsyEwXgTbQ=; b=kBzKfe/TCYIOUA+S1Ix3w/12vZ3/IjpvCgHLZZAi7BNRbiDW1MbUgmWtU0/Yy8rKwD wo3kyeg02aEtdEBM52bozZcKhObNgpXqxa7kVkrchUrpCLWJgzSSt9XM2wtw7tXU6+yv AqPFz04Psg/G4Nhbhce0mpifIUTkDfKvZT4R3cF+kLcMtfC+MM8rl5qyZer16rgcNrtS xORyqtghlKVU4YkSvWnByeu3tE0gMS8fJWSsstY2jLV2CWCF3hEVl5+iM9kXmT+IpHVI XCZbqY6HWty5cSTtqgDGKwd7OtU75+VNrPztI8vcTQwR5mCU+AAhLhiNu88s9WEELcJb CtJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v7lI9soG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si7309544eja.102.2020.05.12.09.03.19; Tue, 12 May 2020 09:04:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=default header.b=v7lI9soG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730497AbgELP7d (ORCPT + 99 others); Tue, 12 May 2020 11:59:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:45872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbgELP7d (ORCPT ); Tue, 12 May 2020 11:59:33 -0400 Received: from localhost (unknown [171.76.78.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED7282054F; Tue, 12 May 2020 15:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589299172; bh=GcSuARZnjzHzIHxazwT2+9mc/w9gn8B3hHEScotCwcU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=v7lI9soG/SmwG2yUhc9KJyezmXo/Gk4Jf220jVov/Caf09EzhlUcyfLclXTbdZa/l 8emUysqo5CvmTlokYxi6Q8LOHC4Murg51DmwS1atarMjEqU3O/Sj0M0ygc2zKgr5Cc EHEEqJooAKAed1/nPEOCTQ8HawNLFwvCvLrRWEac= Date: Tue, 12 May 2020 21:29:27 +0530 From: Vinod Koul To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, tiwai@suse.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, mengdong.lin@intel.com, slawomir.blauciak@intel.com, sanyog.r.kale@intel.com, Bard Liao , rander.wang@linux.intel.com, bard.liao@intel.com Subject: Re: [PATCH 3/3] soundwire: bus_type: add sdw_master_device support Message-ID: <20200512155927.GA4297@vkoul-mobl> References: <20200429185145.12891-1-yung-chuan.liao@linux.intel.com> <20200429185145.12891-4-yung-chuan.liao@linux.intel.com> <20200511063227.GS1375924@vkoul-mobl> <20200512033035.GV1375924@vkoul-mobl> <84f09843-3245-5fa4-530f-c915b28e9bc5@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84f09843-3245-5fa4-530f-c915b28e9bc5@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12-05-20, 09:36, Pierre-Louis Bossart wrote: > On 5/11/20 10:30 PM, Vinod Koul wrote: > > On 11-05-20, 14:00, Pierre-Louis Bossart wrote: > > > > > + md = &bus->md; > > > > > + md->dev.bus = &sdw_bus_type; > > > > > + md->dev.type = &sdw_master_type; > > > > > + md->dev.parent = parent; > > > > > + md->dev.of_node = parent->of_node; > > > > > + md->dev.fwnode = fwnode; > > > > > + md->dev.dma_mask = parent->dma_mask; > > > > > + > > > > > + dev_set_name(&md->dev, "sdw-master-%d", bus->link_id); > > > > > > > > This give nice sdw-master-0. In DT this comes from reg property. I dont > > > > seem to recall if the ACPI/Disco spec treats link_id as unique across > > > > the system, can you check that please, if not we would need to update > > > > this. > > > Table 3 in the Disco for Soundwire 1.0 spec: "all LinkID values are relative > > > to the immediate parent Device." > > > > > > There isn't any known implementation with more than one controller. > > > > But then it can come in "future" right. So lets try to make it future > > proof by not using the link_id (we can expose that as a sysfs if people > > want to know). So a global unique id needs to allocated (hint: idr or > > equivalent) and used as master_id > > Can you clarify if you are asking for a global ID for Intel/ACPI platforms, > or for DT as well? I can't figure out from the soundwire-controller.yaml > definitions if there is already a notion of unique ID. If ACPI was unique, then I was planning to update the definition below to include that. Given that it is not the case, let's make it agnostic to underlying firmware. > > properties: > $nodename: > pattern: "^soundwire(@.*)?$" > > soundwire@c2d0000 { > #address-cells = <2>; > #size-cells = <0>; > reg = <0x0c2d0000 0x2000>; -- ~Vinod