Lines Matching refs:phy

23 struct phy;
85 int (*init)(struct phy *phy);
86 int (*exit)(struct phy *phy);
87 int (*power_on)(struct phy *phy);
88 int (*power_off)(struct phy *phy);
89 int (*set_mode)(struct phy *phy, enum phy_mode mode, int submode);
90 int (*set_media)(struct phy *phy, enum phy_media media);
91 int (*set_speed)(struct phy *phy, int speed);
103 int (*configure)(struct phy *phy, union phy_configure_opts *opts);
121 int (*validate)(struct phy *phy, enum phy_mode mode, int submode,
123 int (*reset)(struct phy *phy);
124 int (*calibrate)(struct phy *phy);
125 void (*release)(struct phy *phy);
153 struct phy { struct
178 struct phy * (*of_xlate)(struct device *dev,
193 struct phy *phy; member
196 #define to_phy(a) (container_of((a), struct phy, dev))
210 static inline void phy_set_drvdata(struct phy *phy, void *data) in phy_set_drvdata() argument
212 dev_set_drvdata(&phy->dev, data); in phy_set_drvdata()
215 static inline void *phy_get_drvdata(struct phy *phy) in phy_get_drvdata() argument
217 return dev_get_drvdata(&phy->dev); in phy_get_drvdata()
221 int phy_pm_runtime_get(struct phy *phy);
222 int phy_pm_runtime_get_sync(struct phy *phy);
223 int phy_pm_runtime_put(struct phy *phy);
224 int phy_pm_runtime_put_sync(struct phy *phy);
225 void phy_pm_runtime_allow(struct phy *phy);
226 void phy_pm_runtime_forbid(struct phy *phy);
227 int phy_init(struct phy *phy);
228 int phy_exit(struct phy *phy);
229 int phy_power_on(struct phy *phy);
230 int phy_power_off(struct phy *phy);
231 int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode);
232 #define phy_set_mode(phy, mode) \ argument
233 phy_set_mode_ext(phy, mode, 0)
234 int phy_set_media(struct phy *phy, enum phy_media media);
235 int phy_set_speed(struct phy *phy, int speed);
236 int phy_configure(struct phy *phy, union phy_configure_opts *opts);
237 int phy_validate(struct phy *phy, enum phy_mode mode, int submode,
240 static inline enum phy_mode phy_get_mode(struct phy *phy) in phy_get_mode() argument
242 return phy->attrs.mode; in phy_get_mode()
244 int phy_reset(struct phy *phy);
245 int phy_calibrate(struct phy *phy);
246 static inline int phy_get_bus_width(struct phy *phy) in phy_get_bus_width() argument
248 return phy->attrs.bus_width; in phy_get_bus_width()
250 static inline void phy_set_bus_width(struct phy *phy, int bus_width) in phy_set_bus_width() argument
252 phy->attrs.bus_width = bus_width; in phy_set_bus_width()
254 struct phy *phy_get(struct device *dev, const char *string);
255 struct phy *devm_phy_get(struct device *dev, const char *string);
256 struct phy *devm_phy_optional_get(struct device *dev, const char *string);
257 struct phy *devm_of_phy_get(struct device *dev, struct device_node *np,
259 struct phy *devm_of_phy_optional_get(struct device *dev, struct device_node *np,
261 struct phy *devm_of_phy_get_by_index(struct device *dev, struct device_node *np,
263 void of_phy_put(struct phy *phy);
264 void phy_put(struct device *dev, struct phy *phy);
265 void devm_phy_put(struct device *dev, struct phy *phy);
266 struct phy *of_phy_get(struct device_node *np, const char *con_id);
267 struct phy *of_phy_simple_xlate(struct device *dev,
269 struct phy *phy_create(struct device *dev, struct device_node *node,
271 struct phy *devm_phy_create(struct device *dev, struct device_node *node,
273 void phy_destroy(struct phy *phy);
274 void devm_phy_destroy(struct device *dev, struct phy *phy);
277 struct phy * (*of_xlate)(struct device *dev,
281 struct phy * (*of_xlate)(struct device *dev,
286 int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id);
287 void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id);
289 static inline int phy_pm_runtime_get(struct phy *phy) in phy_pm_runtime_get() argument
291 if (!phy) in phy_pm_runtime_get()
296 static inline int phy_pm_runtime_get_sync(struct phy *phy) in phy_pm_runtime_get_sync() argument
298 if (!phy) in phy_pm_runtime_get_sync()
303 static inline int phy_pm_runtime_put(struct phy *phy) in phy_pm_runtime_put() argument
305 if (!phy) in phy_pm_runtime_put()
310 static inline int phy_pm_runtime_put_sync(struct phy *phy) in phy_pm_runtime_put_sync() argument
312 if (!phy) in phy_pm_runtime_put_sync()
317 static inline void phy_pm_runtime_allow(struct phy *phy) in phy_pm_runtime_allow() argument
322 static inline void phy_pm_runtime_forbid(struct phy *phy) in phy_pm_runtime_forbid() argument
327 static inline int phy_init(struct phy *phy) in phy_init() argument
329 if (!phy) in phy_init()
334 static inline int phy_exit(struct phy *phy) in phy_exit() argument
336 if (!phy) in phy_exit()
341 static inline int phy_power_on(struct phy *phy) in phy_power_on() argument
343 if (!phy) in phy_power_on()
348 static inline int phy_power_off(struct phy *phy) in phy_power_off() argument
350 if (!phy) in phy_power_off()
355 static inline int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, in phy_set_mode_ext() argument
358 if (!phy) in phy_set_mode_ext()
363 #define phy_set_mode(phy, mode) \ argument
364 phy_set_mode_ext(phy, mode, 0)
366 static inline int phy_set_media(struct phy *phy, enum phy_media media) in phy_set_media() argument
368 if (!phy) in phy_set_media()
373 static inline int phy_set_speed(struct phy *phy, int speed) in phy_set_speed() argument
375 if (!phy) in phy_set_speed()
380 static inline enum phy_mode phy_get_mode(struct phy *phy) in phy_get_mode() argument
385 static inline int phy_reset(struct phy *phy) in phy_reset() argument
387 if (!phy) in phy_reset()
392 static inline int phy_calibrate(struct phy *phy) in phy_calibrate() argument
394 if (!phy) in phy_calibrate()
399 static inline int phy_configure(struct phy *phy, in phy_configure() argument
402 if (!phy) in phy_configure()
408 static inline int phy_validate(struct phy *phy, enum phy_mode mode, int submode, in phy_validate() argument
411 if (!phy) in phy_validate()
417 static inline int phy_get_bus_width(struct phy *phy) in phy_get_bus_width() argument
422 static inline void phy_set_bus_width(struct phy *phy, int bus_width) in phy_set_bus_width() argument
427 static inline struct phy *phy_get(struct device *dev, const char *string) in phy_get()
432 static inline struct phy *devm_phy_get(struct device *dev, const char *string) in devm_phy_get()
437 static inline struct phy *devm_phy_optional_get(struct device *dev, in devm_phy_optional_get()
443 static inline struct phy *devm_of_phy_get(struct device *dev, in devm_of_phy_get()
450 static inline struct phy *devm_of_phy_optional_get(struct device *dev, in devm_of_phy_optional_get()
457 static inline struct phy *devm_of_phy_get_by_index(struct device *dev, in devm_of_phy_get_by_index()
464 static inline void of_phy_put(struct phy *phy) in of_phy_put() argument
468 static inline void phy_put(struct device *dev, struct phy *phy) in phy_put() argument
472 static inline void devm_phy_put(struct device *dev, struct phy *phy) in devm_phy_put() argument
476 static inline struct phy *of_phy_get(struct device_node *np, const char *con_id) in of_phy_get()
481 static inline struct phy *of_phy_simple_xlate(struct device *dev, in of_phy_simple_xlate()
487 static inline struct phy *phy_create(struct device *dev, in phy_create()
494 static inline struct phy *devm_phy_create(struct device *dev, in devm_phy_create()
501 static inline void phy_destroy(struct phy *phy) in phy_destroy() argument
505 static inline void devm_phy_destroy(struct device *dev, struct phy *phy) in devm_phy_destroy() argument
511 struct phy * (*of_xlate)(struct device *dev, in __of_phy_provider_register()
519 struct phy * (*of_xlate)(struct device *dev, in __devm_of_phy_provider_register()
534 phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id) in phy_create_lookup() argument
538 static inline void phy_remove_lookup(struct phy *phy, const char *con_id, in phy_remove_lookup() argument