diff options
| author | Randy Li <ayaka@soulik.info> | 2016-09-09 14:59:37 -0400 |
|---|---|---|
| committer | Kishon Vijay Abraham I <kishon@ti.com> | 2016-09-10 08:01:39 -0400 |
| commit | cac18ecb6f44b11bc303d7afbae3887b27938fa4 (patch) | |
| tree | f630b7ff27947281512d4112834fca0a7bf6b8d3 /include/linux/phy | |
| parent | 91d6e3b6bcf2625a07fec22a9af37ddbfd91a0df (diff) | |
phy: Add reset callback
The only use for this is for solving a hardware design problem in
usb of Rockchip RK3288.
Signed-off-by: Randy Li <ayaka@soulik.info>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'include/linux/phy')
| -rw-r--r-- | include/linux/phy/phy.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index f08b67238b58..ee1bed7dbfc6 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h | |||
| @@ -36,6 +36,7 @@ enum phy_mode { | |||
| 36 | * @power_on: powering on the phy | 36 | * @power_on: powering on the phy |
| 37 | * @power_off: powering off the phy | 37 | * @power_off: powering off the phy |
| 38 | * @set_mode: set the mode of the phy | 38 | * @set_mode: set the mode of the phy |
| 39 | * @reset: resetting the phy | ||
| 39 | * @owner: the module owner containing the ops | 40 | * @owner: the module owner containing the ops |
| 40 | */ | 41 | */ |
| 41 | struct phy_ops { | 42 | struct phy_ops { |
| @@ -44,6 +45,7 @@ struct phy_ops { | |||
| 44 | int (*power_on)(struct phy *phy); | 45 | int (*power_on)(struct phy *phy); |
| 45 | int (*power_off)(struct phy *phy); | 46 | int (*power_off)(struct phy *phy); |
| 46 | int (*set_mode)(struct phy *phy, enum phy_mode mode); | 47 | int (*set_mode)(struct phy *phy, enum phy_mode mode); |
| 48 | int (*reset)(struct phy *phy); | ||
| 47 | struct module *owner; | 49 | struct module *owner; |
| 48 | }; | 50 | }; |
| 49 | 51 | ||
| @@ -136,6 +138,7 @@ int phy_exit(struct phy *phy); | |||
| 136 | int phy_power_on(struct phy *phy); | 138 | int phy_power_on(struct phy *phy); |
| 137 | int phy_power_off(struct phy *phy); | 139 | int phy_power_off(struct phy *phy); |
| 138 | int phy_set_mode(struct phy *phy, enum phy_mode mode); | 140 | int phy_set_mode(struct phy *phy, enum phy_mode mode); |
| 141 | int phy_reset(struct phy *phy); | ||
| 139 | static inline int phy_get_bus_width(struct phy *phy) | 142 | static inline int phy_get_bus_width(struct phy *phy) |
| 140 | { | 143 | { |
| 141 | return phy->attrs.bus_width; | 144 | return phy->attrs.bus_width; |
