]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: sfp: Add labels to hwmon sensors
authorAndrew Lunn <andrew@lunn.ch>
Sat, 24 Aug 2019 23:04:17 +0000 (01:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Aug 2019 00:01:36 +0000 (17:01 -0700)
commitcafbf950b1a691f327e81740d053ba28b6cb7032
treec0d88cfa6a811c5c934c95090201aee36b11759f
parentbc0807cf84698fdbe2048838641b8c2c2fd6dc2f
net: phy: sfp: Add labels to hwmon sensors

SFPs can report two different power values, the transmit power and the
receive power. Add labels to make it clear which is which. Also add
labels to the other sensors, VCC power supply, bias and module
temperature.

sensors(1) now shows:

sff2-isa-0000
Adapter: ISA adapter
VCC:          +3.23 V
temperature:  +33.4 C
TX_power:    276.00 uW
RX_power:     20.00 uW
bias:         +0.01 A

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c