[PATCH net-next 0/6] eth: fbnic: expand hwmon sensor support

From: Zinc Lim

Date: Tue Jul 21 2026 - 20:47:49 EST


fbnic currently exposes only the raw temperature and voltage readings
(temp1_input, in0_input) via hwmon. This series builds that out into a
complete sensor interface and hardens the read path.

The firmware capability response already carries per-board sensor
thresholds, and the firmware can asynchronously report when a sensor
crosses one of them. This series surfaces both to userspace and cleans
up the supporting plumbing:

- Move the sensor read logic out of fbnic_mac, closer to its only
caller in the hwmon code, and drop the now-unused get_sensor op.
- Expose all hwmon attributes unconditionally as read-only (0444).
- Cache the temperature and voltage readings for the current jiffy so
a burst of attribute reads issues a single firmware round-trip.
- Parse and expose the temperature (min/max/crit) and voltage
(min/max) thresholds. Thresholds the firmware did not populate read
back as -ENODATA.
- Add the corresponding alarm attributes, computed by comparing a live
reading against the stored thresholds.
- Translate the firmware's sensor-threshold-exceeded message into an
hwmon event so userspace is notified on the relevant attribute.

Zinc Lim (6):
eth: fbnic: move sensor read logic out of fbnic_mac
eth: fbnic: expose all hwmon attributes unconditionally as read-only
eth: fbnic: cache hwmon sensor readings
eth: fbnic: report temperature and voltage thresholds via hwmon
eth: fbnic: report temperature and voltage alarms via hwmon
eth: fbnic: firmware notifies hwmon on sensor threshold events

drivers/net/ethernet/meta/fbnic/fbnic.h | 8 +
drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 75 +++++
drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 30 ++
drivers/net/ethernet/meta/fbnic/fbnic_hwmon.c | 260 ++++++++++++++++--
drivers/net/ethernet/meta/fbnic/fbnic_mac.c | 55 ----
drivers/net/ethernet/meta/fbnic/fbnic_mac.h | 2 -
6 files changed, 346 insertions(+), 84 deletions(-)

--
2.53.0-Meta