]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/tegra: dpaux: Populate AUX bus
authorThierry Reding <treding@nvidia.com>
Mon, 20 Dec 2021 10:28:22 +0000 (11:28 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:21:24 +0000 (18:21 -0400)
[ Upstream commit 8913e1aea4b32a866343b14e565c62cec54f3f78 ]

The DPAUX hardware block exposes an DP AUX interface that provides
access to an AUX bus and the devices on that bus. Use the DP AUX bus
infrastructure that was recently introduced to probe devices on this
bus from DT.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Stable-dep-of: 0800880f4eb7 ("drm/tegra: dpaux: Fix PM disable depth imbalance in tegra_dpaux_probe")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/tegra/Kconfig
drivers/gpu/drm/tegra/dpaux.c

index 1650a448eabd6843a46072c636bc42fd7a02f265..b09a500934f7361ae5d770ed0aae48821543b063 100644 (file)
@@ -5,6 +5,7 @@ config DRM_TEGRA
        depends on COMMON_CLK
        depends on DRM
        depends on OF
+       select DRM_DP_AUX_BUS
        select DRM_KMS_HELPER
        select DRM_MIPI_DSI
        select DRM_PANEL
index c96c07c6458c3966811736b9a09b9050580cc168..12a92d09ac90967b6c1f7fe0822dd293aa8d63c6 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/workqueue.h>
 
 #include <drm/drm_dp_helper.h>
+#include <drm/drm_dp_aux_bus.h>
 #include <drm/drm_panel.h>
 
 #include "dp.h"
@@ -570,6 +571,12 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
        list_add_tail(&dpaux->list, &dpaux_list);
        mutex_unlock(&dpaux_lock);
 
+       err = devm_of_dp_aux_populate_ep_devices(&dpaux->aux);
+       if (err < 0) {
+               dev_err(dpaux->dev, "failed to populate AUX bus: %d\n", err);
+               return err;
+       }
+
        return 0;
 }