Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp512287pxb; Wed, 27 Jan 2021 13:29:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwitQGGiSOi9bBoqMowoQelWR3KUxB8I/OnnOXAi/oZowCnVouOHAISKEcX7uNMVtYbtwzr X-Received: by 2002:aa7:d78e:: with SMTP id s14mr10846856edq.329.1611782956451; Wed, 27 Jan 2021 13:29:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611782956; cv=none; d=google.com; s=arc-20160816; b=bMBaY7ZmuqlqDZRMaLGotce3kuUoIytZt2VBC65z1VVz6xwZ7D9XTWhPF7iiHSNnwG kryzdoj4hRsRKjnOwDL3eRYFS+QYPNypIU8w8neQPXTDML2ujboJVa3iNTXQo2DJ9I/Y 5kVKfoYJARftDhgcN47CFcWdESwroxpN4iZBkNbR2tjLKgTwNF5/VVD5MwODTlrrsGVc /fAT83pxzWIV+2WzSGRWq5y3g97O7WVnvcbweCwmqO92JzfotCzFQvFKIR02qEi47+9D aNPvupEU/Jhoo1IRIrlbcreWRQOAsNgSLr4hclYe6AaLs+88FcmtN3eXFJRT0Ye+TXCv 7mMw== 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=ayNe9qI+3qxKgRIy1WmQRHg0RpxzGbdkqoACKC2fcOE=; b=S9quA2HnoG3wHtz27NcXzJFNxVTwJj10pi5ffPjMfEGtesLoEfw2rc4nyXVtUEsHHx j86X9at14OB6eT5cj6iOubGqOKiGblwUhCgv6cYyu3ejU1UNlgPrqSDOKkdi+4YQL9DZ WU9+h2DS8ZoDxYU/Aq+IgiXs6eX45MI9b2KIYO1tQlY0eaZ9dKR6WsQ70/tAb/xX6H1g QhBaOijEMVpy4TvPnmC48cxIZBzujv+hWDkI71t/8w1BAScSx2ZYlBeJf5+m/3/1cFUU QjJepiWh8O8gnWuyXAkV62wzCtdAoyVMPxzPVoPWq30JzYvG9G7d8WZg6IGEUmb7rHDO B7pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=VbDNMYDD; 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 y6si1661895edp.379.2021.01.27.13.28.50; Wed, 27 Jan 2021 13:29:16 -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=VbDNMYDD; 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 S229683AbhA0Glr (ORCPT + 99 others); Wed, 27 Jan 2021 01:41:47 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:33112 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232810AbhA0Gj4 (ORCPT ); Wed, 27 Jan 2021 01:39:56 -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 10R6YwoD116778; Wed, 27 Jan 2021 06:39:01 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=ayNe9qI+3qxKgRIy1WmQRHg0RpxzGbdkqoACKC2fcOE=; b=VbDNMYDDBKSc6ZYG+LDVcfaqJzKlWRixLMXSHhRbGYh5ys5K9b5nL6gKMjyT5o9aouan 13tk00dawit0YM4nf7s3K6YbLgsLJ6zkRLEE5CRblHq4d9VoWVxugGrrdElaggxCGCR6 Kd4SWLmKtGcHfMZLMKyIjwOKPKj8T14L2Vnnn9xpMNgi6nKKYARJguGQcl1f4F2g9Fg9 AAPc4CVbLSJ1ZAy0o4maNZeD8gSnLZRJ8SpUg8g6Ez2fQiPELJSYBby5i21XmC3pRADR enoBrr3ELmZn158PAnzpEvvXOKukmF13zGQNStcSG7aV/Sjskvlpxnyx0gWUpdfiRgpF Vw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 368b7qwfpd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Jan 2021 06:39:01 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10R6a87g011540; Wed, 27 Jan 2021 06:36:59 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 368wqxe7rs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Jan 2021 06:36:59 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 10R6ate2026356; Wed, 27 Jan 2021 06:36:55 GMT Received: from kadam (/102.36.221.92) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 26 Jan 2021 22:36:54 -0800 Date: Wed, 27 Jan 2021 09:36:45 +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 v5] fbtft: add tearing signal detect Message-ID: <20210127063645.GC2696@kadam> References: <1611711140-68260-1-git-send-email-zhangxuezhi3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1611711140-68260-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 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101270037 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-2101270037 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 27, 2021 at 09:32:20AM +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) { > + 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"); This printk adds no value. Don't print anything on the success path. You should add that to your code while your debugging the feature, but don't push it to the upstream kernel. > + } > + } else { > + pr_info("%s:%d, TE gpio not specified\n", > + __func__, __LINE__); > + } regards, dan carpenter