r8169: add support for LED's on RTL8168/RTL8101
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 16 Dec 2023 19:58:10 +0000 (20:58 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:29 +0000 (11:35 +0000)
commit71b3c1b09f2b5330c24283a9063bf8fa00199e6f
tree8e83c579f6314b2027dc243f2edcd755a6993996
parent2eca5e612282ae97a77b4d1440b23bc4623b701a
r8169: add support for LED's on RTL8168/RTL8101

commit 18764b883e157e28126b54e7d4ba9dd487d5bf54 upstream.

This adds support for the LED's on most chip versions. Excluded are
the old non-PCIe versions and RTL8125. RTL8125 has a different LED
register layout, support for it will follow later.

LED's can be controlled from userspace using the netdev LED trigger.

Tested on RTL8168h.

Note: The driver can't know which LED's are actually physically
wired. Therefore not every LED device may represent a physically
available LED.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/Makefile
drivers/net/ethernet/realtek/r8169.h
drivers/net/ethernet/realtek/r8169_leds.c [new file with mode: 0644]
drivers/net/ethernet/realtek/r8169_main.c