Lines Matching +full:link +full:- +full:speed
8 * Copyright (c) 2021 IP-Logix Inc.
11 * SPDX-License-Identifier: Apache-2.0
31 /** @brief Ethernet link speeds. */
33 /** 10Base-T Half-Duplex */
35 /** 10Base-T Full-Duplex */
37 /** 100Base-T Half-Duplex */
39 /** 100Base-T Full-Duplex */
41 /** 1000Base-T Half-Duplex */
43 /** 1000Base-T Full-Duplex */
45 /** 2.5GBase-T Full-Duplex */
47 /** 5GBase-T Full-Duplex */
52 * @brief Check if phy link is full duplex.
54 * @param x Link capabilities
56 * @return True if link is full duplex, false if not.
61 * @brief Check if phy link speed is 1 Gbit/sec.
63 * @param x Link capabilities
65 * @return True if link is 1 Gbit/sec, false if not.
70 * @brief Check if phy link speed is 100 Mbit/sec.
72 * @param x Link capabilities
74 * @return True if link is 1 Mbit/sec, false if not.
78 /** @brief Link state */
80 /** Link speed */
81 enum phy_link_speed speed; member
82 /** When true the link is active and connected */
106 /** Get link state */
110 /** Configure link */
114 /** Set callback to be invoked when link state changes. */
131 * @brief Configure PHY link
133 * This route configures the advertised link speeds.
136 * @param speeds OR'd link speeds to be advertised by the PHY
139 * @retval -EIO If communication with PHY failed.
140 * @retval -ENOTSUP If not supported.
146 (const struct ethphy_driver_api *)dev->api; in phy_configure_link()
148 return api->cfg_link(dev, speeds); in phy_configure_link()
152 * @brief Get PHY link state
154 * Returns the current state of the PHY link. This can be used by
155 * to determine when a link is up and the negotiated link speed.
162 * @retval -EIO If communication with PHY failed.
168 (const struct ethphy_driver_api *)dev->api; in phy_get_link_state()
170 return api->get_link(dev, state); in phy_get_link_state()
174 * @brief Set link state change callback
176 * Sets a callback that is invoked when link state changes. This is the
177 * preferred method for ethernet drivers to be notified of the PHY link
185 * @retval -ENOTSUP If not supported.
192 (const struct ethphy_driver_api *)dev->api; in phy_link_callback_set()
194 return api->link_cb_set(dev, callback, user_data); in phy_link_callback_set()
207 * @retval -EIO If communication with PHY failed.
213 (const struct ethphy_driver_api *)dev->api; in phy_read()
215 return api->read(dev, reg_addr, value); in phy_read()
228 * @retval -EIO If communication with PHY failed.
234 (const struct ethphy_driver_api *)dev->api; in phy_write()
236 return api->write(dev, reg_addr, value); in phy_write()