linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Vinod <vkoul@kernel.org>, Mark Brown <broonie@kernel.org>,
	Banajit Goswami <bgoswami@codeaurora.org>,
	Patrick Lai <plai@codeaurora.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	devicetree@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/4] dt-bindings: soundwire: add slave bindings
Date: Thu, 22 Aug 2019 13:56:05 +0100	[thread overview]
Message-ID: <90b9fa33-3a49-c414-4352-66e26673a05d@linaro.org> (raw)
In-Reply-To: <CAL_JsqJJCJB9obR_Jn3hmn4gq+RQjY-8M+xkdYA185Uaw0MHcw@mail.gmail.com>



On 22/08/2019 13:36, Rob Herring wrote:
>>>> +soundwire@c2d0000 {
>>>> +    compatible = "qcom,soundwire-v1.5.0"
>>>> +    reg = <0x0c2d0000 0x2000>;
>>>> +
>>>> +    spkr_left:wsa8810-left{
>>>> +            compatible = "sdw0110217201000";
>>>> +            ...
>>>> +    };
>>>> +
>>>> +    spkr_right:wsa8810-right{
>>>> +            compatible = "sdw0120217201000";
>>> The normal way to distinguish instances is with 'reg'. So I think you
>>> need 'reg' with Instance ID moved there at least. Just guessing, but
>>> perhaps Link ID, too? And for 2 different classes of device is that
>>> enough?
>> In previous bindings (https://lists.gt.net/linux/kernel/3403276  ) we
>> did have instance-id as different property, however Pierre had some good
>> suggestion to make it align with _ADR encoding as per MIPI DisCo spec.
>>
>> Do you still think that we should split the instance id to reg property?
> Assuming you could have more than 1 of the same device on the bus,
> then you need some way to distinguish them and the way that's done for
> DT is unit-address/reg. And compatible strings should be constant for
> each instance.
That is a good point!
Okay that makes more sense keep compatible string constant.
Class ID would be constant for given functionality that the driver will 
provide.

So we will end up with some thing like this:

soundwire@c2d0000 {
	compatible = "qcom,soundwire-v1.5.0"
	reg = <0x0c2d0000 0x2000>;	
         #address-cells = <1>;
         #size-cells = <0>;

	spkr_left:skpr@1{
		compatible = "sdw10217201000";
		reg = <0x1>
		sdw-link-id = <0>;
		...
	};

	spkr_right:spkr@2{
		compatible = "sdw10217201000";
		reg = <0x2>
		sdw-link-id = <0>;
	};
};

I will spin this in next version!

Thanks,
srini

> 
> Rob

  parent reply	other threads:[~2019-08-22 12:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 13:34 [PATCH v3 0/4] ASoC: codecs: Add WSA881x Smart Speaker amplifier support Srinivas Kandagatla
2019-08-09 13:34 ` [PATCH v3 1/4] dt-bindings: soundwire: add slave bindings Srinivas Kandagatla
2019-08-21  9:09   ` Vinod Koul
2019-08-21 21:44   ` Rob Herring
2019-08-22 10:12     ` Srinivas Kandagatla
2019-08-22 11:06       ` Vinod Koul
2019-08-22 12:36       ` Rob Herring
2019-08-22 12:51         ` Vinod Koul
2019-08-22 12:56         ` Srinivas Kandagatla [this message]
2019-08-22 16:11           ` Rob Herring
2019-08-09 13:34 ` [PATCH v3 2/4] soundwire: core: add device tree support for slave devices Srinivas Kandagatla
2019-08-09 13:34 ` [PATCH v3 3/4] dt-bindings: ASoC: Add WSA881x bindings Srinivas Kandagatla
2019-08-09 13:34 ` [PATCH v3 4/4] ASoC: codecs: add wsa881x amplifier support Srinivas Kandagatla
2019-08-12  2:46   ` kbuild test robot
2019-08-12  9:05     ` Srinivas Kandagatla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90b9fa33-3a49-c414-4352-66e26673a05d@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=plai@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).