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);
152 struct phy { struct
176 struct phy * (*of_xlate)(struct device *dev,
191 struct phy *phy; member
194 #define to_phy(a) (container_of((a), struct phy, dev))
208 static inline void phy_set_drvdata(struct phy *phy, void *data) in phy_set_drvdata() argument
210 dev_set_drvdata(&phy->dev, data); in phy_set_drvdata()
213 static inline void *phy_get_drvdata(struct phy *phy) in phy_get_drvdata() argument
215 return dev_get_drvdata(&phy->dev); in phy_get_drvdata()
219 int phy_pm_runtime_get(struct phy *phy);
220 int phy_pm_runtime_get_sync(struct phy *phy);
221 int phy_pm_runtime_put(struct phy *phy);
222 int phy_pm_runtime_put_sync(struct phy *phy);
223 void phy_pm_runtime_allow(struct phy *phy);
224 void phy_pm_runtime_forbid(struct phy *phy);
225 int phy_init(struct phy *phy);
226 int phy_exit(struct phy *phy);
227 int phy_power_on(struct phy *phy);
228 int phy_power_off(struct phy *phy);
229 int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode);
230 #define phy_set_mode(phy, mode) \ argument
231 phy_set_mode_ext(phy, mode, 0)
232 int phy_set_media(struct phy *phy, enum phy_media media);
233 int phy_set_speed(struct phy *phy, int speed);
234 int phy_configure(struct phy *phy, union phy_configure_opts *opts);
235 int phy_validate(struct phy *phy, enum phy_mode mode, int submode,
238 static inline enum phy_mode phy_get_mode(struct phy *phy) in phy_get_mode() argument
240 return phy->attrs.mode; in phy_get_mode()
242 int phy_reset(struct phy *phy);
243 int phy_calibrate(struct phy *phy);
244 static inline int phy_get_bus_width(struct phy *phy) in phy_get_bus_width() argument
246 return phy->attrs.bus_width; in phy_get_bus_width()
248 static inline void phy_set_bus_width(struct phy *phy, int bus_width) in phy_set_bus_width() argument
250 phy->attrs.bus_width = bus_width; in phy_set_bus_width()
252 struct phy *phy_get(struct device *dev, const char *string);
253 struct phy *devm_phy_get(struct device *dev, const char *string);
254 struct phy *devm_phy_optional_get(struct device *dev, const char *string);
255 struct phy *devm_of_phy_get(struct device *dev, struct device_node *np,
257 struct phy *devm_of_phy_optional_get(struct device *dev, struct device_node *np,
259 struct phy *devm_of_phy_get_by_index(struct device *dev, struct device_node *np,
261 void of_phy_put(struct phy *phy);
262 void phy_put(struct device *dev, struct phy *phy);
263 void devm_phy_put(struct device *dev, struct phy *phy);
264 struct phy *of_phy_get(struct device_node *np, const char *con_id);
265 struct phy *of_phy_simple_xlate(struct device *dev,
267 struct phy *phy_create(struct device *dev, struct device_node *node,
269 struct phy *devm_phy_create(struct device *dev, struct device_node *node,
271 void phy_destroy(struct phy *phy);
272 void devm_phy_destroy(struct device *dev, struct phy *phy);
275 struct phy * (*of_xlate)(struct device *dev,
279 struct phy * (*of_xlate)(struct device *dev,
284 int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id);
285 void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id);
287 static inline int phy_pm_runtime_get(struct phy *phy) in phy_pm_runtime_get() argument
289 if (!phy) in phy_pm_runtime_get()
294 static inline int phy_pm_runtime_get_sync(struct phy *phy) in phy_pm_runtime_get_sync() argument
296 if (!phy) in phy_pm_runtime_get_sync()
301 static inline int phy_pm_runtime_put(struct phy *phy) in phy_pm_runtime_put() argument
303 if (!phy) in phy_pm_runtime_put()
308 static inline int phy_pm_runtime_put_sync(struct phy *phy) in phy_pm_runtime_put_sync() argument
310 if (!phy) in phy_pm_runtime_put_sync()
315 static inline void phy_pm_runtime_allow(struct phy *phy) in phy_pm_runtime_allow() argument
320 static inline void phy_pm_runtime_forbid(struct phy *phy) in phy_pm_runtime_forbid() argument
325 static inline int phy_init(struct phy *phy) in phy_init() argument
327 if (!phy) in phy_init()
332 static inline int phy_exit(struct phy *phy) in phy_exit() argument
334 if (!phy) in phy_exit()
339 static inline int phy_power_on(struct phy *phy) in phy_power_on() argument
341 if (!phy) in phy_power_on()
346 static inline int phy_power_off(struct phy *phy) in phy_power_off() argument
348 if (!phy) in phy_power_off()
353 static inline int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, in phy_set_mode_ext() argument
356 if (!phy) in phy_set_mode_ext()
361 #define phy_set_mode(phy, mode) \ argument
362 phy_set_mode_ext(phy, mode, 0)
364 static inline int phy_set_media(struct phy *phy, enum phy_media media) in phy_set_media() argument
366 if (!phy) in phy_set_media()
371 static inline int phy_set_speed(struct phy *phy, int speed) in phy_set_speed() argument
373 if (!phy) in phy_set_speed()
378 static inline enum phy_mode phy_get_mode(struct phy *phy) in phy_get_mode() argument
383 static inline int phy_reset(struct phy *phy) in phy_reset() argument
385 if (!phy) in phy_reset()
390 static inline int phy_calibrate(struct phy *phy) in phy_calibrate() argument
392 if (!phy) in phy_calibrate()
397 static inline int phy_configure(struct phy *phy, in phy_configure() argument
400 if (!phy) in phy_configure()
406 static inline int phy_validate(struct phy *phy, enum phy_mode mode, int submode, in phy_validate() argument
409 if (!phy) in phy_validate()
415 static inline int phy_get_bus_width(struct phy *phy) in phy_get_bus_width() argument
420 static inline void phy_set_bus_width(struct phy *phy, int bus_width) in phy_set_bus_width() argument
425 static inline struct phy *phy_get(struct device *dev, const char *string) in phy_get()
430 static inline struct phy *devm_phy_get(struct device *dev, const char *string) in devm_phy_get()
435 static inline struct phy *devm_phy_optional_get(struct device *dev, in devm_phy_optional_get()
441 static inline struct phy *devm_of_phy_get(struct device *dev, in devm_of_phy_get()
448 static inline struct phy *devm_of_phy_optional_get(struct device *dev, in devm_of_phy_optional_get()
455 static inline struct phy *devm_of_phy_get_by_index(struct device *dev, in devm_of_phy_get_by_index()
462 static inline void of_phy_put(struct phy *phy) in of_phy_put() argument
466 static inline void phy_put(struct device *dev, struct phy *phy) in phy_put() argument
470 static inline void devm_phy_put(struct device *dev, struct phy *phy) in devm_phy_put() argument
474 static inline struct phy *of_phy_get(struct device_node *np, const char *con_id) in of_phy_get()
479 static inline struct phy *of_phy_simple_xlate(struct device *dev, in of_phy_simple_xlate()
485 static inline struct phy *phy_create(struct device *dev, in phy_create()
492 static inline struct phy *devm_phy_create(struct device *dev, in devm_phy_create()
499 static inline void phy_destroy(struct phy *phy) in phy_destroy() argument
503 static inline void devm_phy_destroy(struct device *dev, struct phy *phy) in devm_phy_destroy() argument
509 struct phy * (*of_xlate)(struct device *dev, in __of_phy_provider_register()
517 struct phy * (*of_xlate)(struct device *dev, in __devm_of_phy_provider_register()
532 phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id) in phy_create_lookup() argument
536 static inline void phy_remove_lookup(struct phy *phy, const char *con_id, in phy_remove_lookup() argument