lan78xx_conf...leds_from_dt(9)
π lan78xx_configure_leds_from_dt β bestie's guide
okay so this is a page from the Kernel API Manual, section 9, and it's all about lan78xx_configure_leds_from_dt. yes the name is a whole mouthful, i know π but it's literally just "turn on the right LEDs because the device tree said so." stick with me π«Ά
β¨ NAME β¨
lan78xx_configure_leds_from_dt β configure LED enables based on DT
π SYNOPSIS π
int lan78xx_configure_leds_from_dt (struct lan78xx_net *dev , struct
phy_device *phydev );
πΈ ARGUMENTS πΈ
devβ the LAN78xx device πphydevβ the PHY device, and heads up: it must be valid (no cap, no exceptions, she checks nothing, she just trusts you π)
π¦ DESCRIPTION π¦
So what she does is: she reads the "microchip,led-modes" property from the PHY's DT node, and then she enables the corresponding number of LEDs by writing to HW_CFG. that's the whole vibe, honestly β¨
This helper preserves the original logic, and it enables up to 4 LEDs, periodt. π₯
And if the property isn't there at all? she does nothing. no drama, no fallback, just vibes and an early exit π
lowkey important: "property not present" = function does nothing. no secret default behaviour, bestie, don't go inventing one π
β RETURN β
0on success π- a negative error code if it goes sideways π
π SEE ALSO π
Kernel file ./drivers/net/usb/lan78xx.c β go read the source, it's giving main character energy:
lan78xx_phy_int_ack(9)lan78xx_configure_usb(9)lan78xx_configure_flowcontrol(9)lan78xx_mac_eee_enable(9)lan78xx_set_fixed_link(9)lan78xx_get_phy(9)lan78xx_mac_prepare_for_phy(9)
k that's the page!! π this one's brought to you by the fine folks over in ./drivers/net/usb, stamped October 2026, and yeah β that's the source and the date, so you can cite me. mwah ππ§π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms