Lines Matching refs:bindings

74 pub struct Device(Opaque<bindings::phy_device>);
86 unsafe fn from_raw<'a>(ptr: *mut bindings::phy_device) -> &'a mut Self { in from_raw()
111 bindings::phy_state_PHY_DOWN => DeviceState::Down, in state()
112 bindings::phy_state_PHY_READY => DeviceState::Ready, in state()
113 bindings::phy_state_PHY_HALTED => DeviceState::Halted, in state()
114 bindings::phy_state_PHY_ERROR => DeviceState::Error, in state()
115 bindings::phy_state_PHY_UP => DeviceState::Up, in state()
116 bindings::phy_state_PHY_RUNNING => DeviceState::Running, in state()
117 bindings::phy_state_PHY_NOLINK => DeviceState::NoLink, in state()
118 bindings::phy_state_PHY_CABLETEST => DeviceState::CableTest, in state()
131 let link = unsafe { bindings::phy_device::link_raw(phydev) }; in is_link_up()
143 let autoneg = unsafe { bindings::phy_device::autoneg_raw(phydev) }; in is_autoneg_enabled()
144 autoneg == bindings::AUTONEG_ENABLE in is_autoneg_enabled()
155 let completed = unsafe { bindings::phy_device::autoneg_complete_raw(phydev) }; in is_autoneg_completed()
171 DuplexMode::Full => bindings::DUPLEX_FULL, in set_duplex()
172 DuplexMode::Half => bindings::DUPLEX_HALF, in set_duplex()
173 DuplexMode::Unknown => bindings::DUPLEX_UNKNOWN, in set_duplex()
196 let ret = unsafe { bindings::phy_read_paged(phydev, page.into(), regnum.into()) }; in read_paged()
206 unsafe { bindings::phy_resolve_aneg_linkmode(phydev) }; in resolve_aneg_linkmode()
214 to_result(unsafe { bindings::genphy_soft_reset(phydev) }) in genphy_soft_reset()
222 to_result(unsafe { bindings::phy_init_hw(phydev) }) in init_hw()
230 to_result(unsafe { bindings::_phy_start_aneg(phydev) }) in start_aneg()
238 to_result(unsafe { bindings::genphy_resume(phydev) }) in genphy_resume()
246 to_result(unsafe { bindings::genphy_suspend(phydev) }) in genphy_suspend()
259 to_result(unsafe { bindings::genphy_update_link(phydev) }) in genphy_update_link()
267 to_result(unsafe { bindings::genphy_read_lpa(phydev) }) in genphy_read_lpa()
275 to_result(unsafe { bindings::genphy_read_abilities(phydev) }) in genphy_read_abilities()
292 pub const IS_INTERNAL: u32 = bindings::PHY_IS_INTERNAL;
294 pub const RST_AFTER_CLK_EN: u32 = bindings::PHY_RST_AFTER_CLK_EN;
296 pub const POLL_CABLE_TEST: u32 = bindings::PHY_POLL_CABLE_TEST;
298 pub const ALWAYS_CALL_SUSPEND: u32 = bindings::PHY_ALWAYS_CALL_SUSPEND;
310 unsafe extern "C" fn soft_reset_callback(phydev: *mut bindings::phy_device) -> c_int { in soft_reset_callback()
324 unsafe extern "C" fn probe_callback(phydev: *mut bindings::phy_device) -> c_int { in probe_callback()
339 unsafe extern "C" fn get_features_callback(phydev: *mut bindings::phy_device) -> c_int { in get_features_callback()
353 unsafe extern "C" fn suspend_callback(phydev: *mut bindings::phy_device) -> c_int { in suspend_callback()
367 unsafe extern "C" fn resume_callback(phydev: *mut bindings::phy_device) -> c_int { in resume_callback()
381 unsafe extern "C" fn config_aneg_callback(phydev: *mut bindings::phy_device) -> c_int { in config_aneg_callback()
395 unsafe extern "C" fn read_status_callback(phydev: *mut bindings::phy_device) -> c_int { in read_status_callback()
410 phydev: *mut bindings::phy_device, in match_phy_device_callback()
411 _phydrv: *const bindings::phy_driver, in match_phy_device_callback()
424 phydev: *mut bindings::phy_device, in read_mmd_callback()
443 phydev: *mut bindings::phy_device, in write_mmd_callback()
461 unsafe extern "C" fn link_change_notify_callback(phydev: *mut bindings::phy_device) { in link_change_notify_callback()
481 pub struct DriverVTable(Opaque<bindings::phy_driver>);
494 DriverVTable(Opaque::new(bindings::phy_driver { in create_phy_driver()
556 ..unsafe { core::mem::MaybeUninit::<bindings::phy_driver>::zeroed().assume_init() } in create_phy_driver()
660 bindings::phy_drivers_register( in register()
676 bindings::phy_drivers_unregister(self.drivers[0].0.get(), self.drivers.len() as i32) in drop()
687 pub struct DeviceId(bindings::mdio_device_id);
692 Self(bindings::mdio_device_id { in new_with_exact_mask()
700 Self(bindings::mdio_device_id { in new_with_model_mask()
708 Self(bindings::mdio_device_id { in new_with_vendor_mask()
716 Self(bindings::mdio_device_id { in new_with_custom_mask()
739 pub const fn mdio_device_id(&self) -> bindings::mdio_device_id { in mdio_device_id()
747 type RawType = bindings::mdio_device_id;