From: Petr Hodina <[email protected]>

generic_phy_get_by_name() returns -ENOENT rather than -ENODATA for a
missing phy-names property when CONFIG_OF_LIVE is enabled. Treat both
as "no external D-PHY" as is already done for the flat tree.

Signed-off-by: Petr Hodina <[email protected]>
---
 drivers/video/rockchip/dw_mipi_dsi_rockchip.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c 
b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c
index c47992dfb13..49835587aaf 100644
--- a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c
+++ b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c
@@ -839,7 +839,10 @@ static int dw_mipi_dsi_rockchip_probe(struct udevice *dev)
         * NULL if it's not initialized.
         */
        ret = generic_phy_get_by_name(dev, "dphy", &priv->phy);
-       if (ret && ret != -ENODATA) {
+       /*
+        * "No dphy specified" is optional and should be tolerated
+        */
+       if (ret && ret != -ENODATA && ret != -ENOENT) {
                dev_err(dev, "failed to get mipi dphy: %d\n", ret);
                return ret;
        }

-- 
2.55.0


Reply via email to