The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>, netdev@vger.kernel.org
Cc: Chris du Quesnay <Chris.duQuesnay@microchip.com>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@resnulli.us>,
	Michal Schmidt <mschmidt@redhat.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Pasi Vaananen <pvaanane@redhat.com>, Petr Oros <poros@redhat.com>,
	Prathosh Satish <Prathosh.Satish@microchip.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/4] dpll: zl3073x: add PTP clock support
Date: Fri, 10 Jul 2026 17:19:56 +0200	[thread overview]
Message-ID: <5c633517-048b-4174-bfc2-77eb36868635@redhat.com> (raw)
In-Reply-To: <8de7e108-3616-4e02-a7be-243e4cb8563c@linux.dev>

On 7/10/26 3:08 PM, Vadim Fedorenko wrote:
> On 08/07/2026 18:05, Ivan Vecera wrote:
>> Add PTP clock support for the ZL3073x DPLL driver. A PTP clock device
>> is registered for each DPLL channel that is in NCO mode, providing
>> gettimex64, settime64, adjtime, adjfine and perout callbacks.
> 
> Here we come back to the discussion of NCO mode. Is DPLL channel
> actually a pin (virtual or physical)? If it's not, then it means that
> channel is exposed as independent DPLL device, that shouldn't affect
> other devices, but AFAIU, it can in the current implementation. If it is
> a pin, why do you check device's mode rather then pins?
> 
> And another question - what happens when channel changes its mode to
> non-NCO? Do we have ptp device disappearing from the system?

Hi Vadim,

I understand your point. The PTP code was originally developed before
the NCO pin switching was implemented, when it made sense to split PTP
support into two patches - basic PTP for NCO-only channels (patch 2) and
then extending it to all modes via TIE write (patch 4).

Now that NCO mode can be entered and left dynamically via the NCO pin,
this split no longer makes sense. Having patch 2 register PTP only for
NCO-mode channels creates an awkward intermediate state where a dynamic
NCO switch would require dynamic PTP clock registration/unregistration.

I'll squash patches 1&3 and 2&4 in v2, so the PTP clock is always
registered regardless of the initial channel mode, with per-callback
mode checks.

Thanks,
Ivan


  reply	other threads:[~2026-07-10 15:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 17:05 [PATCH net-next 0/4] dpll: zl3073x: add PTP clock support Ivan Vecera
2026-07-08 17:05 ` [PATCH net-next 1/4] dpll: zl3073x: add channel ToD and phase step operations Ivan Vecera
2026-07-10 12:56   ` Vadim Fedorenko
2026-07-10 15:02     ` Ivan Vecera
2026-07-08 17:05 ` [PATCH net-next 2/4] dpll: zl3073x: add PTP clock support Ivan Vecera
2026-07-10 13:08   ` Vadim Fedorenko
2026-07-10 15:19     ` Ivan Vecera [this message]
2026-07-08 17:05 ` [PATCH net-next 3/4] dpll: zl3073x: add channel TIE write operation Ivan Vecera
2026-07-08 17:05 ` [PATCH net-next 4/4] dpll: zl3073x: add PTP clock adjphase and TIE support Ivan Vecera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5c633517-048b-4174-bfc2-77eb36868635@redhat.com \
    --to=ivecera@redhat.com \
    --cc=Chris.duQuesnay@microchip.com \
    --cc=Prathosh.Satish@microchip.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    --cc=pvaanane@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox