Devicetree
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Nicolae-Daniel Deaconescu <Nicolae-daniel.Deaconescu@analog.com>
Cc: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Michael Hennerich" <michael.hennerich@analog.com>,
	"Trevor Gamblin" <tgamblin@baylibre.com>,
	"David Lechner" <dlechner@baylibre.com>,
	linux-pwm@vger.kernel.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v4 1/6] pwm: core: add pwm_get_waveform_step_might_sleep()
Date: Tue, 24 Nov 2026 18:34:13 +0000	[thread overview]
Message-ID: <20261124-bath-runaround-dccb788f14e3@spud> (raw)
In-Reply-To: <20261124114714.611570-1-Nicolae-daniel.Deaconescu@analog.com>

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

On Tue, Nov 24, 2026 at 01:47:13PM +0200, Nicolae-Daniel Deaconescu wrote:
> Hi Uwe,
> 
> Yes, that works. It is how the gate duty was set before, in ad7625.c, with
> DIV_ROUND_UP(NSEC_PER_SEC * pulses, rate), which gives 34 ns for 4 pulses
> at 120 MHz. I'd drop the step API (patches 1 and 2) and do the same for the
> new parts, but i don't have the clock rate, and without a clocks property
> I don't know how I should get it. The PWM core has no way to report it.
> 
> Conor, Uwe: is a clocks property on adi,ltc2387 acceptable,?
> If not, how should the driver get the rate?

My opinion here has not changed. The clock is an input to the pwm
generator, not the iio device.

Using the pwm generator input clock in this way is also inherently tied
to one implementation, since assumes a particular relationship between
input clock and output waveforms. Were a different pwm generator to be
used that had a /2 divider between input and output to be used, the
logic here would break?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2026-11-24 18:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 11:24 [PATCH v4 0/6] iio: adc: ad7625: add LTC2387 and ADAQ2387x support Nicolae-Daniel Deaconescu
2026-11-19 11:24 ` [PATCH v4 1/6] pwm: core: add pwm_get_waveform_step_might_sleep() Nicolae-Daniel Deaconescu
2026-11-21 23:35   ` Jonathan Cameron
2026-11-23 13:41   ` Uwe Kleine-König
2026-11-23 16:55     ` Nicolae-Daniel Deaconescu
2026-11-24 11:08       ` Uwe Kleine-König
2026-11-24 11:47         ` Nicolae-Daniel Deaconescu
2026-11-24 13:20           ` Uwe Kleine-König
2026-11-24 18:34           ` Conor Dooley [this message]
2026-11-19 11:24 ` [PATCH v4 2/6] pwm: axi-pwmgen: report the waveform step Nicolae-Daniel Deaconescu
2026-11-19 11:24 ` [PATCH v4 3/6] iio: adc: ad7625: fix sampling frequency handling Nicolae-Daniel Deaconescu
2026-11-19 11:24 ` [PATCH v4 4/6] iio: adc: ad7625: move initial mode setup Nicolae-Daniel Deaconescu
2026-11-21 23:40   ` Jonathan Cameron
2026-11-19 11:24 ` [PATCH v4 5/6] dt-bindings: iio: adc: add adi,ltc2387 Nicolae-Daniel Deaconescu
2026-11-19 11:24 ` [PATCH v4 6/6] iio: adc: ad7625: add LTC2387 and ADAQ2387x support Nicolae-Daniel Deaconescu
2026-11-21 23:48   ` Jonathan Cameron
2026-11-23 11:53     ` Nicolae-Daniel Deaconescu

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=20261124-bath-runaround-dccb788f14e3@spud \
    --to=conor@kernel.org \
    --cc=Nicolae-daniel.Deaconescu@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=tgamblin@baylibre.com \
    --cc=ukleinek@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