diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2020-12-29 14:58:59 +0100 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2021-02-10 10:00:51 +0100 |
commit | f8da8a82c5761890ec8578a19f51508f0ead4a1b (patch) | |
tree | 2b2787f1d5b801fe2fcf0b5e9231ab93fed82d8a /drivers/phy | |
parent | afef20585abe55c44d376f3cacf435ddde149d77 (diff) | |
download | u-boot-f8da8a82c5761890ec8578a19f51508f0ead4a1b.tar.gz |
generic-phy: add configure op
Add the PHY configure op callback to the generic PHY uclass to permit
configuring the PHY.
It's useful for MIPI DSI PHYs to setup the link timings.
Signed-off-by:Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/phy-uclass.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c index ef03e3a502..43ffbcee0f 100644 --- a/drivers/phy/phy-uclass.c +++ b/drivers/phy/phy-uclass.c @@ -204,6 +204,17 @@ int generic_phy_power_off(struct phy *phy) return ret; } +int generic_phy_configure(struct phy *phy, void *params) +{ + struct phy_ops const *ops; + + if (!generic_phy_valid(phy)) + return 0; + ops = phy_dev_ops(phy->dev); + + return ops->configure ? ops->configure(phy, params) : 0; +} + int generic_phy_get_bulk(struct udevice *dev, struct phy_bulk *bulk) { int i, ret, count; |