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.
quoted hunk ↗ jump to hunk
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
[ ... ]
quoted hunk ↗ jump to hunk
@@ -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