From: "Uwe Kleine-König" <ukleinek@kernel.org>
To: Conor Dooley <conor@kernel.org>
Cc: "Nicolae-Daniel Deaconescu"
<Nicolae-daniel.Deaconescu@analog.com>,
"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: Thu, 26 Nov 2026 11:11:41 +0100 [thread overview]
Message-ID: <awgEH1y_JnsiactY@monoceros> (raw)
In-Reply-To: <20261124-bath-runaround-dccb788f14e3@spud>
[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]
On Tue, Nov 24, 2026 at 06:34:13PM +0000, Conor Dooley wrote:
> 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.
The setup as I understand it (
,-----. ,---.
clk ---+----> PWM >--- pwm signal ----> | ,-----.
| `-----' | & >---------| iio |
`------------------------------> | `-----'
`---'
)
works as the clk feeds into both, the PWM and (masked by the PWM) also
into the iio device. So the clk is in the same way relevant for the iio
device as the PWM signal?!
> 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?
Yes an additional divider only on the clk->PWM path would break that (or
need adaptions to the algorithm at least).
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-11-26 10:11 UTC|newest]
Thread overview: 19+ 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
2026-11-25 14:42 ` Nicolae-Daniel Deaconescu
2026-11-26 10:11 ` Uwe Kleine-König [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=awgEH1y_JnsiactY@monoceros \
--to=ukleinek@kernel.org \
--cc=Nicolae-daniel.Deaconescu@analog.com \
--cc=conor@kernel.org \
--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 \
/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