drivers/net/dsa/realtek/rtl8366rb-leds.c
Source file repositories/reference/linux-study-clean/drivers/net/dsa/realtek/rtl8366rb-leds.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/realtek/rtl8366rb-leds.c- Extension
.c- Size
- 4186 bytes
- Lines
- 178
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/regmap.hnet/dsa.hrtl83xx.hrtl8366rb.h
Detected Declarations
function rtl8366rb_led_group_port_maskfunction rb8366rb_get_port_ledfunction rb8366rb_set_port_ledfunction rtl8366rb_cled_brightness_set_blockingfunction rtl8366rb_setup_ledfunction rtl8366rb_setup_ledsfunction dsa_switch_for_each_portfunction for_each_child_of_node_scoped
Annotated Snippet
if (!leds_np) {
dev_dbg(priv->dev, "No leds defined for port %d",
dp->index);
continue;
}
for_each_child_of_node_scoped(leds_np, led_np) {
ret = rtl8366rb_setup_led(priv, dp,
of_fwnode_handle(led_np));
if (ret)
break;
}
of_node_put(leds_np);
if (ret)
return ret;
}
return 0;
}
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/regmap.h`, `net/dsa.h`, `rtl83xx.h`, `rtl8366rb.h`.
- Detected declarations: `function rtl8366rb_led_group_port_mask`, `function rb8366rb_get_port_led`, `function rb8366rb_set_port_led`, `function rtl8366rb_cled_brightness_set_blocking`, `function rtl8366rb_setup_led`, `function rtl8366rb_setup_leds`, `function dsa_switch_for_each_port`, `function for_each_child_of_node_scoped`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.