immortalwrt/target/linux
Bjørn Mork 2a912fb63a 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>
2021-03-17 10:01:21 +01:00
..
apm821xx treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
arc770 treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
archs38 treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
armvirt treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
at91 treewide: make AddDepends/usb-serial selective 2021-03-06 12:38:38 +01:00
ath25 treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
ath79 treewide: make AddDepends/usb-serial selective 2021-03-06 12:38:38 +01:00
bcm27xx kernel: bump 5.4 to 5.4.105 2021-03-13 17:06:35 +01:00
bcm47xx bcm47xx: make WGT634U NVRAM patch apply again 2021-03-12 21:09:11 +01:00
bcm53xx bcm53xx: backport first 5.13 DTS changes 2021-03-14 19:11:05 +01:00
bcm63xx bcm63xx: AD1018-nor: add NAND flash 2021-03-08 12:45:10 +01:00
bcm4908 bcm4908: backport recent bcm_sf2 changes 2021-03-17 08:10:54 +01:00
bmips bmips: backport bcm6368-mdio-mux support 2021-03-16 20:06:00 +01:00
gemini treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
generic kernel: backports: mt7530: fix TRGMII mode after reset 2021-03-16 19:27:55 +08:00
imx6 treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
ipq40xx ipq40xx: work-around borked QCA SDK bootloader 2021-03-06 19:05:53 +00:00
ipq806x ipq806x: work-around borked QCA SDK bootloader 2021-03-06 19:05:53 +00:00
ipq807x config: limit CONFIG_PERF_EVENTS to top-level generic configs 2021-01-25 14:37:41 +01:00
kirkwood kernel: add pending mtd patches adding NVMEM support 2021-03-12 18:49:46 +01:00
lantiq kernel: add pending mtd patches adding NVMEM support 2021-03-12 18:49:46 +01:00
layerscape treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
malta treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
mediatek mediatek: mt7622: drop duplicate DEVICE_PACKAGES 2021-03-15 16:40:31 +00:00
mpc85xx treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
mvebu mvebu: LS421DE: make cosmetics changes in dts file 2021-03-13 20:15:29 +00:00
mxs treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
octeon treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
octeontx kernel: bump 5.4 to 5.4.105 2021-03-13 17:06:35 +01:00
omap target: use SPDX license identifiers on scripts 2021-02-10 15:47:23 +01:00
oxnas treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
pistachio kernel: add pending mtd patches adding NVMEM support 2021-03-12 18:49:46 +01:00
ramips kernel: bump 5.10 to 5.10.23 2021-03-13 17:06:42 +01:00
realtek realtek: enable HWMON for SFP sensors 2021-03-17 10:01:21 +01:00
rockchip treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
sunxi treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
tegra target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
uml target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
x86 x86/legacy: fix subtarget CPU for kernel 5.10 2021-03-15 19:12:03 -07:00
zynq treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00