openwrt/target/linux
Bjørn Mork 66e470594a realtek: enable HWMON for SFP sensors
This adds SFP sensors as a hwmon device, allowing readout of
temperatures, DOM and other sensor readings available from the
SFP.  Example from a ZyXEL GS1900-10HP with a DOM capable
1000Base-SX SFP:

root@gs1900-10hp:~# grep . /sys/class/hwmon/hwmon0/*
/sys/class/hwmon/hwmon0/curr1_crit:90
/sys/class/hwmon/hwmon0/curr1_crit_alarm:0
/sys/class/hwmon/hwmon0/curr1_input:4
/sys/class/hwmon/hwmon0/curr1_label:bias
/sys/class/hwmon/hwmon0/curr1_lcrit:0
/sys/class/hwmon/hwmon0/curr1_lcrit_alarm:0
/sys/class/hwmon/hwmon0/curr1_max:85
/sys/class/hwmon/hwmon0/curr1_max_alarm:0
/sys/class/hwmon/hwmon0/curr1_min:0
/sys/class/hwmon/hwmon0/curr1_min_alarm:0
/sys/class/hwmon/hwmon0/in0_crit:3795
/sys/class/hwmon/hwmon0/in0_crit_alarm:0
/sys/class/hwmon/hwmon0/in0_input:3317
/sys/class/hwmon/hwmon0/in0_label:VCC
/sys/class/hwmon/hwmon0/in0_lcrit:2805
/sys/class/hwmon/hwmon0/in0_lcrit_alarm:0
/sys/class/hwmon/hwmon0/in0_max:3465
/sys/class/hwmon/hwmon0/in0_max_alarm:0
/sys/class/hwmon/hwmon0/in0_min:3135
/sys/class/hwmon/hwmon0/in0_min_alarm:0
/sys/class/hwmon/hwmon0/name:sfp_p10
/sys/class/hwmon/hwmon0/power1_crit:708
/sys/class/hwmon/hwmon0/power1_crit_alarm:0
/sys/class/hwmon/hwmon0/power1_input:259
/sys/class/hwmon/hwmon0/power1_label:TX_power
/sys/class/hwmon/hwmon0/power1_lcrit:89
/sys/class/hwmon/hwmon0/power1_lcrit_alarm:0
/sys/class/hwmon/hwmon0/power1_max:501
/sys/class/hwmon/hwmon0/power1_max_alarm:0
/sys/class/hwmon/hwmon0/power1_min:126
/sys/class/hwmon/hwmon0/power1_min_alarm:0
/sys/class/hwmon/hwmon0/power2_crit:1259
/sys/class/hwmon/hwmon0/power2_crit_alarm:0
/sys/class/hwmon/hwmon0/power2_input:404
/sys/class/hwmon/hwmon0/power2_label:RX_power
/sys/class/hwmon/hwmon0/power2_lcrit:6
/sys/class/hwmon/hwmon0/power2_lcrit_alarm:0
/sys/class/hwmon/hwmon0/power2_max:794
/sys/class/hwmon/hwmon0/power2_max_alarm:0
/sys/class/hwmon/hwmon0/power2_min:10
/sys/class/hwmon/hwmon0/power2_min_alarm:0
/sys/class/hwmon/hwmon0/temp1_crit:100000
/sys/class/hwmon/hwmon0/temp1_crit_alarm:0
/sys/class/hwmon/hwmon0/temp1_input:22547
/sys/class/hwmon/hwmon0/temp1_label:temperature
/sys/class/hwmon/hwmon0/temp1_lcrit:-50000
/sys/class/hwmon/hwmon0/temp1_lcrit_alarm:0
/sys/class/hwmon/hwmon0/temp1_max:85000
/sys/class/hwmon/hwmon0/temp1_max_alarm:0
/sys/class/hwmon/hwmon0/temp1_min:-40000
/sys/class/hwmon/hwmon0/temp1_min_alarm:0
/sys/class/hwmon/hwmon0/uevent:OF_NAME=sfp-p10
/sys/class/hwmon/hwmon0/uevent:OF_FULLNAME=/sfp-p10
/sys/class/hwmon/hwmon0/uevent:OF_COMPATIBLE_0=sff,sfp
/sys/class/hwmon/hwmon0/uevent:OF_COMPATIBLE_N=1

Tested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
(cherry picked from commit 2a912fb63a)
2021-04-18 12:06:35 +02:00
..
apm821xx kernel: bump 5.4 to 5.4.108 2021-03-27 16:26:56 +01:00
arc770 target: use SPDX license identifiers on scripts 2021-02-10 15:47:23 +01:00
archs38 archs38: Add CONFIG_HZ=100 2021-03-19 18:01:55 +01:00
armvirt kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
at91 at91: use SPDX license identifiers on DTS files 2021-02-10 15:47:23 +01:00
ath25 target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
ath79 ath79: fix 10 Mbit PLL data for UniFi AC 2021-04-18 12:05:00 +02:00
bcm27xx kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
bcm47xx bcm47xx: make WGT634U NVRAM patch apply again 2021-03-17 23:38:46 +01:00
bcm53xx bcm53xx: add pending TRX patch for "firmware" partition 2021-04-16 16:19:12 +02:00
bcm63xx bcm63xx: AD1018-nor: add NAND flash 2021-03-08 12:46:46 +01:00
bcm4908 kernel: bump 5.4 to 5.4.111 2021-04-11 17:35:12 +02:00
gemini gemini,layerscape,oxnas: don't disable option CONFIG_BPF_SYSCALL 2021-04-16 11:42:42 +01:00
generic kernel: bump 5.4 to 5.4.111 2021-04-11 17:35:12 +02:00
imx6 kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
ipq40xx kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
ipq806x kernel: bump 5.4 to 5.4.111 2021-04-11 17:35:12 +02:00
kirkwood kernel: backport 5.13 mtd partitioning changes 2021-04-08 11:25:41 +02:00
lantiq kernel: 5.4: import wireguard backport 2021-04-10 14:21:32 +02:00
layerscape gemini,layerscape,oxnas: don't disable option CONFIG_BPF_SYSCALL 2021-04-16 11:42:42 +01:00
malta target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
mediatek kernel: bump 5.4 to 5.4.111 2021-04-11 17:35:12 +02:00
mpc85xx mpc85xx: p2020: fix cfi-nor detection 2021-03-01 21:49:55 +01:00
mvebu mvebu: armada 370: dts: fix the crypto engine 2021-04-18 12:04:33 +02:00
mxs target: use SPDX license identifiers on scripts 2021-02-10 15:47:23 +01:00
octeon kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
octeontx kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
omap kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
oxnas gemini,layerscape,oxnas: don't disable option CONFIG_BPF_SYSCALL 2021-04-16 11:42:42 +01:00
pistachio kernel: add pending mtd patches adding NVMEM support 2021-03-17 21:24:22 +01:00
ramips ramips: mt7530 swconfig: fix race condition in register access 2021-04-18 12:05:04 +02:00
realtek realtek: enable HWMON for SFP sensors 2021-04-18 12:06:35 +02:00
rockchip kernel: bump 5.4 to 5.4.111 2021-04-11 17:35:12 +02:00
sunxi sunxi: disable LPAE on cortexa8 2021-04-11 00:00:49 +02:00
tegra kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
uml target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
x86 kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
zynq kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00