Ivan Vecera
30176bf7c8
dpll: add phase-adjust-gran pin attribute
...
Phase-adjust values are currently limited by a min-max range. Some
hardware requires, for certain pin types, that values be multiples of
a specific granularity, as in the zl3073x driver.
Add a `phase-adjust-gran` pin attribute and an appropriate field in
dpll_pin_properties. If set by the driver, use its value to validate
user-provided phase-adjust values.
Reviewed-by: Michal Schmidt <mschmidt@redhat.com >
Reviewed-by: Petr Oros <poros@redhat.com >
Tested-by: Prathosh Satish <Prathosh.Satish@microchip.com >
Signed-off-by: Ivan Vecera <ivecera@redhat.com >
Reviewed-by: Jiri Pirko <jiri@nvidia.com >
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com >
Link: https://patch.msgid.link/20251029153207.178448-2-ivecera@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2025-10-31 17:59:17 -07:00
Ivan Vecera
a680581f6a
dpll: add phase-offset-avg-factor device attribute to netlink spec
...
Add dpll device level attribute DPLL_A_PHASE_OFFSET_AVG_FACTOR to allow
control over a calculation of reported phase offset value. Attribute is
present, if the driver provides such capability, otherwise attribute
shall not be present.
Signed-off-by: Ivan Vecera <ivecera@redhat.com >
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev >
Link: https://patch.msgid.link/20250927084912.2343597-2-ivecera@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2025-09-29 18:57:41 -07:00
Arkadiusz Kubalewski
7f15ee3597
dpll: add reference-sync netlink attribute
...
Add new netlink attribute to allow user space configuration of reference
sync pin pairs, where both pins are used to provide one clock signal
consisting of both: base frequency and sync signal.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com >
Reviewed-by: Milena Olech <milena.olech@intel.com >
Reviewed-by: Jiri Pirko <jiri@nvidia.com >
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com >
Link: https://patch.msgid.link/20250626135219.1769350-2-arkadiusz.kubalewski@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2025-06-27 16:38:02 -07:00
Arkadiusz Kubalewski
c035e73603
dpll: add phase-offset-monitor feature to netlink spec
...
Add enum dpll_feature_state for control over features.
Add dpll device level attribute:
DPLL_A_PHASE_OFFSET_MONITOR - to allow control over a phase offset monitor
feature. Attribute is present and shall return current state of a feature
(enum dpll_feature_state), if the device driver provides such capability,
otherwie attribute shall not be present.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com >
Reviewed-by: Milena Olech <milena.olech@intel.com >
Reviewed-by: Jiri Pirko <jiri@nvidia.com >
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com >
Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev >
Link: https://patch.msgid.link/20250612152835.1703397-2-arkadiusz.kubalewski@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2025-06-13 18:21:57 -07:00
Arkadiusz Kubalewski
cda1fba15c
dpll: add Embedded SYNC feature for a pin
...
Implement and document new pin attributes for providing Embedded SYNC
capabilities to the DPLL subsystem users through a netlink pin-get
do/dump messages. Allow the user to set Embedded SYNC frequency with
pin-set do netlink message.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com >
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com >
Reviewed-by: Jiri Pirko <jiri@nvidia.com >
Link: https://patch.msgid.link/20240822222513.255179-2-arkadiusz.kubalewski@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2024-08-26 19:21:14 -07:00
Jakub Kicinski
289e922582
dpll: move all dpll<>netdev helpers to dpll code
...
Older versions of GCC really want to know the full definition
of the type involved in rcu_assign_pointer().
struct dpll_pin is defined in a local header, net/core can't
reach it. Move all the netdev <> dpll code into dpll, where
the type is known. Otherwise we'd need multiple function calls
to jump between the compilation units.
This is the same problem the commit under fixes was trying to address,
but with rcu_assign_pointer() not rcu_dereference().
Some of the exports are not needed, networking core can't
be a module, we only need exports for the helpers used by
drivers.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org >
Link: https://lore.kernel.org/all/35a869c8-52e8-177-1d4d-e57578b99b6@linux-m68k.org/
Fixes: 640f41ed33 ("dpll: fix build failure due to rcu_dereference_check() on unknown type")
Reviewed-by: Jiri Pirko <jiri@nvidia.com >
Reviewed-by: Eric Dumazet <edumazet@google.com >
Link: https://lore.kernel.org/r/20240305013532.694866-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2024-03-05 18:36:42 -08:00
Arkadiusz Kubalewski
27ed30d1f8
dpll: docs: add support for pin signal phase offset/adjust
...
Add documentation on:
- measurement of phase of signal between pin and dpll
- adjustment of pin signal phase
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2023-10-15 16:08:24 +01:00
Bagas Sanjaya
c8afdc0183
Documentation: dpll: wrap DPLL_CMD_PIN_GET output in a code block
...
DPLL_CMD_PIN_GET netlink command output for mux-type pins looks ugly
with normal paragraph formatting. Format it as a code block instead.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com >
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Tested-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev >
Link: https://lore.kernel.org/r/20230928052708.44820-3-bagasdotme@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-10-03 15:02:18 -07:00
Bagas Sanjaya
92425d08a6
Documentation: dpll: Fix code blocks
...
kernel test robot and Stephen Rothwell report htmldocs warnings:
Documentation/driver-api/dpll.rst:427: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 18 supplied.
.. code-block:: c
<snipped>...
Documentation/driver-api/dpll.rst:444: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 21 supplied.
.. code-block:: c
<snipped>...
Documentation/driver-api/dpll.rst:474: WARNING: Error in "code-block" directive:
maximum 1 argument(s) allowed, 12 supplied.
.. code-block:: c
<snipped>...
Fix these above by adding missing blank line separator after code-block
directive.
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202309180456.lOhxy9gS-lkp@intel.com/
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Closes: https://lore.kernel.org/linux-next/20230918131521.155e9e63@canb.auug.org.au/
Fixes: dbb291f193 ("dpll: documentation on DPLL subsystem interface")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com >
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Tested-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev >
Link: https://lore.kernel.org/r/20230928052708.44820-2-bagasdotme@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2023-10-03 15:02:18 -07:00
Vadim Fedorenko
dbb291f193
dpll: documentation on DPLL subsystem interface
...
Add documentation explaining common netlink interface to configure DPLL
devices and monitoring events. Common way to implement DPLL device in
a driver is also covered.
Co-developed-by: Bagas Sanjaya <bagasdotme@gmail.com >
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com >
Signed-off-by: Vadim Fedorenko <vadim.fedorenko@linux.dev >
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com >
Signed-off-by: Jiri Pirko <jiri@nvidia.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2023-09-17 11:50:20 +01:00