Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] eth: fbnic: expand hwmon sensor support
@ 2026-07-21 22:15 Zinc Lim
  2026-07-21 22:15 ` [PATCH net-next 1/6] eth: fbnic: move sensor read logic out of fbnic_mac Zinc Lim
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Zinc Lim @ 2026-07-21 22:15 UTC (permalink / raw)
  To: Alexander Duyck, Jakub Kicinski, Andrew Lunn, David S . Miller,
	Eric Dumazet, Paolo Abeni, Guenter Roeck, Simon Horman,
	Mohsin Bashir
  Cc: kernel-team, netdev, linux-kernel, linux-hwmon, zinclim, Zinc Lim

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-21 22:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21 22:15 [PATCH net-next 0/6] eth: fbnic: expand hwmon sensor support Zinc Lim
2026-07-21 22:15 ` [PATCH net-next 1/6] eth: fbnic: move sensor read logic out of fbnic_mac Zinc Lim
2026-07-21 22:15 ` [PATCH net-next 2/6] eth: fbnic: expose all hwmon attributes unconditionally as read-only Zinc Lim
2026-07-21 22:15 ` [PATCH net-next 3/6] eth: fbnic: cache hwmon sensor readings Zinc Lim
2026-07-21 22:15 ` [PATCH net-next 4/6] eth: fbnic: report temperature and voltage thresholds via hwmon Zinc Lim
2026-07-21 22:15 ` [PATCH net-next 5/6] eth: fbnic: report temperature and voltage alarms " Zinc Lim
2026-07-21 22:15 ` [PATCH net-next 6/6] eth: fbnic: firmware notifies hwmon on sensor threshold events Zinc Lim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox