[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcvVqdgCXKuKLvpegx6bN4af=7xYO=Nh8T37_gMjG1Y6Q@mail.gmail.com>
Date: Sat, 30 Aug 2025 08:02:38 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Marcelo Schmitt <marcelo.schmitt@...log.com>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, devicetree@...r.kernel.org,
linux-spi@...r.kernel.org, Axel Haslam <ahaslam@...libre.com>, jic23@...nel.org,
Michael.Hennerich@...log.com, nuno.sa@...log.com, eblanc@...libre.com,
dlechner@...libre.com, andy@...nel.org, corbet@....net, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, broonie@...nel.org,
Jonathan.Cameron@...wei.com, andriy.shevchenko@...ux.intel.com,
marcelo.schmitt1@...il.com
Subject: Re: [PATCH 06/15] spi: spi-offload-trigger-pwm: Use duty offset
On Sat, Aug 30, 2025 at 3:42 AM Marcelo Schmitt
<marcelo.schmitt@...log.com> wrote:
>
> Pass the duty offset to the waveform pwm.
...
> wf.period_length_ns = DIV_ROUND_UP_ULL(NSEC_PER_SEC, periodic->frequency_hz);
> /* REVISIT: 50% duty-cycle for now - may add config parameter later */
> wf.duty_length_ns = wf.period_length_ns / 2;
> -
Stray - line
> + wf.duty_offset_ns = periodic->offset_ns;
> ret = pwm_round_waveform_might_sleep(st->pwm, &wf);
> if (ret < 0)
> return ret;
>
> periodic->frequency_hz = DIV_ROUND_UP_ULL(NSEC_PER_SEC, wf.period_length_ns);
> -
Ditto.
> + periodic->offset_ns = wf.duty_offset_ns;
> return 0;
> }
>
> @@ -77,6 +77,7 @@ static int spi_offload_trigger_pwm_enable(struct spi_offload_trigger *trigger,
> wf.period_length_ns = DIV_ROUND_UP_ULL(NSEC_PER_SEC, periodic->frequency_hz);
> /* REVISIT: 50% duty-cycle for now - may add config parameter later */
> wf.duty_length_ns = wf.period_length_ns / 2;
> + wf.duty_offset_ns = periodic->offset_ns;
>
Especially as it seems that the pattern is to have a blank line before
last return statements.
> return pwm_set_waveform_might_sleep(st->pwm, &wf, false);
> }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists