Re: [PATCH net-next v2 2/2] dpll: zl3073x: add PTP clock support

From: Ivan Vecera

Date: Mon Jul 27 2026 - 04:33:55 EST




22. července 2026 22:58:48 SELČ, Jakub Kicinski <kuba@xxxxxxxxxx> napsal:
>On Mon, 13 Jul 2026 12:37:39 +0200 Ivan Vecera wrote:
>> diff --git a/drivers/dpll/zl3073x/Kconfig b/drivers/dpll/zl3073x/Kconfig
>> index 5bbca14005813..d0574ad571d3f 100644
>> --- a/drivers/dpll/zl3073x/Kconfig
>> +++ b/drivers/dpll/zl3073x/Kconfig
>> @@ -2,7 +2,7 @@
>>
>> config ZL3073X
>> tristate "Microchip Azurite DPLL/PTP/SyncE devices" if COMPILE_TEST
>> - depends on NET
>> + depends on NET && PTP_1588_CLOCK_OPTIONAL
>
>Real dependency is probably better here?
>The Optional is meant for NICs for which PTP truly is a side-feature.
>

There are some chip variants that don't support PTP. Should we depend non-optionally?

>> +zl3073x_dpll_alloc(struct zl3073x_dev *zldev, u8 ch)
>
>Would be nice to factor out the code movement to a separate commit to
>make this diff easier to follow

Yes, will do.

>
>> #include <linux/dpll.h>
>> #include <linux/list.h>
>> +#include <linux/mutex.h>
>
>spurious include?

Yep, will remove.

>
>> +#include <linux/ptp_clock_kernel.h>
>>
>> #include "core.h"
>>
>> @@ -22,6 +24,8 @@
>> * @type: DPLL type (PPS or EEC)
>> * @lock_status: last saved DPLL lock status
>> * @pins: list of pins
>> + * @ptp_info: PTP clock info
>> + * @ptp_clock: registered PTP clock (or NULL)
>> */
>> struct zl3073x_dpll {
>> struct list_head list;
>> @@ -36,6 +40,8 @@ struct zl3073x_dpll {
>> enum dpll_type type;
>> enum dpll_lock_status lock_status;
>> struct list_head pins;
>> + struct ptp_clock_info ptp_info;
>> + struct ptp_clock *ptp_clock;
>> };
>>
>> struct zl3073x_dpll *zl3073x_dpll_alloc(struct zl3073x_dev *zldev, u8 ch);