diff options
| author | David S. Miller <davem@davemloft.net> | 2023-10-15 16:08:25 +0100 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2023-10-15 16:08:25 +0100 |
| commit | 99620ea03327c5e73407f48a6994578f71951a87 (patch) | |
| tree | 5de9a4d43ef857b34283feb278584233a03a66b4 /include/linux | |
| parent | cc30c6346b9e790676aacdfbb792aa16486f6396 (diff) | |
| parent | 20f6677234d8105e55beca355135e94bb10fbf74 (diff) | |
Merge branch 'dpll-phase-offset-phase-adjust'
Arkadiusz Kubalewski says:
====================
dpll: add phase-offset and phase-adjust
Improve monitoring and control over dpll devices.
Allow user to receive measurement of phase difference between signals
on pin and dpll (phase-offset).
Allow user to receive and control adjustable value of pin's signal
phase (phase-adjust).
v4->v5:
- rebase series on top of net-next/main, fix conflict - remove redundant
attribute type definition in subset definition
v3->v4:
- do not increase do version of uAPI header as it is not needed (v3 did
not have this change)
- fix spelling around commit messages, argument descriptions and docs
- add missing extack errors on failure set callbacks for pin phase
adjust and frequency
- remove ice check if value is already set, now redundant as checked in
the dpll subsystem
v2->v3:
- do not increase do version of uAPI header as it is not needed
v1->v2:
- improve handling for error case of requesting the phase adjust set
- align handling for error case of frequency set request with the
approach introduced for phase adjust
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dpll.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/dpll.h b/include/linux/dpll.h index bbc480cd2932..578fc5fa3750 100644 --- a/include/linux/dpll.h +++ b/include/linux/dpll.h @@ -68,6 +68,18 @@ struct dpll_pin_ops { int (*prio_set)(const struct dpll_pin *pin, void *pin_priv, const struct dpll_device *dpll, void *dpll_priv, const u32 prio, struct netlink_ext_ack *extack); + int (*phase_offset_get)(const struct dpll_pin *pin, void *pin_priv, + const struct dpll_device *dpll, void *dpll_priv, + s64 *phase_offset, + struct netlink_ext_ack *extack); + int (*phase_adjust_get)(const struct dpll_pin *pin, void *pin_priv, + const struct dpll_device *dpll, void *dpll_priv, + s32 *phase_adjust, + struct netlink_ext_ack *extack); + int (*phase_adjust_set)(const struct dpll_pin *pin, void *pin_priv, + const struct dpll_device *dpll, void *dpll_priv, + const s32 phase_adjust, + struct netlink_ext_ack *extack); }; struct dpll_pin_frequency { @@ -91,6 +103,11 @@ struct dpll_pin_frequency { #define DPLL_PIN_FREQUENCY_DCF77 \ DPLL_PIN_FREQUENCY(DPLL_PIN_FREQUENCY_77_5_KHZ) +struct dpll_pin_phase_adjust_range { + s32 min; + s32 max; +}; + struct dpll_pin_properties { const char *board_label; const char *panel_label; @@ -99,6 +116,7 @@ struct dpll_pin_properties { unsigned long capabilities; u32 freq_supported_num; struct dpll_pin_frequency *freq_supported; + struct dpll_pin_phase_adjust_range phase_range; }; #if IS_ENABLED(CONFIG_DPLL) |
