From patchwork Fri Nov 4 03:16:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 13031258 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1E4FC433FE for ; Fri, 4 Nov 2022 03:17:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 684A510E6D5; Fri, 4 Nov 2022 03:17:03 +0000 (UTC) Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D30E10E058 for ; Fri, 4 Nov 2022 03:16:56 +0000 (UTC) Received: by mail-pg1-x52f.google.com with SMTP id q1so3310719pgl.11 for ; Thu, 03 Nov 2022 20:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UItxGURK2IWBPodZslO/5iOxzR4E/6ECTXeRpXj97vc=; b=iDakzKYz+aWZYq0N74jKELocugR9OvbSUEKD0dbYXCmoGzGAjgcd/X9sADn9VX/Dgu atSBHdnI1zjuM8ccj0Lwf6bXqsPmzD24XUzNIonUjLZC9vXKBzFZs4JjcmmFYNWVWkoh BkYz0On3kCRw8I7Q8ggFbyxdO5AY/9zeF0OMKZEkM+JAF39J3pxxZdBImvTMPl9IDb/M tej/8AjSa9gk91J4i+rGwcUtged+I2aOKdqiBkoy7w1drg1iBE9ixeAG3nrEoAOelAS4 CgY+7zc5aifHWxNh+JRuAkiKE52wm3BpceM7HZhZ/E8nt1hrziloo03bk2Y2ZIfKnKU9 zcYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UItxGURK2IWBPodZslO/5iOxzR4E/6ECTXeRpXj97vc=; b=5bkut155Zf+kr+xWdhGaPl4UDaldm6bxfWAwOmnAG9zps2RTLtUk0+IWGRSsh1Q+0P jHAFBxt0YxhiGAbpQ1Cp9SZFsilfg2Y0wn7kOLWNZd6yIT5VborUtmpydRVOpaIaqCyA 3vROvl85RD6VqvuED2DaluMRY6l+1bVnNcKQ2vcz6v2fqaPQ/4wpjE0X4UNtN4xgRdn1 2SKS4WcxIoyr70pScnbGjtiwPCvo1ocWeMUsDog77Rf5uRoRkq9tP0ScNu6Z9ZC9ZLwM KeParML35yodcKD4+DSHeGFi2yG1pRSxg6sBDGemBP9ivXYJffAVSmd9k2Vxls87eTAU okQA== X-Gm-Message-State: ACrzQf02KkqSBXVS89eQ8RoMavKANfn+p09LF4PsQ2p6QddOrBccZ0BA 7ioY5YChqfaclj+ZeeXmL8w= X-Google-Smtp-Source: AMsMyM6bE29ZIw4j5NSem5ZSWRJazSteEBF8mWl97xkNqMaBnn9xFJXKKPCjm4AP9Jw0kGIhkl6FHw== X-Received: by 2002:a65:6951:0:b0:42b:b13:b253 with SMTP id w17-20020a656951000000b0042b0b13b253mr29642379pgq.555.1667531816013; Thu, 03 Nov 2022 20:16:56 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id s3-20020a63ff43000000b004702eca61fcsm1078655pgk.36.2022.11.03.20.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 20:16:55 -0700 (PDT) From: Dmitry Torokhov To: Helge Deller , Tony Lindgren , Tomi Valkeinen , Sebastian Reichel Subject: [PATCH RESEND 05/13] omapfb: panel-dsi-cm: switch to using gpiod API Date: Thu, 3 Nov 2022 20:16:34 -0700 Message-Id: <20221103-omapfb-gpiod-v1-5-cba1fae5a77c@gmail.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog In-Reply-To: <20221103-omapfb-gpiod-v1-0-cba1fae5a77c@gmail.com> References: <20221103-omapfb-gpiod-v1-0-cba1fae5a77c@gmail.com> MIME-Version: 1.0 X-Mailer: b4 0.11.0-dev-28747 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Switch the driver from legacy gpio API that is deprecated to the newer gpiod API that respects line polarities described in ACPI/DT. Note that because existing DTSes specify incorrect polarity of reset lines (active high) and GPU drivers have adopted to this, we follow the suit and use inverted values when controlling reset lines. Signed-off-by: Dmitry Torokhov --- .../fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 116 ++++++++------------- 1 file changed, 45 insertions(+), 71 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c index a2c7c5cb1523..4fc4b26a8d30 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c @@ -10,8 +10,9 @@ #include #include +#include #include -#include +#include #include #include #include @@ -20,7 +21,6 @@ #include #include #include -#include #include