aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy/phy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/phy/phy.h')
-rw-r--r--include/linux/phy/phy.h38
1 files changed, 4 insertions, 34 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 849284e5873f..a0197fa1b116 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -61,7 +61,6 @@ struct phy {
61 struct device dev; 61 struct device dev;
62 int id; 62 int id;
63 const struct phy_ops *ops; 63 const struct phy_ops *ops;
64 struct phy_init_data *init_data;
65 struct mutex mutex; 64 struct mutex mutex;
66 int init_count; 65 int init_count;
67 int power_count; 66 int power_count;
@@ -84,32 +83,6 @@ struct phy_provider {
84 struct of_phandle_args *args); 83 struct of_phandle_args *args);
85}; 84};
86 85
87/**
88 * struct phy_consumer - represents the phy consumer
89 * @dev_name: the device name of the controller that will use this PHY device
90 * @port: name given to the consumer port
91 */
92struct phy_consumer {
93 const char *dev_name;
94 const char *port;
95};
96
97/**
98 * struct phy_init_data - contains the list of PHY consumers
99 * @num_consumers: number of consumers for this PHY device
100 * @consumers: list of PHY consumers
101 */
102struct phy_init_data {
103 unsigned int num_consumers;
104 struct phy_consumer *consumers;
105};
106
107#define PHY_CONSUMER(_dev_name, _port) \
108{ \
109 .dev_name = _dev_name, \
110 .port = _port, \
111}
112
113struct phy_lookup { 86struct phy_lookup {
114 struct list_head node; 87 struct list_head node;
115 const char *dev_id; 88 const char *dev_id;
@@ -166,10 +139,9 @@ struct phy *of_phy_get(struct device_node *np, const char *con_id);
166struct phy *of_phy_simple_xlate(struct device *dev, 139struct phy *of_phy_simple_xlate(struct device *dev,
167 struct of_phandle_args *args); 140 struct of_phandle_args *args);
168struct phy *phy_create(struct device *dev, struct device_node *node, 141struct phy *phy_create(struct device *dev, struct device_node *node,
169 const struct phy_ops *ops, 142 const struct phy_ops *ops);
170 struct phy_init_data *init_data);
171struct phy *devm_phy_create(struct device *dev, struct device_node *node, 143struct phy *devm_phy_create(struct device *dev, struct device_node *node,
172 const struct phy_ops *ops, struct phy_init_data *init_data); 144 const struct phy_ops *ops);
173void phy_destroy(struct phy *phy); 145void phy_destroy(struct phy *phy);
174void devm_phy_destroy(struct device *dev, struct phy *phy); 146void devm_phy_destroy(struct device *dev, struct phy *phy);
175struct phy_provider *__of_phy_provider_register(struct device *dev, 147struct phy_provider *__of_phy_provider_register(struct device *dev,
@@ -310,16 +282,14 @@ static inline struct phy *of_phy_simple_xlate(struct device *dev,
310 282
311static inline struct phy *phy_create(struct device *dev, 283static inline struct phy *phy_create(struct device *dev,
312 struct device_node *node, 284 struct device_node *node,
313 const struct phy_ops *ops, 285 const struct phy_ops *ops)
314 struct phy_init_data *init_data)
315{ 286{
316 return ERR_PTR(-ENOSYS); 287 return ERR_PTR(-ENOSYS);
317} 288}
318 289
319static inline struct phy *devm_phy_create(struct device *dev, 290static inline struct phy *devm_phy_create(struct device *dev,
320 struct device_node *node, 291 struct device_node *node,
321 const struct phy_ops *ops, 292 const struct phy_ops *ops)
322 struct phy_init_data *init_data)
323{ 293{
324 return ERR_PTR(-ENOSYS); 294 return ERR_PTR(-ENOSYS);
325} 295}