From patchwork Tue May 25 00:01:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 446506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CAF2C47084 for ; Tue, 25 May 2021 00:03:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 678CC61057 for ; Tue, 25 May 2021 00:03:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbhEYAEx (ORCPT ); Mon, 24 May 2021 20:04:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbhEYAEX (ORCPT ); Mon, 24 May 2021 20:04:23 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9D0AC06134F for ; Mon, 24 May 2021 17:02:52 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id n6-20020a17090ac686b029015d2f7aeea8so12203930pjt.1 for ; Mon, 24 May 2021 17:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/T35r9H/xYdI5Daj3afSSqWpMxR8pN+3BRmstBRd2eo=; b=XtJTTLAFoWjzdg0MeNYuiQac377tNakIga9O2eo1eKTa8+hf0jzBkj7TfYpMGXT/9c yWVh9Bqh6rd4c6lQvUcja9C8SSi70125WPI0n8Z+OZqxjVDyPZZZarT+YdaE/J5/4EI0 QChngXtryr++KD3aFI4F4hISiVpW27jfctnlg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/T35r9H/xYdI5Daj3afSSqWpMxR8pN+3BRmstBRd2eo=; b=jLfEm20epq4JNjP1W++kiDLePCss/Moc7zqkK5CQ3qxgyMKRPEcQnSycxCuwzdJn+m zjmFDOYrFgmHKCVNPpjJnisUeCwJwGSsnIzkQO0Bd5F5aRWyeKgeBiKpytn9a2JRx2Iw 1/iBwFM6NTbfE3wWu2liMWbDkSJxUjxXg3B78DhfaylC0317lxVHJe3yI4kxzl3GF22u DIMVrNYDv1TKSTfRZZIGTxcLoB+t+cvESiM62Up3wKzFmYosp7Lz6hjk25phd0WurVfm qK4IFOxdBKqLSjIUjK5/DqkWWrK4MSi02+q7mRP7NPqv4ehduQhNitJGWya04R18s5d4 2u1A== X-Gm-Message-State: AOAM533O1spg6BifS8P9MEJYJWH4MDkmOYyfeK5xTqdlwSvu1rKK49FU 043ivWkkmUbPKUw3PKyCVeU+gQ== X-Google-Smtp-Source: ABdhPJygsw79I/6gDgsXc111IivaKqoEq603iWbw3jkbei76BrFXoUYpIE1evcNNxFoe9oHbDOi/Mw== X-Received: by 2002:a17:903:2312:b029:f0:cd8e:c843 with SMTP id d18-20020a1709032312b02900f0cd8ec843mr27708566plh.6.1621900972211; Mon, 24 May 2021 17:02:52 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:26d1:4df0:7cdf:ce13]) by smtp.gmail.com with ESMTPSA id f18sm10696741pjh.55.2021.05.24.17.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 17:02:51 -0700 (PDT) From: Douglas Anderson To: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Sam Ravnborg Cc: linux-arm-msm@vger.kernel.org, Linus W , Lyude Paul , Bjorn Andersson , Steev Klimaszewski , robdclark@chromium.org, Maarten Lankhorst , Thierry Reding , dri-devel@lists.freedesktop.org, Stanislav Lisovskiy , Stephen Boyd , Douglas Anderson , Daniel Vetter , David Airlie , Jernej Skrabec , Robert Foss , linux-kernel@vger.kernel.org Subject: [PATCH v8 09/11] drm/bridge: ti-sn65dsi86: Add support for the DP AUX bus Date: Mon, 24 May 2021 17:01:57 -0700 Message-Id: <20210524165920.v8.9.Ib5fe0638da85800141ce141bb8e441c5f25438d4@changeid> X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog In-Reply-To: <20210525000159.3384921-1-dianders@chromium.org> References: <20210525000159.3384921-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org We want to provide our panel with access to the DP AUX channel. The way to do this is to let our panel be a child of ours using the fancy new DP AUX bus support. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Reviewed-by: Lyude Paul --- (no changes since v7) Changes in v7: - Patch to support for DP AUX bus on ti-sn65dsi86 new for v7. drivers/gpu/drm/bridge/Kconfig | 1 + drivers/gpu/drm/bridge/ti-sn65dsi86.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 7e7f28eb9546..a82952a85db4 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -292,6 +292,7 @@ config DRM_TI_SN65DSI86 select DRM_PANEL select DRM_MIPI_DSI select AUXILIARY_BUS + select DRM_DP_AUX_BUS help Texas Instruments SN65DSI86 DSI to eDP Bridge driver diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 1ea07d704705..5263206792f6 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -1448,19 +1449,27 @@ static int ti_sn_aux_probe(struct auxiliary_device *adev, pdata->aux.transfer = ti_sn_aux_transfer; drm_dp_aux_init(&pdata->aux); + ret = devm_of_dp_aux_populate_ep_devices(&pdata->aux); + if (ret) + goto err; + /* * The eDP to MIPI bridge parts don't work until the AUX channel is * setup so we don't add it in the main driver probe, we add it now. */ ret = ti_sn65dsi86_add_aux_device(pdata, &pdata->bridge_aux, "bridge"); + if (ret) + goto err; + + return 0; +err: /* * Clear of_node on any errors. Really this only matters if the error * is -EPROBE_DEFER to avoid (again) keep pinctrl from claiming when * it tries the probe again, but it shouldn't hurt on any error. */ - if (ret) - adev->dev.of_node = NULL; + adev->dev.of_node = NULL; return ret; }