linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, jcbian@pixcir.com.cn, rogerq@ti.com,
	Fabio Estevam <festevam@gmail.com>
Subject: [PATCH 5/5] Input: pixcir_i2c_ts: Do not print error on defer probe
Date: Mon,  7 Oct 2019 09:16:07 -0300	[thread overview]
Message-ID: <20191007121607.12545-5-festevam@gmail.com> (raw)
In-Reply-To: <20191007121607.12545-1-festevam@gmail.com>

In the case of defer probe we should not print an error message.

This also aligns with how defer probe is handled in the other GPIOs
used by this driver.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/input/touchscreen/pixcir_i2c_ts.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c
index c8a35e97b595..b5d53aaef718 100644
--- a/drivers/input/touchscreen/pixcir_i2c_ts.c
+++ b/drivers/input/touchscreen/pixcir_i2c_ts.c
@@ -567,7 +567,9 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client,
 	tsdata->gpio_attb = devm_gpiod_get(dev, "attb", GPIOD_IN);
 	if (IS_ERR(tsdata->gpio_attb)) {
 		error = PTR_ERR(tsdata->gpio_attb);
-		dev_err(dev, "Failed to request ATTB gpio: %d\n", error);
+		if (error != -EPROBE_DEFER)
+			dev_err(dev, "Failed to request ATTB gpio: %d\n",
+				error);
 		return error;
 	}
 
@@ -575,7 +577,9 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client,
 						     GPIOD_OUT_LOW);
 	if (IS_ERR(tsdata->gpio_reset)) {
 		error = PTR_ERR(tsdata->gpio_reset);
-		dev_err(dev, "Failed to request RESET gpio: %d\n", error);
+		if (error != -EPROBE_DEFER)
+			dev_err(dev, "Failed to request RESET gpio: %d\n",
+				error);
 		return error;
 	}
 
-- 
2.17.1


  parent reply	other threads:[~2019-10-07 12:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 12:16 [PATCH 1/5] Input: pixcir_i2c_ts - Remove unneeded gpio.h header file Fabio Estevam
2019-10-07 12:16 ` [PATCH 2/5] Input: pixcir_i2c_ts - Move definitions into a single file Fabio Estevam
2019-10-07 12:16 ` [PATCH 3/5] Input: pixcir_i2c_ts - Keep header files sorted Fabio Estevam
2019-10-07 12:16 ` [PATCH 4/5] Input: pixcir_i2c_ts: Print register address in decimal Fabio Estevam
2019-10-07 12:16 ` Fabio Estevam [this message]
2019-10-08 10:11 ` [PATCH 1/5] Input: pixcir_i2c_ts - Remove unneeded gpio.h header file Roger Quadros
2019-10-08 18:44   ` Dmitry Torokhov
2019-10-08 22:39     ` Fabio Estevam
2019-10-09 10:29     ` Michal Vokáč
2019-10-09 13:57     ` Roger Quadros

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=20191007121607.12545-5-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jcbian@pixcir.com.cn \
    --cc=linux-input@vger.kernel.org \
    --cc=rogerq@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).