From patchwork Thu Nov 3 22:46:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 621166 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5459C433FE for ; Thu, 3 Nov 2022 22:47:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231343AbiKCWrk (ORCPT ); Thu, 3 Nov 2022 18:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231328AbiKCWrc (ORCPT ); Thu, 3 Nov 2022 18:47:32 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66E9522B18; Thu, 3 Nov 2022 15:47:22 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id 130so2960211pfu.8; Thu, 03 Nov 2022 15:47:22 -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=dR45AF1eDqvlbsOVWvhgDA8qPBA7xNN50vsRHZ8lb/Q=; b=kxrgEzv7Q/BhLS5Xx8wbJ/XahPkfeazdsz15CJteuQcn44jMx3whcHrw9OSiV5BGoM kUko2VZkK3XZhIXakJpfKUxmzZPCY923ctwOTsEXsdVmKLw32lsD6Lka+lH4JPXED4QF QNHCn2rSZYW55umB36jDcXOmtxkorkdLkg4SJirTTMtJwEd5eRQ5tZFfFkEtK3jMQEKC GmIkgxmIWrbBcMFSouWaA13gQRG9QI1jRWcD+Urkkwkx0xn7GjpOdW+F6TYWn7jaDGHw 1GzvvpqLZZko5DjoVsrn7tnCC3x2mRI4pmTQ7iPf3TL+bstgIai9cVHLbpQjM4Z+FU/0 kf2A== 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=dR45AF1eDqvlbsOVWvhgDA8qPBA7xNN50vsRHZ8lb/Q=; b=OocYWWVwgXIOWAGaG0dYCHK9PfFZj30k926A4RedaA7lqegAwQtMfLU4RDp0cpxWIf XEIsVhJtexdPH+YkakoeSSs48n28/SHD65Aj/aLDg65pQzCUUr431AsDJ9x4pvXA3Pu3 /zZHL4V7/m+EGE8xsCFnnLY2IEJOMlgxiYQlb8a8kEGkqmp1cnNTrtjBUSUBRBsCB3vB DKngeiyfRcavp+iwi9Pom7FnEDKqFturzgNIJhGS/MC5xm62imBOfezG4FRRqBuD5hP+ ga1K6TbT5WhxEQD31fgf7sCTj2yPriBRz9SwQAZilyC0VrT0G8hbTJY4hm13sLP+OE7b J1ig== X-Gm-Message-State: ACrzQf37Wl4NI+L3dIbwcdndfW1lqZ8aFikPI2Cfw2U5u1NVdV4qfUWb QyzhN0J4LQWB7/qL9XTO6AM= X-Google-Smtp-Source: AMsMyM6ejyLYpipDgFAFY3sojBOGLmpBeUWR8BOV6MgdZwjE3apF6DDESgQa1eErqT/8aXUCiP+SPg== X-Received: by 2002:a63:854a:0:b0:46f:45ab:31a with SMTP id u71-20020a63854a000000b0046f45ab031amr28168420pgd.190.1667515641746; Thu, 03 Nov 2022 15:47:21 -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 g13-20020aa796ad000000b0056be1d7d4a3sm1280421pfk.73.2022.11.03.15.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 15:47:20 -0700 (PDT) From: Dmitry Torokhov To: Tomi Valkeinen , Helge Deller , Tony Lindgren , Sebastian Reichel Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 05/13] omapfb: panel-dsi-cm: switch to using gpiod API Date: Thu, 3 Nov 2022 15:46:45 -0700 Message-Id: <20221103-omapfb-gpiod-v1-5-c3d53ca7988f@gmail.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog In-Reply-To: <20221103-omapfb-gpiod-v1-0-c3d53ca7988f@gmail.com> References: <20221103-omapfb-gpiod-v1-0-c3d53ca7988f@gmail.com> MIME-Version: 1.0 X-Mailer: b4 0.11.0-dev-5166b Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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