Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 1 | /* |
| 2 | * phy.h -- generic phy header file |
| 3 | * |
| 4 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com |
| 5 | * |
| 6 | * Author: Kishon Vijay Abraham I <kishon@ti.com> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | */ |
| 13 | |
| 14 | #ifndef __DRIVERS_PHY_H |
| 15 | #define __DRIVERS_PHY_H |
| 16 | |
| 17 | #include <linux/err.h> |
| 18 | #include <linux/of.h> |
| 19 | #include <linux/device.h> |
| 20 | #include <linux/pm_runtime.h> |
Roger Quadros | 3be8812 | 2014-07-04 12:55:45 +0300 | [diff] [blame] | 21 | #include <linux/regulator/consumer.h> |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 22 | |
| 23 | struct phy; |
| 24 | |
David Lechner | 300eb01 | 2016-05-09 18:39:59 -0500 | [diff] [blame] | 25 | enum phy_mode { |
| 26 | PHY_MODE_INVALID, |
| 27 | PHY_MODE_USB_HOST, |
| 28 | PHY_MODE_USB_DEVICE, |
| 29 | PHY_MODE_USB_OTG, |
| 30 | }; |
| 31 | |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 32 | /** |
| 33 | * struct phy_ops - set of function pointers for performing phy operations |
| 34 | * @init: operation to be performed for initializing phy |
| 35 | * @exit: operation to be performed while exiting |
| 36 | * @power_on: powering on the phy |
| 37 | * @power_off: powering off the phy |
David Lechner | 300eb01 | 2016-05-09 18:39:59 -0500 | [diff] [blame] | 38 | * @set_mode: set the mode of the phy |
Randy Li | cac18ec | 2016-09-10 02:59:37 +0800 | [diff] [blame] | 39 | * @reset: resetting the phy |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 40 | * @owner: the module owner containing the ops |
| 41 | */ |
| 42 | struct phy_ops { |
| 43 | int (*init)(struct phy *phy); |
| 44 | int (*exit)(struct phy *phy); |
| 45 | int (*power_on)(struct phy *phy); |
| 46 | int (*power_off)(struct phy *phy); |
David Lechner | 300eb01 | 2016-05-09 18:39:59 -0500 | [diff] [blame] | 47 | int (*set_mode)(struct phy *phy, enum phy_mode mode); |
Randy Li | cac18ec | 2016-09-10 02:59:37 +0800 | [diff] [blame] | 48 | int (*reset)(struct phy *phy); |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 49 | struct module *owner; |
| 50 | }; |
| 51 | |
| 52 | /** |
Matt Porter | 8feed34 | 2013-12-19 09:23:02 -0500 | [diff] [blame] | 53 | * struct phy_attrs - represents phy attributes |
| 54 | * @bus_width: Data path width implemented by PHY |
| 55 | */ |
| 56 | struct phy_attrs { |
| 57 | u32 bus_width; |
| 58 | }; |
| 59 | |
| 60 | /** |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 61 | * struct phy - represents the phy device |
| 62 | * @dev: phy device |
| 63 | * @id: id of the phy device |
| 64 | * @ops: function pointers for performing phy operations |
| 65 | * @init_data: list of PHY consumers (non-dt only) |
| 66 | * @mutex: mutex to protect phy_ops |
| 67 | * @init_count: used to protect when the PHY is used by multiple consumers |
| 68 | * @power_count: used to protect when the PHY is used by multiple consumers |
Matt Porter | 8feed34 | 2013-12-19 09:23:02 -0500 | [diff] [blame] | 69 | * @phy_attrs: used to specify PHY specific attributes |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 70 | */ |
| 71 | struct phy { |
| 72 | struct device dev; |
| 73 | int id; |
| 74 | const struct phy_ops *ops; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 75 | struct mutex mutex; |
| 76 | int init_count; |
| 77 | int power_count; |
Matt Porter | 8feed34 | 2013-12-19 09:23:02 -0500 | [diff] [blame] | 78 | struct phy_attrs attrs; |
Roger Quadros | 3be8812 | 2014-07-04 12:55:45 +0300 | [diff] [blame] | 79 | struct regulator *pwr; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 80 | }; |
| 81 | |
| 82 | /** |
| 83 | * struct phy_provider - represents the phy provider |
| 84 | * @dev: phy provider device |
| 85 | * @owner: the module owner having of_xlate |
| 86 | * @of_xlate: function pointer to obtain phy instance from phy pointer |
| 87 | * @list: to maintain a linked list of PHY providers |
| 88 | */ |
| 89 | struct phy_provider { |
| 90 | struct device *dev; |
Thierry Reding | 1140f7c | 2016-04-05 17:17:34 +0200 | [diff] [blame] | 91 | struct device_node *children; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 92 | struct module *owner; |
| 93 | struct list_head list; |
| 94 | struct phy * (*of_xlate)(struct device *dev, |
| 95 | struct of_phandle_args *args); |
| 96 | }; |
| 97 | |
Heikki Krogerus | b7bc15b9 | 2014-11-19 17:28:18 +0200 | [diff] [blame] | 98 | struct phy_lookup { |
| 99 | struct list_head node; |
| 100 | const char *dev_id; |
| 101 | const char *con_id; |
| 102 | struct phy *phy; |
| 103 | }; |
| 104 | |
Heikki Krogerus | d451057 | 2014-11-19 17:28:17 +0200 | [diff] [blame] | 105 | #define to_phy(a) (container_of((a), struct phy, dev)) |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 106 | |
| 107 | #define of_phy_provider_register(dev, xlate) \ |
Thierry Reding | 1140f7c | 2016-04-05 17:17:34 +0200 | [diff] [blame] | 108 | __of_phy_provider_register((dev), NULL, THIS_MODULE, (xlate)) |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 109 | |
| 110 | #define devm_of_phy_provider_register(dev, xlate) \ |
Thierry Reding | 1140f7c | 2016-04-05 17:17:34 +0200 | [diff] [blame] | 111 | __devm_of_phy_provider_register((dev), NULL, THIS_MODULE, (xlate)) |
| 112 | |
| 113 | #define of_phy_provider_register_full(dev, children, xlate) \ |
| 114 | __of_phy_provider_register(dev, children, THIS_MODULE, xlate) |
| 115 | |
| 116 | #define devm_of_phy_provider_register_full(dev, children, xlate) \ |
| 117 | __devm_of_phy_provider_register(dev, children, THIS_MODULE, xlate) |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 118 | |
| 119 | static inline void phy_set_drvdata(struct phy *phy, void *data) |
| 120 | { |
| 121 | dev_set_drvdata(&phy->dev, data); |
| 122 | } |
| 123 | |
| 124 | static inline void *phy_get_drvdata(struct phy *phy) |
| 125 | { |
| 126 | return dev_get_drvdata(&phy->dev); |
| 127 | } |
| 128 | |
| 129 | #if IS_ENABLED(CONFIG_GENERIC_PHY) |
| 130 | int phy_pm_runtime_get(struct phy *phy); |
| 131 | int phy_pm_runtime_get_sync(struct phy *phy); |
| 132 | int phy_pm_runtime_put(struct phy *phy); |
| 133 | int phy_pm_runtime_put_sync(struct phy *phy); |
| 134 | void phy_pm_runtime_allow(struct phy *phy); |
| 135 | void phy_pm_runtime_forbid(struct phy *phy); |
| 136 | int phy_init(struct phy *phy); |
| 137 | int phy_exit(struct phy *phy); |
| 138 | int phy_power_on(struct phy *phy); |
| 139 | int phy_power_off(struct phy *phy); |
David Lechner | 300eb01 | 2016-05-09 18:39:59 -0500 | [diff] [blame] | 140 | int phy_set_mode(struct phy *phy, enum phy_mode mode); |
Randy Li | cac18ec | 2016-09-10 02:59:37 +0800 | [diff] [blame] | 141 | int phy_reset(struct phy *phy); |
Matt Porter | 8feed34 | 2013-12-19 09:23:02 -0500 | [diff] [blame] | 142 | static inline int phy_get_bus_width(struct phy *phy) |
| 143 | { |
| 144 | return phy->attrs.bus_width; |
| 145 | } |
| 146 | static inline void phy_set_bus_width(struct phy *phy, int bus_width) |
| 147 | { |
| 148 | phy->attrs.bus_width = bus_width; |
| 149 | } |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 150 | struct phy *phy_get(struct device *dev, const char *string); |
Andrew Lunn | 788a4d5 | 2014-02-04 18:33:12 +0100 | [diff] [blame] | 151 | struct phy *phy_optional_get(struct device *dev, const char *string); |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 152 | struct phy *devm_phy_get(struct device *dev, const char *string); |
Andrew Lunn | 788a4d5 | 2014-02-04 18:33:12 +0100 | [diff] [blame] | 153 | struct phy *devm_phy_optional_get(struct device *dev, const char *string); |
Kamil Debski | b5d682f | 2014-03-06 12:16:47 +0100 | [diff] [blame] | 154 | struct phy *devm_of_phy_get(struct device *dev, struct device_node *np, |
| 155 | const char *con_id); |
Arun Ramamurthy | 6be109b | 2015-04-22 16:04:11 -0700 | [diff] [blame] | 156 | struct phy *devm_of_phy_get_by_index(struct device *dev, struct device_node *np, |
| 157 | int index); |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 158 | void phy_put(struct phy *phy); |
| 159 | void devm_phy_put(struct device *dev, struct phy *phy); |
Kamil Debski | 0b3f3b2 | 2014-03-06 12:16:46 +0100 | [diff] [blame] | 160 | struct phy *of_phy_get(struct device_node *np, const char *con_id); |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 161 | struct phy *of_phy_simple_xlate(struct device *dev, |
| 162 | struct of_phandle_args *args); |
Kishon Vijay Abraham I | f0ed817 | 2014-07-14 15:55:02 +0530 | [diff] [blame] | 163 | struct phy *phy_create(struct device *dev, struct device_node *node, |
Heikki Krogerus | dbc9863 | 2014-11-19 17:28:21 +0200 | [diff] [blame] | 164 | const struct phy_ops *ops); |
Kishon Vijay Abraham I | f0ed817 | 2014-07-14 15:55:02 +0530 | [diff] [blame] | 165 | struct phy *devm_phy_create(struct device *dev, struct device_node *node, |
Heikki Krogerus | dbc9863 | 2014-11-19 17:28:21 +0200 | [diff] [blame] | 166 | const struct phy_ops *ops); |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 167 | void phy_destroy(struct phy *phy); |
| 168 | void devm_phy_destroy(struct device *dev, struct phy *phy); |
| 169 | struct phy_provider *__of_phy_provider_register(struct device *dev, |
Thierry Reding | 1140f7c | 2016-04-05 17:17:34 +0200 | [diff] [blame] | 170 | struct device_node *children, struct module *owner, |
| 171 | struct phy * (*of_xlate)(struct device *dev, |
| 172 | struct of_phandle_args *args)); |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 173 | struct phy_provider *__devm_of_phy_provider_register(struct device *dev, |
Thierry Reding | 1140f7c | 2016-04-05 17:17:34 +0200 | [diff] [blame] | 174 | struct device_node *children, struct module *owner, |
| 175 | struct phy * (*of_xlate)(struct device *dev, |
| 176 | struct of_phandle_args *args)); |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 177 | void of_phy_provider_unregister(struct phy_provider *phy_provider); |
| 178 | void devm_of_phy_provider_unregister(struct device *dev, |
| 179 | struct phy_provider *phy_provider); |
Heikki Krogerus | b7bc15b9 | 2014-11-19 17:28:18 +0200 | [diff] [blame] | 180 | int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id); |
| 181 | void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id); |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 182 | #else |
| 183 | static inline int phy_pm_runtime_get(struct phy *phy) |
| 184 | { |
Grygorii Strashko | 2b97789 | 2014-04-19 08:51:44 +0530 | [diff] [blame] | 185 | if (!phy) |
| 186 | return 0; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 187 | return -ENOSYS; |
| 188 | } |
| 189 | |
| 190 | static inline int phy_pm_runtime_get_sync(struct phy *phy) |
| 191 | { |
Grygorii Strashko | 2b97789 | 2014-04-19 08:51:44 +0530 | [diff] [blame] | 192 | if (!phy) |
| 193 | return 0; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 194 | return -ENOSYS; |
| 195 | } |
| 196 | |
| 197 | static inline int phy_pm_runtime_put(struct phy *phy) |
| 198 | { |
Grygorii Strashko | 2b97789 | 2014-04-19 08:51:44 +0530 | [diff] [blame] | 199 | if (!phy) |
| 200 | return 0; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 201 | return -ENOSYS; |
| 202 | } |
| 203 | |
| 204 | static inline int phy_pm_runtime_put_sync(struct phy *phy) |
| 205 | { |
Grygorii Strashko | 2b97789 | 2014-04-19 08:51:44 +0530 | [diff] [blame] | 206 | if (!phy) |
| 207 | return 0; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 208 | return -ENOSYS; |
| 209 | } |
| 210 | |
| 211 | static inline void phy_pm_runtime_allow(struct phy *phy) |
| 212 | { |
| 213 | return; |
| 214 | } |
| 215 | |
| 216 | static inline void phy_pm_runtime_forbid(struct phy *phy) |
| 217 | { |
| 218 | return; |
| 219 | } |
| 220 | |
| 221 | static inline int phy_init(struct phy *phy) |
| 222 | { |
Grygorii Strashko | 2b97789 | 2014-04-19 08:51:44 +0530 | [diff] [blame] | 223 | if (!phy) |
| 224 | return 0; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 225 | return -ENOSYS; |
| 226 | } |
| 227 | |
| 228 | static inline int phy_exit(struct phy *phy) |
| 229 | { |
Grygorii Strashko | 2b97789 | 2014-04-19 08:51:44 +0530 | [diff] [blame] | 230 | if (!phy) |
| 231 | return 0; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 232 | return -ENOSYS; |
| 233 | } |
| 234 | |
| 235 | static inline int phy_power_on(struct phy *phy) |
| 236 | { |
Grygorii Strashko | 2b97789 | 2014-04-19 08:51:44 +0530 | [diff] [blame] | 237 | if (!phy) |
| 238 | return 0; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 239 | return -ENOSYS; |
| 240 | } |
| 241 | |
| 242 | static inline int phy_power_off(struct phy *phy) |
| 243 | { |
Grygorii Strashko | 2b97789 | 2014-04-19 08:51:44 +0530 | [diff] [blame] | 244 | if (!phy) |
| 245 | return 0; |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 246 | return -ENOSYS; |
| 247 | } |
| 248 | |
David Lechner | 300eb01 | 2016-05-09 18:39:59 -0500 | [diff] [blame] | 249 | static inline int phy_set_mode(struct phy *phy, enum phy_mode mode) |
| 250 | { |
| 251 | if (!phy) |
| 252 | return 0; |
| 253 | return -ENOSYS; |
| 254 | } |
| 255 | |
Randy Li | 98430c7 | 2016-10-25 22:15:34 +0800 | [diff] [blame] | 256 | static inline int phy_reset(struct phy *phy) |
| 257 | { |
| 258 | if (!phy) |
| 259 | return 0; |
| 260 | return -ENOSYS; |
| 261 | } |
| 262 | |
Matt Porter | 8feed34 | 2013-12-19 09:23:02 -0500 | [diff] [blame] | 263 | static inline int phy_get_bus_width(struct phy *phy) |
| 264 | { |
| 265 | return -ENOSYS; |
| 266 | } |
| 267 | |
| 268 | static inline void phy_set_bus_width(struct phy *phy, int bus_width) |
| 269 | { |
| 270 | return; |
| 271 | } |
| 272 | |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 273 | static inline struct phy *phy_get(struct device *dev, const char *string) |
| 274 | { |
| 275 | return ERR_PTR(-ENOSYS); |
| 276 | } |
| 277 | |
Andrew Lunn | 788a4d5 | 2014-02-04 18:33:12 +0100 | [diff] [blame] | 278 | static inline struct phy *phy_optional_get(struct device *dev, |
| 279 | const char *string) |
| 280 | { |
| 281 | return ERR_PTR(-ENOSYS); |
| 282 | } |
| 283 | |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 284 | static inline struct phy *devm_phy_get(struct device *dev, const char *string) |
| 285 | { |
| 286 | return ERR_PTR(-ENOSYS); |
| 287 | } |
| 288 | |
Andrew Lunn | 788a4d5 | 2014-02-04 18:33:12 +0100 | [diff] [blame] | 289 | static inline struct phy *devm_phy_optional_get(struct device *dev, |
| 290 | const char *string) |
| 291 | { |
| 292 | return ERR_PTR(-ENOSYS); |
| 293 | } |
| 294 | |
Kamil Debski | b5d682f | 2014-03-06 12:16:47 +0100 | [diff] [blame] | 295 | static inline struct phy *devm_of_phy_get(struct device *dev, |
| 296 | struct device_node *np, |
| 297 | const char *con_id) |
| 298 | { |
| 299 | return ERR_PTR(-ENOSYS); |
| 300 | } |
| 301 | |
Arun Ramamurthy | 6be109b | 2015-04-22 16:04:11 -0700 | [diff] [blame] | 302 | static inline struct phy *devm_of_phy_get_by_index(struct device *dev, |
| 303 | struct device_node *np, |
| 304 | int index) |
| 305 | { |
| 306 | return ERR_PTR(-ENOSYS); |
| 307 | } |
| 308 | |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 309 | static inline void phy_put(struct phy *phy) |
| 310 | { |
| 311 | } |
| 312 | |
| 313 | static inline void devm_phy_put(struct device *dev, struct phy *phy) |
| 314 | { |
| 315 | } |
| 316 | |
Kamil Debski | 0b3f3b2 | 2014-03-06 12:16:46 +0100 | [diff] [blame] | 317 | static inline struct phy *of_phy_get(struct device_node *np, const char *con_id) |
| 318 | { |
| 319 | return ERR_PTR(-ENOSYS); |
| 320 | } |
| 321 | |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 322 | static inline struct phy *of_phy_simple_xlate(struct device *dev, |
| 323 | struct of_phandle_args *args) |
| 324 | { |
| 325 | return ERR_PTR(-ENOSYS); |
| 326 | } |
| 327 | |
| 328 | static inline struct phy *phy_create(struct device *dev, |
Kishon Vijay Abraham I | f0ed817 | 2014-07-14 15:55:02 +0530 | [diff] [blame] | 329 | struct device_node *node, |
Heikki Krogerus | dbc9863 | 2014-11-19 17:28:21 +0200 | [diff] [blame] | 330 | const struct phy_ops *ops) |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 331 | { |
| 332 | return ERR_PTR(-ENOSYS); |
| 333 | } |
| 334 | |
| 335 | static inline struct phy *devm_phy_create(struct device *dev, |
Kishon Vijay Abraham I | f0ed817 | 2014-07-14 15:55:02 +0530 | [diff] [blame] | 336 | struct device_node *node, |
Heikki Krogerus | dbc9863 | 2014-11-19 17:28:21 +0200 | [diff] [blame] | 337 | const struct phy_ops *ops) |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 338 | { |
| 339 | return ERR_PTR(-ENOSYS); |
| 340 | } |
| 341 | |
| 342 | static inline void phy_destroy(struct phy *phy) |
| 343 | { |
| 344 | } |
| 345 | |
| 346 | static inline void devm_phy_destroy(struct device *dev, struct phy *phy) |
| 347 | { |
| 348 | } |
| 349 | |
| 350 | static inline struct phy_provider *__of_phy_provider_register( |
Thierry Reding | 1140f7c | 2016-04-05 17:17:34 +0200 | [diff] [blame] | 351 | struct device *dev, struct device_node *children, struct module *owner, |
| 352 | struct phy * (*of_xlate)(struct device *dev, |
| 353 | struct of_phandle_args *args)) |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 354 | { |
| 355 | return ERR_PTR(-ENOSYS); |
| 356 | } |
| 357 | |
| 358 | static inline struct phy_provider *__devm_of_phy_provider_register(struct device |
Thierry Reding | 1140f7c | 2016-04-05 17:17:34 +0200 | [diff] [blame] | 359 | *dev, struct device_node *children, struct module *owner, |
| 360 | struct phy * (*of_xlate)(struct device *dev, |
| 361 | struct of_phandle_args *args)) |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 362 | { |
| 363 | return ERR_PTR(-ENOSYS); |
| 364 | } |
| 365 | |
| 366 | static inline void of_phy_provider_unregister(struct phy_provider *phy_provider) |
| 367 | { |
| 368 | } |
| 369 | |
| 370 | static inline void devm_of_phy_provider_unregister(struct device *dev, |
| 371 | struct phy_provider *phy_provider) |
| 372 | { |
| 373 | } |
Heikki Krogerus | b7bc15b9 | 2014-11-19 17:28:18 +0200 | [diff] [blame] | 374 | static inline int |
| 375 | phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id) |
| 376 | { |
| 377 | return 0; |
| 378 | } |
| 379 | static inline void phy_remove_lookup(struct phy *phy, const char *con_id, |
| 380 | const char *dev_id) { } |
Kishon Vijay Abraham I | ff76496 | 2013-09-27 11:53:25 +0530 | [diff] [blame] | 381 | #endif |
| 382 | |
| 383 | #endif /* __DRIVERS_PHY_H */ |