Thread (1 message) 1 message, 1 author, 2015-01-08

Re: [PATCH] [ADD] 1.support new ic type for version 4.

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2015-01-08 21:32:51

Hi Sam,

FYI:

You sent this message as both plain/text and html, but vger.kernel.org
mailing lists are configured to discard all emails with html in them, so
while I did get your reply others did not. Please try to find mail agent
allowing you to use only plain text when interacting with Linux-related
mailing list.

In any case I received your updated patch and applied it. It should show
up in mainline with my next pull request (couple of days).

Thanks!

On Thu, Jan 08, 2015 at 05:30:54PM +0800, 洪一竹  wrote:
Thank you for your prompt reply!

Reply message below.

 

-----Original Message-----
From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com] 
Sent: Wednesday, January 07, 2015 3:26 PM
To: Sam hung
Cc: linux-input@vger.kernel.org; dusonlin@emc.com.tw
Subject: Re: [PATCH] [ADD] 1.support new ic type for version 4.

 

On Tue, Jan 06, 2015 at 11:21:36PM -0800, Dmitry Torokhov wrote:
quoted
Hi Sam,
quoted
quoted
On Tue, Jan 06, 2015 at 04:10:16PM +0800, Sam hung wrote:
quoted
quoted
---
quoted
quoted
 drivers/input/mouse/elantech.c | 23 +++++++++++++----------
quoted
quoted
 1 file changed, 13 insertions(+), 10 deletions(-)
quoted
quoted
quoted
quoted
diff --git a/drivers/input/mouse/elantech.c 
quoted
quoted
b/drivers/input/mouse/elantech.c index f2b9780..4891d07 100644
quoted
quoted
--- a/drivers/input/mouse/elantech.c
quoted
quoted
+++ b/drivers/input/mouse/elantech.c
quoted
quoted
@@ -700,14 +700,14 @@ static int elantech_packet_check_v1(struct 
quoted
quoted
psmouse *psmouse)
quoted
quoted
 
quoted
quoted
 static int elantech_debounce_check_v2(struct psmouse *psmouse)  {
quoted
quoted
-        /*
quoted
quoted
-         * When we encounter packet that matches this exactly, it means
the
quoted
quoted
-         * hardware is in debounce status. Just ignore the whole
packet.
quoted
quoted
-         */
quoted
quoted
-        const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff,
0xff };
quoted
quoted
-        unsigned char *packet = psmouse->packet;
quoted
quoted
-
quoted
quoted
-        return !memcmp(packet, debounce_packet,
sizeof(debounce_packet));
quoted
quoted
+        /*
quoted
quoted
+        * When we encounter packet that matches this exactly, it means
the
quoted
quoted
+        * hardware is in debounce status. Just ignore the whole packet.
quoted
quoted
+        */
quoted
quoted
+        const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff,
0xff };
quoted
quoted
+        unsigned char *packet = psmouse->packet;
quoted
quoted
+
quoted
quoted
+        return !memcmp(packet, debounce_packet,
sizeof(debounce_packet));
quoted
quoted
 }
quoted
quoted
Hmm, this chunk seems to be replacing spaces with tabs... I'd rather 
quoted
had it separate from the hardware version changes.
quoted
quoted
I'll pick up the chunk below though.
OK,In this Patch I will not change these lines (‘space’to ‘tab’).

 

Ah, I missed the fact that the patch does not have your "signed-off-by"

signature (see Documentation/SubmittingPatches). Please resend with it.

 

Thanks for your reminder.

I will fix this problem.
quoted
quoted
quoted
 
quoted
quoted
 static int elantech_packet_check_v2(struct psmouse *psmouse) @@ 
quoted
quoted
-1499,7 +1499,7 @@ static const struct dmi_system_id 
quoted
quoted
no_hw_res_dmi_table[] = {
quoted
quoted
 /*
quoted
quoted
  * determine hardware version and set some properties according to it.
quoted
quoted
  */
quoted
quoted
-static int elantech_set_properties(struct elantech_data *etd)
quoted
quoted
+static int elantech_set_properties(struct psmouse *psmouse, struct 
quoted
quoted
+elantech_data *etd)
quoted
quoted
 {
quoted
quoted
        /* This represents the version of IC body. */
quoted
quoted
        int ver = (etd->fw_version & 0x0f0000) >> 16; @@ -1520,9
+1520,12 
quoted
quoted
@@ static int elantech_set_properties(struct elantech_data *etd)
quoted
quoted
                case 7:
quoted
quoted
                case 8:
quoted
quoted
                case 9:
quoted
quoted
+                case 10:
quoted
quoted
+                case 13:
quoted
quoted
                        etd->hw_version = 4;
quoted
quoted
                        break;
quoted
quoted
                default:
quoted
quoted
+                        psmouse_err(psmouse, "failed to setting hw
version.\n");

 

The caller of elantech_set_properties() already issues message about unknown
hardware version, why do we need to have it here as well?

 

I think you're right.

I will fix this line.

 
quoted
quoted
                        return -1;
quoted
quoted
                }
quoted
quoted
        }
quoted
quoted
@@ -1593,7 +1596,7 @@ int elantech_init(struct psmouse *psmouse)
quoted
quoted
        }
quoted
quoted
        etd->fw_version = (param[0] << 16) | (param[1] << 8) | param[2];
quoted
quoted
 
quoted
quoted
- if (elantech_set_properties(etd)) {
quoted
quoted
+        if (elantech_set_properties(psmouse, etd)) {
quoted
quoted
                psmouse_err(psmouse, "unknown hardware version,
aborting...\n");
quoted
quoted
                goto init_fail;
quoted
quoted
        }
quoted
quoted
--
quoted
quoted
1.8.3.2
quoted
quoted
 

Thanks.

 

-- 

Dmitry

 
-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help