Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4248015pxb; Tue, 26 Jan 2021 17:01:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0zv3fwm1vrWyl+mz1Hk+aDAsR2Aj/8GJdLfFUCBNp86o16NB7UizT6GA1p7roxfL6pL5l X-Received: by 2002:aa7:d651:: with SMTP id v17mr6757642edr.91.1611709315417; Tue, 26 Jan 2021 17:01:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611709315; cv=none; d=google.com; s=arc-20160816; b=aE27TP5OK1q1Fx2yu4sU0LJkwfY5LI+M64N126QyCwbEqIU39gKGKik1MtqtgD00sb nehBe8rMQLAlSHkr13vFlPQ3v4zPSywKe9Vx0aTXztamV0sXmeK4UJkKS91UOyDtChvy kb/iO32MZCOtD2oPfcy0XLzHJLDCKUX1P22QwpAcrvKF41T+NikaYWFg3Zsnhmf3t+pe 2HTjo6MezavwToaXx/oPjbYEtG3T9Lbui0hvlsFxFygc2UwRZc+WdkGyg89wgpMsM9Nk TOlrsU3uxewq6VtVTMtTP7c/2sUP9vcBQO/PhsksQjEGYxwkxshNq/3eYplzrrrU7VRB BncA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gqTIlCrmkR4s8Y9TJxhSa5y/C1OAm/ZoUsX5inr5tbY=; b=PEevDhelXTvbWUeDDCgCTXXz46FUZsZ4lW80hCKXv0Cw68HFyg+xPQFIE9Yp/R0v3e bSyxC/K54kMbVKFuUBILuihFENdkOkdeHtRyC+w4t80V3PwUD6aVKnCW+n48gmPpwQhA rsSv0vafFEeSxklqYg1YbOtp3ur53FQ1lMNAFkiITY7nl7zH734fZYr5GPFRHzPn6MoN gAHEz4PYLHhSOE7Q4qa+FiwRKGkeDOHx+XjiviSoE+Dr95EPRYig35rbBJ+V5AHKQQ+w NviCPrx190H2/qtb4yvFjpegVsM4Ypl0UFeGky22khGP9b5P+9lpCmAy1csEMGIqHp28 G98g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=CWzvj3hw; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv28si148819ejb.93.2021.01.26.17.01.31; Tue, 26 Jan 2021 17:01:55 -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=@oracle.com header.s=corp-2020-01-29 header.b=CWzvj3hw; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391312AbhA0Agk (ORCPT + 99 others); Tue, 26 Jan 2021 19:36:40 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:60000 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392244AbhAZRy5 (ORCPT ); Tue, 26 Jan 2021 12:54:57 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10QHroMI193769; Tue, 26 Jan 2021 17:53:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=gqTIlCrmkR4s8Y9TJxhSa5y/C1OAm/ZoUsX5inr5tbY=; b=CWzvj3hwc893o1b+uL+P4wzRrDrsyh0Y8Kb8rU2zaad5fVfTdmLaOq3O3wo2riArXvhU cl0xMZ0o4Ms0OVyNP45Z3DW26w+iEy3bwF6DFOPTQr1Yd4yVS21TyRs4p6bDF7eRfIyB XEBm16sO8DHB6eMXvJGqRL4jkj1XoNEtsde1G3DYpEKUoIpkmBvGNNtTLrycfZx0eLJm x9CfOqcWZgwCCqOjF5sJSnS7EmHug0t8+vOWxou+lvaoKw4qSLJNNy0G71V5lYsUOtbD txbO4IkuwTnN1y20Opt8a1mAC03OUGwRqc0oDuL7Q8A+rew2s1137oH5CytIFO9fi2BL GA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 368b7quax0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Jan 2021 17:53:58 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10QHjekl154723; Tue, 26 Jan 2021 17:51:57 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 368wjrevms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Jan 2021 17:51:56 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 10QHpoWG017246; Tue, 26 Jan 2021 17:51:50 GMT Received: from kadam (/102.36.221.92) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 26 Jan 2021 09:51:49 -0800 Date: Tue, 26 Jan 2021 20:51:41 +0300 From: Dan Carpenter To: Carlis 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: <20210126175141.GZ2696@kadam> References: <1611664835-150687-1-git-send-email-zhangxuezhi3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1611664835-150687-1-git-send-email-zhangxuezhi3@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9876 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101260092 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9876 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101260093 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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