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 4/5] Input: pixcir_i2c_ts: Print register address in decimal
Date: Mon, 7 Oct 2019 09:16:06 -0300 [thread overview]
Message-ID: <20191007121607.12545-4-festevam@gmail.com> (raw)
In-Reply-To: <20191007121607.12545-1-festevam@gmail.com>
The pixcir datasheet lists the registers addresses in decimal and
so are PIXCIR_REG_POWER_MODE and PIXCIR_REG_INT_MODE defined in decimal.
Change the error messages to print the register addresses in decimal
instead of hexadecimal for better readability.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/input/touchscreen/pixcir_i2c_ts.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c
index af2336da6954..c8a35e97b595 100644
--- a/drivers/input/touchscreen/pixcir_i2c_ts.c
+++ b/drivers/input/touchscreen/pixcir_i2c_ts.c
@@ -249,7 +249,7 @@ static int pixcir_set_power_mode(struct pixcir_i2c_ts_data *ts,
ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_POWER_MODE);
if (ret < 0) {
- dev_err(dev, "%s: can't read reg 0x%x : %d\n",
+ dev_err(dev, "%s: can't read reg %d : %d\n",
__func__, PIXCIR_REG_POWER_MODE, ret);
return ret;
}
@@ -262,7 +262,7 @@ static int pixcir_set_power_mode(struct pixcir_i2c_ts_data *ts,
ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_POWER_MODE, ret);
if (ret < 0) {
- dev_err(dev, "%s: can't write reg 0x%x : %d\n",
+ dev_err(dev, "%s: can't write reg %d : %d\n",
__func__, PIXCIR_REG_POWER_MODE, ret);
return ret;
}
@@ -288,7 +288,7 @@ static int pixcir_set_int_mode(struct pixcir_i2c_ts_data *ts,
ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_INT_MODE);
if (ret < 0) {
- dev_err(dev, "%s: can't read reg 0x%x : %d\n",
+ dev_err(dev, "%s: can't read reg %d : %d\n",
__func__, PIXCIR_REG_INT_MODE, ret);
return ret;
}
@@ -303,7 +303,7 @@ static int pixcir_set_int_mode(struct pixcir_i2c_ts_data *ts,
ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_INT_MODE, ret);
if (ret < 0) {
- dev_err(dev, "%s: can't write reg 0x%x : %d\n",
+ dev_err(dev, "%s: can't write reg %d : %d\n",
__func__, PIXCIR_REG_INT_MODE, ret);
return ret;
}
@@ -321,7 +321,7 @@ static int pixcir_int_enable(struct pixcir_i2c_ts_data *ts, bool enable)
ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_INT_MODE);
if (ret < 0) {
- dev_err(dev, "%s: can't read reg 0x%x : %d\n",
+ dev_err(dev, "%s: can't read reg %d : %d\n",
__func__, PIXCIR_REG_INT_MODE, ret);
return ret;
}
@@ -333,7 +333,7 @@ static int pixcir_int_enable(struct pixcir_i2c_ts_data *ts, bool enable)
ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_INT_MODE, ret);
if (ret < 0) {
- dev_err(dev, "%s: can't write reg 0x%x : %d\n",
+ dev_err(dev, "%s: can't write reg %d : %d\n",
__func__, PIXCIR_REG_INT_MODE, ret);
return ret;
}
--
2.17.1
next prev 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 ` Fabio Estevam [this message]
2019-10-07 12:16 ` [PATCH 5/5] Input: pixcir_i2c_ts: Do not print error on defer probe Fabio Estevam
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-4-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).