Re: [PATCH net-next v2] ptp: add Alibaba CIPU PTP clock driver

From: Vadim Fedorenko
Date: Fri Jun 27 2025 - 06:59:42 EST


On 27/06/2025 08:57, Andrew Lunn wrote:

+static int ptp_cipu_enable(struct ptp_clock_info *info,
+ struct ptp_clock_request *request, int on)
+{
+ return -EOPNOTSUPP;
+}
+
+static int ptp_cipu_settime(struct ptp_clock_info *p,
+ const struct timespec64 *ts)
+{
+ return -EOPNOTSUPP;
+}
+
+static int ptp_cipu_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
+{
+ return -EOPNOTSUPP;
+}
+
+static int ptp_cipu_adjtime(struct ptp_clock_info *ptp, s64 delta)
+{
+ return -EOPNOTSUPP;
+}

I've not looked at the core. Are these actually required? Or if they
are missing, does the core default to -EOPNOTSUPP?


I was going to say that these are not needed because posix clocks do
check if callbacks are assigned and return -EOPNOTSUPP if they are not.
That's why ptp_clock_* functions do call these callbacks without checks.