lkml.org 
[lkml]   [2020]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] soundwire: bus_type: add sdw_master_device support
From
Date


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.

properties:
$nodename:
pattern: "^soundwire(@.*)?$"

soundwire@c2d0000 {
#address-cells = <2>;
#size-cells = <0>;
reg = <0x0c2d0000 0x2000>;

\
 
 \ /
  Last update: 2020-05-12 17:31    [W:0.072 / U:0.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site