On Tue, 24 Nov 2026 00:40:34 +0000, netd…@kernel.org wrote:
> > + return 0; > > return ret; > > + } > > if (nla_put_64bit(msg, DPLL_A_PIN_PHASE_OFFSET, sizeof(phase_offset), > > &phase_offset, DPLL_A_PIN_PAD)) > > return -EMSGSIZE;
> > [Severity: Low] > Should Documentation/driver-api/dpll.rst be updated along with these two > -ENODATA paths? Right now it still promises that both attributes are > always present. > > The "Phase offset measurement and adjustment" section says: > > If pin-dpll phase offset measurement is supported, it shall be > provided with DPLL_A_PIN_PHASE_OFFSET attribute for each parent dpll > device. > > and: > > Configured phase adjust value is provided with > DPLL_A_PIN_PHASE_ADJUST attribute of a pin > > The "Phase offset monitor" section says: > > Once enabled the phase offset measurements for the input shall be > returned in the DPLL_A_PIN_PHASE_OFFSET attribute. > > After this change, dpll_cmd_pin_get_one() can still send > DPLL_A_PIN_PHASE_ADJUST_MIN/MAX/GRAN from pin->prop without > DPLL_A_PIN_PHASE_ADJUST. It can also send a DPLL_A_PIN_PARENT_DEVICE nest > without DPLL_A_PIN_PHASE_OFFSET, even though ops->phase_offset_get is > implemented. > > The new driver-facing rule, that -ENODATA from these callbacks means "no > value, omit the attribute", also isn't written down anywhere. The > phase_offset_get and phase_adjust_get members of struct dpll_pin_ops in > include/linux/dpll.h have no comment describing it. The netlink spec in > Documentation/netlink/specs/dpll.yaml doesn't say these attributes may be > absent. > > None of the later patches in the series, up to and including "dpll: > sit9531x: model the inter-PLL sync line as a pair of pins", touches > dpll.rst, include/linux/dpll.h or dpll.yaml. The sit9531x driver added > later in the series returns -ENODATA from phase_offset_get, and from > phase_adjust_get when the delay is above S32_MAX. Once the series lands, > the documented guarantee no longer holds for an in-tree driver. > > Could the documentation and the callback descriptions be updated to cover > the -ENODATA case?
Yes. In v17 dpll.rst, the netlink spec and the two callbacks in struct dpll_pin_ops say that a driver with no value returns -ENODATA and the attribute is left out.