Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp464733pxb; Wed, 27 Jan 2021 12:06:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZ3pPVveRAE6uqJMU4z5/1C4E6bMpQ0LaTC1ieJNR+pFazyfde+pye6qoEI4C5kpl+JFvJ X-Received: by 2002:a17:907:20aa:: with SMTP id pw10mr7923933ejb.314.1611777990621; Wed, 27 Jan 2021 12:06:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611777990; cv=none; d=google.com; s=arc-20160816; b=KkJIZZicTP1nySbFGb/3CZbyGgg2uFNvRFJb8kNZhshR4Grt/9JlFa/5DBAWVceJRz uen0fRAgBcl4+N+uAp6344ISFlx/vjqVtb1btJ8CrByxYgvwx+reX5NEfW/co+dbHOQD 8g9ar4kyVXdUuJ+rtnDTGk7HHryvwlC1SLXl6YR6k6KyGnS2BjB2sZbVNCvSg0B6xAP7 ux9Ib7CnJB90SQycHgBTilc98Ps2z9N0h24vj9bX/BkXnNlK2zSKvDMZlNW4DEk00nNH QOSTWfsiOdsgrmwE5VAN/JqSxmWeU4LmGFQQWnKtaloPNYTgFxF+G+fO2RN57pmvOB0G KjYA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=KJ+yQ5bWaZ2enwzjx+4GHtaZjxc83d9TFtN5y4k2HgI=; b=Dnuo5U+iEjhWEGOtoa8dRDmX4tnnH6+gvJAC1ADCNANhbRUXxDCzlX0Rb+AsAiytIN 2mMcmCJT2mTw/ctjixYNFzCq8+bwJOtAG3IbYM23SEToaSKjKZV6AKwT6rAk38gve96v CzGdixWkh0/9IU7sCzReQPX1lFE0kLvu+5OHPphirD9ux6CRaGeH/trbakKMzSoz2QCz 1sUv2L0CjhK83PJBTmvkk20r/TQ/fFp7uWeITIAOfYmkHbFqkxPHPfsbyGfYG3TFPHoB 5iI+txWjxgmH6mscyjQOzHicXMduEl1BC31ouhI1J81rSxSEqJIBb9HDvwFYMl+WiZBG kFQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="i/yuys92"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si1302523ejb.46.2021.01.27.12.06.05; Wed, 27 Jan 2021 12:06:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="i/yuys92"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237378AbhA0Dw2 (ORCPT + 99 others); Tue, 26 Jan 2021 22:52:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S317762AbhA0BQi (ORCPT ); Tue, 26 Jan 2021 20:16:38 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5E50C061574; Tue, 26 Jan 2021 17:15:56 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id l18so304649pji.3; Tue, 26 Jan 2021 17:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=KJ+yQ5bWaZ2enwzjx+4GHtaZjxc83d9TFtN5y4k2HgI=; b=i/yuys92Y5AzJRo1OemPBFbioTJmSuQ33639+tZ6prHwvFx51LOyZrVSO1E33i+8wh dEJHgrQ8sxZTiELoPu/HB5idN1Xr1ngd23fU7Q5qWKVITJs29r5uNEgiLJ+UF3eew7oh Te/siDN/xEQeEQxDBwRHsCc0asJLTkm6YLdAmJzmN6G5BtxF5PPok0bVMoyLAZ3KdEOI Iq/KGqEfFxJ8EHCQGitG/cuxLRRvin9iwNT0mDvewcCr0Gf/gUQc+rg3v6bY/LX+Q7bw v09GqAMKSqwIVfOdSE9AZRLH5lptxD2UA4smZNauFMOwPs6tZbLVbnqHk4lzlHnzj5FL mYJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=KJ+yQ5bWaZ2enwzjx+4GHtaZjxc83d9TFtN5y4k2HgI=; b=iPrIpZmJtnm4A/lBgvof7Ex0WrhPavph9v0axcfVChpD+iNYrEJsS3JbN7EQ1CN2DF N0/GkUURjM+MjEqrQw7WI3FI6YqOCFYhSN/4WnKv+l03vRM/tQnEkJyLQO6kRsmub0wl XJ80gJ6ky5s6xlcoqAyw/m/YsDKcovkwxAaVptP5NI9vHMAQQrnRBgGodIrsxbgGWwvk 22RdouzIkNwCJLCkKXmCtZP59C4mgQ5m/+Z1qxnNEU3UpbYrWkJknBy/lzSivX4YZPvN SiuQqR3b096OFr1XqiYKXpBMLoEVHDRja70KdeNqJA468zNy3uUGvKYPzWiU2OoI/+FO k5qw== X-Gm-Message-State: AOAM532dgHhLySFwjGe5FgXM0zIVWjftv/Fn27IdQDAiXNQnUvxkZckM xOHbB7AJhkfeMsqjPmI+OHI= X-Received: by 2002:a17:902:d64e:b029:df:e5b1:b7f7 with SMTP id y14-20020a170902d64eb02900dfe5b1b7f7mr8586928plh.10.1611710156278; Tue, 26 Jan 2021 17:15:56 -0800 (PST) Received: from localhost ([103.220.76.197]) by smtp.gmail.com with ESMTPSA id d128sm218943pga.87.2021.01.26.17.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 17:15:55 -0800 (PST) Date: Wed, 27 Jan 2021 09:15:49 +0800 From: carlis To: Dan Carpenter Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-fbdev@vger.kernel.org, mh12gx2825@gmail.com, oliver.graute@kococonnector.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, sbrivio@redhat.com, colin.king@canonical.com, zhangxuezhi1@yulong.com Subject: Re: [PATCH v4] fbtft: add tearing signal detect Message-ID: <20210127091549.00005933@gmail.com> In-Reply-To: <20210126175141.GZ2696@kadam> References: <1611664835-150687-1-git-send-email-zhangxuezhi3@gmail.com> <20210126175141.GZ2696@kadam> Organization: Tyzmig-ryrjum-8kedto X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Jan 2021 20:51:41 +0300 Dan Carpenter wrote: > On Tue, Jan 26, 2021 at 08:40:35PM +0800, Carlis wrote: > > @@ -82,6 +111,29 @@ enum st7789v_command { > > */ > > static int init_display(struct fbtft_par *par) > > { > > + int rc; > > + struct device *dev = par->info->device; > > + > > + par->gpio.te = devm_gpiod_get_index_optional(dev, "te", 0, > > GPIOD_IN); > > + if (par->gpio.te) { > > I explained in my earlier review that devm_gpiod_get_index_optional() > can return error pointers... There was quite a bit of detail about > how to handle this correctly in my earlier review, but I think you > might not have noticed it. Please read it again. > > > + init_completion(&spi_panel_te); > > + mutex_init(&te_mutex); > > + rc = devm_request_irq(dev, > > + gpiod_to_irq(par->gpio.te), > > + spi_panel_te_handler, > > IRQF_TRIGGER_RISING, > > + "TE_GPIO", par); > > + if (rc) { > > + pr_err("TE request_irq failed.\n"); > > + devm_gpiod_put(dev, par->gpio.te); > > + par->gpio.te = NULL; > > + } else { > > + > > disable_irq_nosync(gpiod_to_irq(par->gpio.te)); > > + pr_info("TE request_irq completion.\n"); > > + } > > + } else { > > + pr_err("%s:%d, TE gpio not specified\n", > > + __func__, __LINE__); > > + } > > regards, > dan carpenter > Thank you for your correction,i will change pr_err to pr_info in next patch v5 regards, dan carpenter