Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp102107rwl; Thu, 3 Nov 2022 20:28:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5NhEQ9bXFbLGaW+uFkD2hbY14FWTedTtmB0CzPXhBgQTbWByvelwtMTfJIaKggzmIlY3E+ X-Received: by 2002:a17:902:e892:b0:187:35b:5a50 with SMTP id w18-20020a170902e89200b00187035b5a50mr33602229plg.160.1667532520561; Thu, 03 Nov 2022 20:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667532520; cv=none; d=google.com; s=arc-20160816; b=FvQiMqL2SJ/Q8DFNw9eFC6MesflpQUh8VHFlDiVGZc0N3xzR4XoYxtwzG2pDiQDEd9 h16UqJMQxzrK7nNhQ+DX0/yx9Dy4Gw6gJzHuQYXUQDyFcfkbTg9V0v7jJWW/UjGcjYGb fT/51d0Y+1HhOIoRDe6dQPtEwlH68oq0u31TDcT5mrqBJRpsfgfkYt0XfRPwhV1zmo2o KiicPbWN1HClsxvcYwvHeOFlStTVpmhmVy2DtIXQZPzc/9HqG3KVOd37W9vQLo/z4L1P hc9bTb1RQsZQ8Rku8XOLpEY6zQ9kyRRP+0VMHlJMNK9t7+KksEXKX5VTxEwb25+Dus6v NXuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UItxGURK2IWBPodZslO/5iOxzR4E/6ECTXeRpXj97vc=; b=HVWLsLve7870jFNy5AWMgrKs+M6awOePzc2Q4yjuJWY/CoJbuJohsIJYJ9k76uzctZ iCPdLM1+nY7/qY+BMaAU7xy0X8DhbmRovqd4yl1+dnA0igiJdl0zWg4lRfciTXvRnss9 j/w8ECTZyCL8sOhHEAbaGRX5uPCocI2PdU4Ccxb3q+xFa2ltpZmaIEStrYLpNY0jpeHx hcSr9IWhk1gAaBUQShr8y94KtCCEe54KL02vvQf9RkO14Zj8/LWkClrnGezNfqV48St1 DV0Cnau3zlu9lI9I26hQSowLPxGeEwSh1aW9hOIlRsOW+lSCgiLKp2O1MjI0GFlVghMA 4skw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iDakzKYz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a1709027c0400b001869347b0besi2706900pll.174.2022.11.03.20.28.27; Thu, 03 Nov 2022 20:28:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iDakzKYz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbiKDDRV (ORCPT + 95 others); Thu, 3 Nov 2022 23:17:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230454AbiKDDQ5 (ORCPT ); Thu, 3 Nov 2022 23:16:57 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0DD425E81; Thu, 3 Nov 2022 20:16:56 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id m6so3438504pfb.0; 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=EeqyZ7jJ8TgKhk3CGOlI5n+oAIisvH/1zxkMseJwNINsX9ruA69CxN9tVKirIyRNKw UrKu2A7HICGRlThlwIlfV9OxuYnIEDwzMpIU/jGKyVd1u3y3SbXRya+gjNvpB9FdcxgN 6Zw0JltldLWZWF0rUFKM0zEwPtd7B6ymYNrQgPlWrTFx7ys4YvdjKXSFzcpzI1j2gntT krnla+UMB/HealgeK17Y5HmG02VqKylG4t/0FzxR/rGc4X/mLPYAQlELShT2SmbrejbU I9YniqLs7VHogg+5Um85W055f9+INGvlGaq0r1fCgEHna1o/4ulgBHW0BqxvqbsShtQ7 zzug== X-Gm-Message-State: ACrzQf1UOAvfIIsQrbL6f3WfFrWKezILmGm1NBzK4zG3x2sWBYJ20T5f C79HRWRrryJkX+c3hzpf30s= 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 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org 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 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.11.0-dev-28747 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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