[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6a636c7-36df-4648-92a1-2db1ff4754e6@baylibre.com>
Date: Thu, 17 Apr 2025 10:07:50 -0500
From: David Lechner <dlechner@...libre.com>
To: 3027a9b0-cf4a-4e55-80a7-7f0dd2a008e4@...libre.com
Cc: Jonathan Santos <Jonathan.Santos@...log.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, lars@...afoo.de, Michael.Hennerich@...log.com,
marcelo.schmitt@...log.com, jic23@...nel.org, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, marcelo.schmitt1@...il.com,
linus.walleij@...aro.org, brgl@...ev.pl, lgirdwood@...il.com,
broonie@...nel.org
Subject: Re: [PATCH v5 02/14] dt-bindings: iio: adc: ad7768-1: add
trigger-sources property
On 4/16/25 7:22 PM, Jonathan Santos wrote:
> On 04/11, David Lechner wrote:
>> On 4/11/25 10:56 AM, Jonathan Santos wrote:
>>> In addition to GPIO synchronization, The AD7768-1 also supports
>>> synchronization over SPI, which use is recommended when the GPIO
>>> cannot provide a pulse synchronous with the base MCLK signal. It
>>> consists of looping back the SYNC_OUT to the SYNC_IN pin and send
>>> a command via SPI to trigger the synchronization.
>>>
>>> Introduce the 'trigger-sources' property to support SPI-based
>>> synchronization, along with additional optional entries for the SPI
>>> offload trigger and the START signal via GPIO3.
>>>
>>> While at it, add description to the interrupts property.
>>>
>>> Signed-off-by: Jonathan Santos <Jonathan.Santos@...log.com>
>>> ---
>>
>> ...
>>
>>> @@ -57,6 +80,15 @@ properties:
>>> "#io-channel-cells":
>>> const: 1
>>>
>>> + "#trigger-source-cells":
>>> + description: |
>>> + Indicates the trigger source type for each entry:
>>> + 0 = Synchronization GPIO-based trigger
>>> + 1 = Synchronization device trigger (e.g., another ad7768-1)
>>> + 2 = GPIO3 pin acting as START signal
>>> + 3 = DRDY pin acting as SPI offload trigger
>>> + const: 1
>>> +
>>
>> 0 and 1 don't sound like trigger outputs that this ADC is providing, so don't
>> seem appropriate here. But the SYNC_OUT pin is missing from this list.
>>
>> Also, outputs could be used to trigger anything, not just SPI offload, so don't
>> need to mention that.
>
> You mean like this:
>
> ...
> "#trigger-source-cells":
> description: |
> Cell indicates the trigger output signal: 0 = SYNC_OUT, 1 = GPIO3,
> 2 = DRDY.
>
> const: 1
> ...
>
> It would be like interfacing those output pins for a generic trigger
> usage?
>
>>
Yes this looks correct now.
I don't think this is the case, but in general, if GPIO3 could be programmed
to have different trigger signals, then we would need a 2nd cell. But IIRC,
it can only be the START signal, so 1 cell should be sufficient in this case.
Powered by blists - more mailing lists