File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,9 @@ __subsystem struct ethphy_driver_api {
167
167
/** Configure link */
168
168
int (* cfg_link )(const struct device * dev , enum phy_link_speed adv_speeds );
169
169
170
- /** Set callback to be invoked when link state changes. */
170
+ /** Set callback to be invoked when link state changes. Driver has to invoke
171
+ * callback once after setting it, even if link state has not changed.
172
+ */
171
173
int (* link_cb_set )(const struct device * dev , phy_callback_t cb , void * user_data );
172
174
173
175
/** Read PHY register */
@@ -247,7 +249,11 @@ static inline int phy_get_link_state(const struct device *dev, struct phy_link_s
247
249
*
248
250
* Sets a callback that is invoked when link state changes. This is the
249
251
* preferred method for ethernet drivers to be notified of the PHY link
250
- * state change.
252
+ * state change. The callback will be invoked once after setting it,
253
+ * even if link state has not changed. There can only one callback
254
+ * function set and active at a time. This function is mainly used
255
+ * by ethernet drivers to register a callback to be notified of
256
+ * link state changes and should therefore not be used by applications.
251
257
*
252
258
* @param[in] dev PHY device structure
253
259
* @param callback Callback handler
You can’t perform that action at this time.
0 commit comments