dsi.c (ef2cd4273f5392c47ed5cc87f83ec55c15354ee6) dsi.c (6977cc89c87506ff17e6c05f0e37f46752256e82)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
4 */
5
6#include "dsi.h"
7
8struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi)

--- 19 unchanged lines hidden (view full) ---

28
29 phy_node = of_parse_phandle(pdev->dev.of_node, "phys", 0);
30 if (!phy_node) {
31 DRM_DEV_ERROR(&pdev->dev, "cannot find phy device\n");
32 return -ENXIO;
33 }
34
35 phy_pdev = of_find_device_by_node(phy_node);
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
4 */
5
6#include "dsi.h"
7
8struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi)

--- 19 unchanged lines hidden (view full) ---

28
29 phy_node = of_parse_phandle(pdev->dev.of_node, "phys", 0);
30 if (!phy_node) {
31 DRM_DEV_ERROR(&pdev->dev, "cannot find phy device\n");
32 return -ENXIO;
33 }
34
35 phy_pdev = of_find_device_by_node(phy_node);
36 if (phy_pdev)
36 if (phy_pdev) {
37 msm_dsi->phy = platform_get_drvdata(phy_pdev);
37 msm_dsi->phy = platform_get_drvdata(phy_pdev);
38 msm_dsi->phy_dev = &phy_pdev->dev;
39 }
38
39 of_node_put(phy_node);
40
41 if (!phy_pdev || !msm_dsi->phy) {
42 DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__);
43 return -EPROBE_DEFER;
44 }
45
40
41 of_node_put(phy_node);
42
43 if (!phy_pdev || !msm_dsi->phy) {
44 DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__);
45 return -EPROBE_DEFER;
46 }
47
46 msm_dsi->phy_dev = get_device(&phy_pdev->dev);
47
48 return 0;
49}
50
51static void dsi_destroy(struct msm_dsi *msm_dsi)
52{
53 if (!msm_dsi)
54 return;
55

--- 224 unchanged lines hidden ---
48 return 0;
49}
50
51static void dsi_destroy(struct msm_dsi *msm_dsi)
52{
53 if (!msm_dsi)
54 return;
55

--- 224 unchanged lines hidden ---