drivers/net/phy/open_alliance_helpers.h
Source file repositories/reference/linux-study-clean/drivers/net/phy/open_alliance_helpers.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/phy/open_alliance_helpers.h- Extension
.h- Size
- 1774 bytes
- Lines
- 48
- 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.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef OPEN_ALLIANCE_HELPERS_H
#define OPEN_ALLIANCE_HELPERS_H
/*
* These defines reflect the TDR (Time Delay Reflection) diagnostic feature
* for 1000BASE-T1 automotive Ethernet PHYs as specified by the OPEN Alliance.
*
* The register values are part of the HDD.TDR register, which provides
* information about the cable status and faults. The exact register offset
* is device-specific and should be provided by the driver.
*/
#define OA_1000BT1_HDD_TDR_ACTIVATION_MASK GENMASK(1, 0)
#define OA_1000BT1_HDD_TDR_ACTIVATION_OFF 1
#define OA_1000BT1_HDD_TDR_ACTIVATION_ON 2
#define OA_1000BT1_HDD_TDR_STATUS_MASK GENMASK(7, 4)
#define OA_1000BT1_HDD_TDR_STATUS_SHORT 3
#define OA_1000BT1_HDD_TDR_STATUS_OPEN 6
#define OA_1000BT1_HDD_TDR_STATUS_NOISE 5
#define OA_1000BT1_HDD_TDR_STATUS_CABLE_OK 7
#define OA_1000BT1_HDD_TDR_STATUS_TEST_IN_PROGRESS 8
#define OA_1000BT1_HDD_TDR_STATUS_TEST_NOT_POSSIBLE 13
/*
* OA_1000BT1_HDD_TDR_DISTANCE_MASK:
* This mask is used to extract the distance to the first/main fault
* detected by the TDR feature. Each bit represents an approximate distance
* of 1 meter, ranging from 0 to 31 meters. The exact interpretation of the
* bits may vary, but generally:
* 000000 = no error
* 000001 = error about 0-1m away
* 000010 = error between 1-2m away
* ...
* 011111 = error about 30-31m away
* 111111 = resolution not possible / out of distance
*/
#define OA_1000BT1_HDD_TDR_DISTANCE_MASK GENMASK(13, 8)
#define OA_1000BT1_HDD_TDR_DISTANCE_NO_ERROR 0
#define OA_1000BT1_HDD_TDR_DISTANCE_RESOLUTION_NOT_POSSIBLE 0x3f
int oa_1000bt1_get_ethtool_cable_result_code(u16 reg_value);
int oa_1000bt1_get_tdr_distance(u16 reg_value);
#endif /* OPEN_ALLIANCE_HELPERS_H */
Annotation
- 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.