Lines Matching +full:3 +full:- +full:c22

1 // SPDX-License-Identifier: GPL-2.0
24 /// C22 and C45 PHY registers.
30 /// // read C22 BMCR register
31 /// dev.read(C22::BMCR);
35 /// // Checks the link status as reported by registers in the C22 namespace
37 /// dev.genphy_read_status::<phy::C22>();
45 fn read(&self, dev: &mut Device) -> Result<u16>; in read()
48 fn write(&self, dev: &mut Device, val: u16) -> Result; in write()
51 fn read_status(dev: &mut Device) -> Result<u16>; in read_status()
56 pub struct C22(u8); struct
58 impl C22 { impl
60 pub const BMCR: Self = C22(0x00);
62 pub const BMSR: Self = C22(0x01);
64 pub const PHYSID1: Self = C22(0x02);
66 pub const PHYSID2: Self = C22(0x03);
67 /// Auto-negotiation advertisement.
68 pub const ADVERTISE: Self = C22(0x04);
69 /// Auto-negotiation link partner base page ability.
70 pub const LPA: Self = C22(0x05);
71 /// Auto-negotiation expansion.
72 pub const EXPANSION: Self = C22(0x06);
73 /// Auto-negotiation next page transmit.
74 pub const NEXT_PAGE_TRANSMIT: Self = C22(0x07);
75 /// Auto-negotiation link partner received next page.
76 pub const LP_RECEIVED_NEXT_PAGE: Self = C22(0x08);
77 /// Master-slave control.
78 pub const MASTER_SLAVE_CONTROL: Self = C22(0x09);
79 /// Master-slave status.
80 pub const MASTER_SLAVE_STATUS: Self = C22(0x0a);
82 pub const PSE_CONTROL: Self = C22(0x0b);
84 pub const PSE_STATUS: Self = C22(0x0c);
86 pub const MMD_CONTROL: Self = C22(0x0d);
88 pub const MMD_DATA: Self = C22(0x0e);
90 pub const EXTENDED_STATUS: Self = C22(0x0f);
92 /// Creates a new instance of `C22` with a vendor specific register.
93 pub const fn vendor_specific<const N: u8>() -> Self { in vendor_specific()
96 "Vendor-specific register address must be between 16 and 31" in vendor_specific()
98 C22(N) in vendor_specific()
102 impl private::Sealed for C22 {} implementation
104 impl Register for C22 { implementation
105 fn read(&self, dev: &mut Device) -> Result<u16> { in read()
117 fn write(&self, dev: &mut Device, val: u16) -> Result { in write()
127 fn read_status(dev: &mut Device) -> Result<u16> { in read_status()
160 /// Separated PMA (3).
178 /// Clause 45 uses a 5-bit device address to access a specific MMD within
179 /// a port, then a 16-bit register address to access a location within
189 pub fn new(devad: Mmd, regnum: u16) -> Self { in new()
197 fn read(&self, dev: &mut Device) -> Result<u16> { in read()
207 fn write(&self, dev: &mut Device, val: u16) -> Result { in write()
216 fn read_status(dev: &mut Device) -> Result<u16> { in read_status()