On 3/30/2026 2:38 AM, Andrzej Kacprowski wrote:
Add configurable frequency limits to allow users to constrain the NPU
operating frequency range for power and thermal management. This support
requires firmware API version 3.34.0 or newer.

New sysfs interface:

The freq/ subdirectory contains the following attributes:

- hw_min_freq: Minimum frequency supported by hardware (read-only)
- hw_max_freq: Maximum frequency supported by hardware (read-only)
- hw_efficient_freq: Hardware's optimal operating frequency (read-only)
- current_freq: Current NPU frequency in MHz (read-only)
- set_min_freq: Configure minimum operating frequency (50XX+ devices)
- set_max_freq: Configure maximum operating frequency (50XX+ devices)
I don't see Documentation/ABI changes in this patch, which are required for sysfs.

However, I wonder if this is the best way to move forward. At best, you appear to be implementing a completely custom version of hwmon. However, I wonder if hwmon/sysfs will be limiting as you support 3 generations of devices if I recall correctly, and that number is probably going to go up. With the different generations supporting different capabilities, I suspect the sysfs approach will eventually put you into a corner.

Your collegues over in the XE area have proposed a netlink mechanism, which is in -next currently (expected to go in the 7.1 merge window). We collaborated on that mechanism, and have plans to extend it for these kinds of "telemetry" items. I'm expecting we'll have some patches posted on list in a week, maybe 2 (finishing up some of the final details). Perhaps you would find that useful?

-Jeff

Reply via email to