All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Carlis <zhangxuezhi3@gmail.com>
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
Date: Wed, 27 Jan 2021 09:36:45 +0300	[thread overview]
Message-ID: <20210127063645.GC2696@kadam> (raw)
In-Reply-To: <1611711140-68260-1-git-send-email-zhangxuezhi3@gmail.com>

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


WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Carlis <zhangxuezhi3@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-fbdev@vger.kernel.org,
	mh12gx2825@gmail.com, gregkh@linuxfoundation.org,
	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
Date: Wed, 27 Jan 2021 09:36:45 +0300	[thread overview]
Message-ID: <20210127063645.GC2696@kadam> (raw)
In-Reply-To: <1611711140-68260-1-git-send-email-zhangxuezhi3@gmail.com>

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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Carlis <zhangxuezhi3@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-fbdev@vger.kernel.org,
	mh12gx2825@gmail.com, gregkh@linuxfoundation.org,
	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
Date: Wed, 27 Jan 2021 09:36:45 +0300	[thread overview]
Message-ID: <20210127063645.GC2696@kadam> (raw)
In-Reply-To: <1611711140-68260-1-git-send-email-zhangxuezhi3@gmail.com>

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2021-01-27  6:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  1:32 [PATCH v5] fbtft: add tearing signal detect Carlis
2021-01-27  1:32 ` Carlis
2021-01-27  1:32 ` Carlis
2021-01-27  5:45 ` Dan Carpenter
2021-01-27  5:45   ` Dan Carpenter
2021-01-27  5:45   ` Dan Carpenter
2021-01-27  6:19   ` carlis
2021-01-27  6:19     ` carlis
2021-01-27  6:19     ` carlis
2021-01-27  6:49     ` Dan Carpenter
2021-01-27  6:49       ` Dan Carpenter
2021-01-27  6:49       ` Dan Carpenter
2021-01-27  8:48       ` Geert Uytterhoeven
2021-01-27  8:48         ` Geert Uytterhoeven
2021-01-27  8:48         ` Geert Uytterhoeven
2021-01-27  6:36 ` Dan Carpenter [this message]
2021-01-27  6:36   ` Dan Carpenter
2021-01-27  6:36   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210127063645.GC2696@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mh12gx2825@gmail.com \
    --cc=oliver.graute@kococonnector.com \
    --cc=sbrivio@redhat.com \
    --cc=zhangxuezhi1@yulong.com \
    --cc=zhangxuezhi3@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.