public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	Jiri Pirko <jiri@resnulli.us>, Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Donald Hunter <donald.hunter@gmail.com>,
	Prathosh Satish <Prathosh.Satish@microchip.com>,
	Petr Oros <poros@redhat.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/3] dpll: add frequency monitoring to netlink spec
Date: Wed, 1 Apr 2026 08:16:29 +0200	[thread overview]
Message-ID: <3ee5bbc9-fd0f-4abc-9b56-f53efc800221@redhat.com> (raw)
In-Reply-To: <20260331200535.6a73e940@kernel.org>

Hi Kuba,

On 4/1/26 5:05 AM, Jakub Kicinski wrote:
> On Mon, 30 Mar 2026 12:55:03 +0200 Ivan Vecera wrote:
>> Add DPLL_A_FREQUENCY_MONITOR device attribute to allow control over
>> the frequency monitor feature. The attribute uses the existing
>> dpll_feature_state enum (enable/disable) and is present in both
>> device-get reply and device-set request.
>>
>> Add DPLL_A_PIN_MEASURED_FREQUENCY pin attribute to expose the measured
>> input frequency in Hz. The attribute is present in the pin-get reply.
> 
> 
>> +      -
>> +        name: frequency-monitor
>> +        type: u32
>> +        enum: feature-state
>> +        doc: Receive or request state of frequency monitor feature.
> 
> reads a bit clunkily - how about:
> 
> 	Current or desired state of the frequency monitor feature.
> 
> ?

Agreed, will update.

> 
>> +          If enabled, dpll device shall measure all currently available
>> +          inputs for their actual input frequency.
>>     -
>>       name: pin
>>       enum-name: dpll_a_pin
>> @@ -456,6 +463,13 @@ attribute-sets:
>>             Value is in PPT (parts per trillion, 10^-12).
>>             Note: This attribute provides higher resolution than the standard
>>             fractional-frequency-offset (which is in PPM).
>> +      -
>> +        name: measured-frequency
>> +        type: u64
>> +        doc: |
>> +          The measured frequency of the input pin in Hz.
>> +          This is the actual frequency being received on the pin,
>> +          as measured by the dpll device hardware.
> 
> If we make this a u64 should it be fixed point? Seems dubious that we'd
> ever be able to measure >4Ghz frequencies, much more likely that we'd
> want sub-1 precision ? So let's say this is fixed point 34.30 ?
> 
Good point. I'm going with a decimal divider (1000) instead of 34.30, 
following the same approach as DPLL_PHASE_OFFSET_DIVIDER. The value
is now in millihertz (mHz) with a DPLL_PIN_MEASURED_FREQUENCY_DIVIDER
constant for userspace to extract integer and fractional parts.

Thanks,
Ivan


  reply	other threads:[~2026-04-01  6:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 10:55 [PATCH net-next v2 0/3] dpll: add frequency monitoring feature Ivan Vecera
2026-03-30 10:55 ` [PATCH net-next v2 1/3] dpll: add frequency monitoring to netlink spec Ivan Vecera
2026-03-31 11:43   ` Vadim Fedorenko
2026-04-01  3:05   ` Jakub Kicinski
2026-04-01  6:16     ` Ivan Vecera [this message]
2026-03-30 10:55 ` [PATCH net-next v2 2/3] dpll: add frequency monitoring callback ops Ivan Vecera
2026-03-31 11:45   ` Vadim Fedorenko
2026-04-01  3:10   ` Jakub Kicinski
2026-04-01  6:20     ` Ivan Vecera
2026-03-30 10:55 ` [PATCH net-next v2 3/3] dpll: zl3073x: implement frequency monitoring Ivan Vecera
2026-03-31 13:38   ` Petr Oros

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=3ee5bbc9-fd0f-4abc-9b56-f53efc800221@redhat.com \
    --to=ivecera@redhat.com \
    --cc=Prathosh.Satish@microchip.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    --cc=skhan@linuxfoundation.org \
    --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