From: junghoonHyun <cjbtest001@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: jeesw@melfas.com, rydberg@bitmath.org,
linux-kernel@vger.kernel.org, kms2701@lgdisplay.com,
hyunjunghoon@melfas.com, hbarnor@google.com,
sstarkenburg@google.com, jbtech0701@daum.net
Subject: [PATCH] Staging: melfas_mip4: add palm sequence
Date: Mon, 20 Mar 2023 17:00:12 +0900 [thread overview]
Message-ID: <20230320080012.4053-1-hyunjunghoon@melfas.com> (raw)
add palm processing logic
Signed-off-by: JungHoon Hyun <hyunjunghoon@melfas.com>
---
drivers/input/touchscreen/melfas_mip4.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c
index acdfbdea2b6e..311a6a1c0ac4 100644
--- a/drivers/input/touchscreen/melfas_mip4.c
+++ b/drivers/input/touchscreen/melfas_mip4.c
@@ -525,7 +525,11 @@ static void mip4_report_touch(struct mip4_ts *ts, u8 *packet)
} else if (state) {
/* Press or Move event */
input_mt_slot(ts->input, id);
- input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, true);
+ if (palm)
+ input_mt_report_slot_state(ts->input, MT_TOOL_PALM, true);
+ else
+ input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, true);
+
input_report_abs(ts->input, ABS_MT_POSITION_X, x);
input_report_abs(ts->input, ABS_MT_POSITION_Y, y);
input_report_abs(ts->input, ABS_MT_PRESSURE, pressure);
@@ -1483,6 +1487,9 @@ static int mip4_probe(struct i2c_client *client)
input->keycodesize = sizeof(*ts->key_code);
input->keycodemax = ts->key_num;
+ input_set_abs_params(input, ABS_MT_TOOL_TYPE,
+ 0, MT_TOOL_PALM, 0, 0);
+
input_set_abs_params(input, ABS_MT_POSITION_X, 0, ts->max_x, 0, 0);
input_set_abs_params(input, ABS_MT_POSITION_Y, 0, ts->max_y, 0, 0);
input_set_abs_params(input, ABS_MT_PRESSURE,
--
2.25.1
reply other threads:[~2023-03-20 8:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230320080012.4053-1-hyunjunghoon@melfas.com \
--to=cjbtest001@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hbarnor@google.com \
--cc=hyunjunghoon@melfas.com \
--cc=jbtech0701@daum.net \
--cc=jeesw@melfas.com \
--cc=kms2701@lgdisplay.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rydberg@bitmath.org \
--cc=sstarkenburg@google.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
all inboxes | Powered by JetHome®