All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Alisa-Dariana Roman <alisadariana@gmail.com>,
	Alisa-Dariana Roman <alisa.roman@analog.com>,
	Michael Hennerich <michael.hennerich@analog.com>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Lars-Peter Clausen <lars@metafoo.de>,
	Alexandru Tachici <alexandru.tachici@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v2 1/4] dt-bindings: iio: adc: ad7192: Add properties
Date: Fri, 2 Feb 2024 15:29:03 +0100	[thread overview]
Message-ID: <ff3bfbd3-1347-4661-b2af-60951e0a8a83@linaro.org> (raw)
In-Reply-To: <09cc2ecb-b73f-495a-9196-dbb4899f4c85@gmail.com>

On 02/02/2024 15:14, Alisa-Dariana Roman wrote:
> On 14.11.2023 22:29, Krzysztof Kozlowski wrote:
>> On 14/11/2023 21:05, Alisa-Dariana Roman wrote:
>>> Document properties used for clock configuration.
>>
>> Some background here is missing - otherwise it looks like you are adding
>> new properties...
>>
>>>
>>> Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
>>> ---
>>>   .../devicetree/bindings/iio/adc/adi,ad7192.yaml        | 10 ++++++++++
>>>   1 file changed, 10 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
>>> index 16def2985ab4..9b59d6eea368 100644
>>> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
>>> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
>>> @@ -80,6 +80,16 @@ properties:
>>>         and when chop is disabled.
>>>       type: boolean
>>>   
>>> +  adi,clock-xtal:
>>> +    description: |
>>> +      External crystal connected from MCLK1 to MCLK2.
>>
>> And this should be input clock.
>>
>>> +    type: boolean
>>> +
>>> +  adi,int-clock-output-enable:
>>> +    description: |
>>> +      Internal 4.92 MHz clock available on MCLK2 pin.
>>> +    type: boolean
>>
>> This should be clock-cells and clock provider.
>>
>> Unless you are just documenting already used interface which you do not
>> want to break...
>>
>>> +
>>>     bipolar:
>>>       description: see Documentation/devicetree/bindings/iio/adc/adc.yaml
>>>       type: boolean
>>
>> Best regards,
>> Krzysztof
>>
> 
> Thank you very much for the feedback!
> 
> If I understand correctly, there is already an input clock in the bindings:

You tell me...

> 
> What I wanted to accomplish with this patch is to document these boolean 
> properties (from the ad7192 driver code):

Please explain with clear words: do you mean that existing upstream
Linux driver has it? I don't care about some out of tree drivers...


> ```
> 	/* use internal clock */
> 	if (!st->mclk) {
> 		if (device_property_read_bool(dev, "adi,int-clock-output-enable"))
> 			clock_sel = AD7192_CLK_INT_CO;
> 	} else {
> 		if (device_property_read_bool(dev, "adi,clock-xtal"))
> 			clock_sel = AD7192_CLK_EXT_MCLK1_2;
> 		else
> 			clock_sel = AD7192_CLK_EXT_MCLK2;
> 	}
> ```
> 
> Please let me know how to proceed further!

Please open the datasheet of your product and add properties matching
the hardware, not driver.

I don't know what to say more except the same - you want to enable clock
provided from this device on some pin to some other devices? If yes,
then this is clock-provider, so you clock-provider bindings I mentioned
in my first reply.

Best regards,
Krzysztof


  reply	other threads:[~2024-02-02 14:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 20:05 [PATCH v2 0/4] iio: adc: ad7192: Add support for AD7194 Alisa-Dariana Roman
2023-11-14 20:05 ` Alisa-Dariana Roman
2023-11-14 20:05 ` [PATCH v2 1/4] dt-bindings: iio: adc: ad7192: Add properties Alisa-Dariana Roman
2023-11-14 20:29   ` Krzysztof Kozlowski
2023-11-26 16:11     ` Jonathan Cameron
2024-02-02 14:14     ` Alisa-Dariana Roman
2024-02-02 14:29       ` Krzysztof Kozlowski [this message]
2024-02-02 22:20       ` David Lechner
2024-02-05  9:28         ` Krzysztof Kozlowski
2024-02-05  9:50           ` Nuno Sá
2023-11-14 20:05 ` [PATCH v2 2/4] iio: adc: ad7192: Use device api Alisa-Dariana Roman
2023-11-15 14:08   ` Nuno Sá
2023-11-14 20:05 ` [PATCH v2 3/4] dt-bindings: iio: adc: ad7192: Add AD7194 support Alisa-Dariana Roman
2023-11-14 20:30   ` Krzysztof Kozlowski
2023-11-14 20:05 ` [PATCH v2 4/4] " Alisa-Dariana Roman
2023-11-15 14:20   ` Nuno Sá
2023-11-26 16:34   ` Jonathan Cameron
2024-02-02 14:32     ` Alisa-Dariana Roman
2024-02-04 13:04       ` Jonathan Cameron

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=ff3bfbd3-1347-4661-b2af-60951e0a8a83@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alexandru.tachici@analog.com \
    --cc=alisa.roman@analog.com \
    --cc=alisadariana@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.