From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 439A3C83008 for ; Tue, 28 Apr 2020 12:21:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23B8320737 for ; Tue, 28 Apr 2020 12:21:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gESl0rih" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbgD1MVf (ORCPT ); Tue, 28 Apr 2020 08:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726645AbgD1MVf (ORCPT ); Tue, 28 Apr 2020 08:21:35 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C94ADC03C1A9 for ; Tue, 28 Apr 2020 05:21:34 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id u6so21209181ljl.6 for ; Tue, 28 Apr 2020 05:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=66PEvgq166rYm5NNqO/K4FUqV5SVNdU/W11wcLnh4KU=; b=gESl0rihIt+DG1G40TUmI/KlPAmkk1+4Aiwp1MDMPvqaBcQyaLgL0tP2AHgbZg5nk0 Zpdq1rk6wT2WQ+bLxj3SVmtk9lXfualx8/Cw8wEteyO31K3kSq/vUb86877Of6KdH0io f2COEG+8BhNtvaxctV6KpKzRKGo/JVpELc5SyrcjWxVrbK+uiUKLtkQXzxgTWv2WgMiG Qiz0ZwMhbhudDACBVjvsTLMiMV8Sf0tjqm4cdShDq0oNkVfXuXFN6tDh9kF34y0SLf6s MzV7Ht5jWfSj0hMkPlHRIvJQX83Mdi5vEpjcfQ1aZMcZ/HOCfb2pg8UsWyQjOj1fdaUH 4Uyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=66PEvgq166rYm5NNqO/K4FUqV5SVNdU/W11wcLnh4KU=; b=Lkn9QMXoT96XF6b96H5IkkPhOHmXYC2ggRhU9kC9WOL67GqeWa1xHreNye/QX6byq4 E8rwUTHgVddzYNM1q9vfmA/Y31onmrHK/Lhiefk5oq/UnoT3ThtRnaTqVnlQirPOznBh aZx0gTKV/8sY1AdyLpXmjKXSMxRL78mFlFZmmYrZtZptz0h8MVue0/mae8msazYBA7EX owZ43OP5ldyjxwTkyW6DCEuJocdFbleB36i6Mn2MhDAg7K5d6Efl96h5fwIPGII+lvq3 TdzLiV2DazpAxhyKrpU+/HjDpTIp9lSt2eZfKc5nx81dAh7cxReIFa9pUF+Wi5m0hjcR sFIQ== X-Gm-Message-State: AGi0PubgQyZHGlJEPqLVxfBRBLuDpFQKu0keERYgMqSfIyk4KySVkw7C 6RmlSOyFIZc7KOTSWAOmfDBTlV//ot23JeeFEiP/pg== X-Google-Smtp-Source: APiQypLFGrgmnKJg9/f+LHPrCacUiDgVAehn8XuE+AFvss3TzqvRIrzE2HTQI0KghqzPidyFO40ACxVTMr2WJwrJBP0= X-Received: by 2002:a05:651c:32e:: with SMTP id b14mr17558469ljp.277.1588076493277; Tue, 28 Apr 2020 05:21:33 -0700 (PDT) MIME-Version: 1.0 References: <20200423162548.129661-1-dianders@chromium.org> <20200423092431.v3.3.I53fed5b501a31e7a7fa13268ebcdd6b77bd0cadd@changeid> In-Reply-To: <20200423092431.v3.3.I53fed5b501a31e7a7fa13268ebcdd6b77bd0cadd@changeid> From: Linus Walleij Date: Tue, 28 Apr 2020 14:21:22 +0200 Message-ID: Subject: Re: [PATCH v3 3/6] drm/panel-simple: Support hpd-gpios for delaying prepare() To: Douglas Anderson Cc: Bartosz Golaszewski , Dave Airlie , Daniel Vetter , Rob Herring , Neil Armstrong , Andrzej Hajda , Laurent Pinchart , Sandeep Panda , Stephen Boyd , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:GPIO SUBSYSTEM" , Jeffrey Hugo , "open list:DRM PANEL DRIVERS" , MSM , Rob Clark , Jernej Skrabec , Jonas Karlman , Bjorn Andersson , Sam Ravnborg , Thierry Reding , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu, Apr 23, 2020 at 6:26 PM Douglas Anderson wrote: > People use panel-simple when they have panels that are builtin to > their device. In these cases the HPD (Hot Plug Detect) signal isn't > really used for hotplugging devices but instead is used for power > sequencing. Panel timing diagrams (especially for eDP panels) usually > have the HPD signal in them and it acts as an indicator that the panel > is ready for us to talk to it. > > Sometimes the HPD signal is hooked up to a normal GPIO on a system. > In this case we need to poll it in the correct place to know that the > panel is ready for us. In some system designs the right place for > this is panel-simple. > > When adding this support, we'll account for the case that there might > be a circular dependency between panel-simple and the provider of the > GPIO. The case this was designed for was for the "ti-sn65dsi86" > bridge chip. If HPD is hooked up to one of the GPIOs provided by the > bridge chip then in our probe function we'll always get back > -EPROBE_DEFER. Let's handle this by allowing this GPIO to show up > late if we saw -EPROBE_DEFER during probe. NOTE: since the > gpio_get_optional() is used, if the "hpd-gpios" isn't there our > variable will just be NULL and we won't do anything in prepare(). > > Signed-off-by: Douglas Anderson > Reviewed-by: Stephen Boyd > --- > > Changes in v3: > - Remind how gpio_get_optional() works in the commit message. Reviewed-by: Linus Walleij I have a small inkling to protest against calling this driver "panel-simple" as we tend to stockpile things like this. I suppose panel-panacea.c is a better name at this point :/ Yours, Linus Walleij