Re: [PATCH v3 04/10] dt-bindings: iio: dac: ad3552r: add io-backend support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/09/2024 09:20, Nuno Sá wrote:
>>>>>
>>>>> You described the driver, so how does it matter? Driver can call
>>>>> get_backend_from_parent(), right? Or get_backend_from_fwnode(parent)?  
>>>>
>>>> Well yes, just stating what the framework (also in terms of bindings) is
>>>> expecting. Of course that on the driver side we can paper around it the
>>>> way we
>>>> want. But my main point was that we can only paper around it if we use
>>>> code that
>>>> is meant not to be used.
>>>>
>>>> And, FWIW, I was (trying) replying to your comment
>>>>
>>>> "You can take it from the child-parent relationship"
>>>>
>>>> Again, we can only do that by introducing new code or use code that's not
>>>> meant
>>>> to be used. The way we're supposed to reference backends is by explicitly
>>>> using
>>>> the proper FW property.
>>>>
>>>> Put it in another way and a completely hypothetical case. If we have a spi
>>>> controller which happens to export some clock and one of it's peripherals
>>>> ends
>>>> up using that clock, wouldn't we still use 'clocks' to reference that
>>>> clock?  
>>>
>>> I asked how coupled are these devices. Never got the answer and you are
>>> reflecting with question. Depends. Please do not create hypothetical,
>>> generic scenarios and then apply them to your one particular opposite case.
>>
>> I'll throw a possible clarifying question in here.  Could we use this
>> device with a multimaster SPI setup such that the control is on a conventional
>> SPI controller (maybe a qspi capable one), and the data plane only goes
>> through
>> a specific purpose backend?  If so, then they are not tightly coupled and
>> the reference makes sense.  Putting it another way, the difference between
>> this case and all the prior iio-backend bindings is the control and dataplanes
>> use the same pins.  Does that have to be the case at the host end?  If it
>> does,
>> then the reference isn't strictly needed and this becomes a bit like
>> registering a single device on an spi bus or an i2c bus depending on who
>> does the registering (which is down to the parent in DT).
>>
> 
> So, we currently have two drivers (with a new one being added in this series)
> for the same device:
> 
> 1) A SPI one tied to a typical spi controller. This is the "low speed"
> implementation and does not use backends;
> 2) The new platform device that is connected like this to the backend.

Drivers, platform devices are Linux specifics. These were not our
questions here. You are responding with description matching current
Linux code.

> 
> So yes, my understanding (but Angelo should know better :)) is that they are
> tightly coupled. Putting it in another way, the new platform device is very much
> specific to this parent (and yeah, this is a very special usecase where control

Again, Linux stuff.

> and data planes are controlled by the IIO backend) and should not exist with it.

I pointed this issue already in this thread. You keep describing
drivers, so of course they will be coupled as much as you write them.

Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux