Linux Documentation
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: poros@redhat.com
Cc: netdev@vger.kernel.org, ivecera@redhat.com, jiri@nvidia.com,
	corbet@lwn.net, skhan@linuxfoundation.org, shuah@kernel.org,
	rdunlap@infradead.org, jani.nikula@intel.com,
	vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com,
	jiri@resnulli.us, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v4 11/14] dpll: dpllsim: Add support to adjust phase
Date: Mon, 16 Nov 2026 14:30:07 +0000	[thread overview]
Message-ID: <179483940736.3136.8014660218595686890@kernel.org> (raw)
In-Reply-To: <20261112130359.840795-12-poros@redhat.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Documentation/driver-api/dpllsim.rst is not updated for the new
  phase-adjust feature, and the series never updates it later.

--

dpll: dpllsim: Add support to adjust phase

This adds phase adjust get and set callbacks to the dpllsim input and
output pin ops. Each pin advertises a 100 ps granularity and a symmetric
range that fits a 32-bit signed value. The stored value is reset to zero
on every live transition.

> diff --git a/drivers/dpll/dpllsim/dpll.c b/drivers/dpll/dpllsim/dpll.c
> index 0cce8fef232cd..0260bffd15700 100644
> --- a/drivers/dpll/dpllsim/dpll.c
> +++ b/drivers/dpll/dpllsim/dpll.c

[ ... ]

> @@ -197,6 +231,8 @@ static const struct dpll_pin_ops dpllsim_output_pin_ops = {
>  	.frequency_set = dpllsim_pin_frequency_set,
>  	.direction_get = dpllsim_pin_direction_get,
>  	.state_on_dpll_get = dpllsim_pin_state_get,
> +	.phase_adjust_get = dpllsim_pin_phase_adjust_get,
> +	.phase_adjust_set = dpllsim_pin_phase_adjust_set,
>  };
>  
>  static const struct dpll_pin_ops *
> @@ -212,6 +248,9 @@ static void dpllsim_pin_props(struct dpllsim_pin *pin,
>  {
>  	prop->type = pin->type;
>  	prop->board_label = config_item_name(&pin->item);
> +	prop->phase_range.min = -DPLLSIM_PHASE_ADJUST_MAX;
> +	prop->phase_range.max = DPLLSIM_PHASE_ADJUST_MAX;
> +	prop->phase_gran = DPLLSIM_PHASE_ADJUST_GRAN;
>  
>  	switch (pin->type) {
>  	case DPLL_PIN_TYPE_GNSS:
> @@ -275,6 +314,7 @@ static void dpllsim_pin_reset(struct dpllsim_pin *pin)
>  	pin->state = DPLL_PIN_STATE_DISCONNECTED;
>  	pin->frequency = pin->cfg_frequency;
>  	pin->prio = pin->cfg_prio;
> +	pin->phase_adjust = 0;
>  }

[Severity: Low]
This isn't a bug, but should Documentation/driver-api/dpllsim.rst be
updated for phase adjust? The later patches in the series don't touch it
either.

The doc paragraph about netlink-settable state only covers frequency and
priority:

    Every live transition starts from the configured values. A frequency or
    a priority set over netlink while the instance is live is reported back
    over netlink, it is not written to the ``frequency`` or ``prio``
    attribute and is gone once the instance is taken down.

Phase adjust has no configfs attribute, so it has no configured value.
dpllsim_pin_reset() always sets it back to 0.

The doc also lists the prio range and the frequency table for each pin
type. It doesn't mention any of these:

  - the advertised phase adjust range of -2147483600..2147483600 ps
  - the 100 ps granularity
  - the reset to 0 on each live transition
  - output pins accept phase adjust as well as input pins

Would a sentence or two covering these help users of the simulator?

The input pin state setter added earlier in the series is also missing
from that paragraph.

>  
>  /* Build sim->pins in registration order, the order the pins were created */

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112130359.840795-1-poros%40redhat.com

  reply	other threads:[~2026-11-16 14:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 13:03 [PATCH net-next v4 00/14] dpll: add a simulated DPLL device driver Petr Oros
2026-11-12 13:03 ` [PATCH net-next v4 01/14] dpll: dpllsim: Add " Petr Oros
2026-11-12 13:03 ` [PATCH net-next v4 02/14] selftests: dpll: add test library and device lifecycle tests Petr Oros
2026-11-16 14:29   ` netdev-bot+sashiko
2026-11-12 13:03 ` [PATCH net-next v4 03/14] dpll: dpllsim: Add configurable pins Petr Oros
2026-11-12 13:03 ` [PATCH net-next v4 04/14] selftests: dpll: add pin enumeration and property tests Petr Oros
2026-11-12 13:03 ` [PATCH net-next v4 05/14] dpll: dpllsim: Add support to set input pin state Petr Oros
2026-11-12 13:03 ` [PATCH net-next v4 06/14] selftests: dpll: add pin state tests Petr Oros
2026-11-16 14:30   ` netdev-bot+sashiko
2026-11-12 13:03 ` [PATCH net-next v4 07/14] dpll: dpllsim: Add support to get/set priority on input pins Petr Oros
2026-11-12 13:03 ` [PATCH net-next v4 08/14] selftests: dpll: add pin priority test Petr Oros
2026-11-16 14:30   ` netdev-bot+sashiko
2026-11-12 13:03 ` [PATCH net-next v4 09/14] dpll: dpllsim: Add support to set frequency on pins Petr Oros
2026-11-12 13:03 ` [PATCH net-next v4 10/14] selftests: dpll: add pin frequency test Petr Oros
2026-11-16 14:30   ` netdev-bot+sashiko
2026-11-12 13:03 ` [PATCH net-next v4 11/14] dpll: dpllsim: Add support to adjust phase Petr Oros
2026-11-16 14:30   ` netdev-bot+sashiko [this message]
2026-11-12 13:03 ` [PATCH net-next v4 12/14] selftests: dpll: add pin phase adjust test Petr Oros
2026-11-16 14:30   ` netdev-bot+sashiko
2026-11-12 13:03 ` [PATCH net-next v4 13/14] selftests: dpll: add concurrency stress tests Petr Oros
2026-11-16 14:30   ` netdev-bot+sashiko
2026-11-12 13:03 ` [PATCH net-next v4 14/14] selftests: dpll: add reference leak tests Petr Oros
2026-11-16 14:30   ` netdev-bot+sashiko

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=179483940736.3136.8014660218595686890@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=ivecera@redhat.com \
    --cc=jani.nikula@intel.com \
    --cc=jiri@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=vadim.fedorenko@linux.dev \
    /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