Subject: Re: [PATCH net-next 3/3] dpll: zl3073x: add hwmon support for input reference frequencies

From: Jakub Kicinski <[email-masked]>
Date: Mon, 23 Mar 2026 15:48:25 -0700

On Fri, 20 Mar 2026 14:48:01 +0100 Ivan Vecera wrote:
> On 3/20/26 1:21 PM, Guenter Roeck wrote:
> > On 3/20/26 03:59, Ivan Vecera wrote:  
> >> Expose measured input reference frequencies via the hwmon interface
> >> using custom sysfs attributes (freqN_input and freqN_label) since
> >> hwmon has no native frequency sensor type. The frequency values are
> >> read from the cached measurements updated by the periodic work thread.
> >>
> >> Cache the device ready state in struct zl3073x_dev so that
> >> freq_input_show() can return -ENODATA without an I2C access when
> >> the device firmware is not configured.
> >>
> >> Signed-off-by: Ivan Vecera <[email-masked]>  
> > 
> > "frequency" is not a hardware monitoring attribute. I understand that it is
> > convenient to report it as one, and that other drivers implement it as 
> > well,
> > but that doesn't change that.
> > 
> > I understand that the code lives outside the hardware monitoring 
> > subsystem and is
> > thus not in control of its maintainers, so you can essentially do 
> > whatever you want,
> > even if it is wrong. That doesn't change the fact that it is wrong.
> > 
> > However, do _not_ try to add it into the official list of hardware 
> > monitoring
> > attributes. I would NACK that.
> 
> Understood. I recognize that frequency falls outside the strict scope of
> hardware monitoring and does not belong in the official hwmon ABI.
> 
> I'm using it here as a convenient way to expose these specific driver
> metrics, but I hear you loud and clear. I will absolutely not propose
> adding frequency to the official list of hwmon attributes or
> documentation.
> 
> Thank you for your time and for reviewing the patch.

Guenter, should this be a debugfs interface, then?

Also an hwmon noob question - isn't it better for the monitoring
interface to report frequency error / instability in this case
instead of absolute value? Or do you not know the expected freq?