Lines Matching full:bindings
9 use crate::{bindings, error::*, prelude::*, str::CStr, types::Opaque};
72 pub struct Device(Opaque<bindings::phy_device>);
82 unsafe fn from_raw<'a>(ptr: *mut bindings::phy_device) -> &'a mut Self { in from_raw()
83 // CAST: `Self` is a `repr(transparent)` wrapper around `bindings::phy_device`. in from_raw()
107 bindings::phy_state_PHY_DOWN => DeviceState::Down, in state()
108 bindings::phy_state_PHY_READY => DeviceState::Ready, in state()
109 bindings::phy_state_PHY_HALTED => DeviceState::Halted, in state()
110 bindings::phy_state_PHY_ERROR => DeviceState::Error, in state()
111 bindings::phy_state_PHY_UP => DeviceState::Up, in state()
112 bindings::phy_state_PHY_RUNNING => DeviceState::Running, in state()
113 bindings::phy_state_PHY_NOLINK => DeviceState::NoLink, in state()
114 bindings::phy_state_PHY_CABLETEST => DeviceState::CableTest, in state()
141 bit_field.get(13, 1) == bindings::AUTONEG_ENABLE as u64 in is_autoneg_enabled()
169 DuplexMode::Full => bindings::DUPLEX_FULL as i32, in set_duplex()
170 DuplexMode::Half => bindings::DUPLEX_HALF as i32, in set_duplex()
171 DuplexMode::Unknown => bindings::DUPLEX_UNKNOWN as i32, in set_duplex()
186 bindings::mdiobus_read((*phydev).mdio.bus, (*phydev).mdio.addr, regnum.into()) in read()
202 bindings::mdiobus_write((*phydev).mdio.bus, (*phydev).mdio.addr, regnum.into(), val) in write()
211 let ret = unsafe { bindings::phy_read_paged(phydev, page.into(), regnum.into()) }; in read_paged()
224 unsafe { bindings::phy_resolve_aneg_linkmode(phydev) }; in resolve_aneg_linkmode()
232 to_result(unsafe { bindings::genphy_soft_reset(phydev) }) in genphy_soft_reset()
240 to_result(unsafe { bindings::phy_init_hw(phydev) }) in init_hw()
248 to_result(unsafe { bindings::_phy_start_aneg(phydev) }) in start_aneg()
256 to_result(unsafe { bindings::genphy_resume(phydev) }) in genphy_resume()
264 to_result(unsafe { bindings::genphy_suspend(phydev) }) in genphy_suspend()
272 let ret = unsafe { bindings::genphy_read_status(phydev) }; in genphy_read_status()
285 to_result(unsafe { bindings::genphy_update_link(phydev) }) in genphy_update_link()
293 to_result(unsafe { bindings::genphy_read_lpa(phydev) }) in genphy_read_lpa()
301 to_result(unsafe { bindings::genphy_read_abilities(phydev) }) in genphy_read_abilities()
310 pub const IS_INTERNAL: u32 = bindings::PHY_IS_INTERNAL;
312 pub const RST_AFTER_CLK_EN: u32 = bindings::PHY_RST_AFTER_CLK_EN;
314 pub const POLL_CABLE_TEST: u32 = bindings::PHY_POLL_CABLE_TEST;
316 pub const ALWAYS_CALL_SUSPEND: u32 = bindings::PHY_ALWAYS_CALL_SUSPEND;
329 phydev: *mut bindings::phy_device, in soft_reset_callback()
345 phydev: *mut bindings::phy_device, in get_features_callback()
360 unsafe extern "C" fn suspend_callback(phydev: *mut bindings::phy_device) -> core::ffi::c_int { in suspend_callback()
374 unsafe extern "C" fn resume_callback(phydev: *mut bindings::phy_device) -> core::ffi::c_int { in resume_callback()
389 phydev: *mut bindings::phy_device, in config_aneg_callback()
405 phydev: *mut bindings::phy_device, in read_status_callback()
421 phydev: *mut bindings::phy_device, in match_phy_device_callback()
434 phydev: *mut bindings::phy_device, in read_mmd_callback()
453 phydev: *mut bindings::phy_device, in write_mmd_callback()
471 unsafe extern "C" fn link_change_notify_callback(phydev: *mut bindings::phy_device) { in link_change_notify_callback()
491 pub struct DriverVTable(Opaque<bindings::phy_driver>);
504 DriverVTable(Opaque::new(bindings::phy_driver { in create_phy_driver()
561 ..unsafe { core::mem::MaybeUninit::<bindings::phy_driver>::zeroed().assume_init() } in create_phy_driver()
656 bindings::phy_drivers_register(drivers[0].0.get(), drivers.len().try_into()?, module.0) in register()
668 bindings::phy_drivers_unregister(self.drivers[0].0.get(), self.drivers.len() as i32) in drop()
727 pub const fn mdio_device_id(&self) -> bindings::mdio_device_id { in mdio_device_id()
728 bindings::mdio_device_id { in mdio_device_id()
837 /// static __mod_mdio__phydev_device_table: [::kernel::bindings::mdio_device_id; 2] = [
838 /// ::kernel::bindings::mdio_device_id {
842 /// ::kernel::bindings::mdio_device_id {
860 static __mod_mdio__phydev_device_table: [$crate::bindings::mdio_device_id;
863 $crate::bindings::mdio_device_id {