diff mbox

[2/7] input: atmel_mxt_ts: allow to read/display MXT_GEN_MESSAGE_T5 object

Message ID 1360246668-2291-3-git-send-email-pmeerw@pmeerw.net (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Meerwald-Stadler Feb. 7, 2013, 2:17 p.m. UTC
From: Peter Meerwald <p.meerwald@bct-electronic.com>

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Daniel Kurtz Feb. 8, 2013, 11:45 p.m. UTC | #1
On Thu, Feb 7, 2013 at 6:17 AM, Peter Meerwald <pmeerw@pmeerw.net> wrote:
>
> From: Peter Meerwald <p.meerwald@bct-electronic.com>

Hi Peter,

Hmm.  Why do you want to read T5?

We specifically removed T5 from the readble list in this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=55d6867fe659f4783e57db7b2ae0bb04e4ac816e

T5 is the message processor object.  Reading it will only have two
outcomes, neither of which is particularly useful:
1) the message count decrements, and a valid message will be lost
2) an invalid message will be read (reportid == 0xff)

Thanks!
-Daniel

>
> Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
> ---
>  drivers/input/touchscreen/atmel_mxt_ts.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c
> b/drivers/input/touchscreen/atmel_mxt_ts.c
> index fc52dc5..63a82bb 100644
> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> @@ -251,6 +251,7 @@ struct mxt_data {
>  static bool mxt_object_readable(unsigned int type)
>  {
>         switch (type) {
> +       case MXT_GEN_MESSAGE_T5:
>         case MXT_GEN_COMMAND_T6:
>         case MXT_GEN_POWER_T7:
>         case MXT_GEN_ACQUIRE_T8:
> --
> 1.7.9.5
>
--
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
Peter Meerwald-Stadler Feb. 9, 2013, 12:01 a.m. UTC | #2
Hello Daniel,

> Hmm.  Why do you want to read T5?
> We specifically removed T5 from the readble list in this patch:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=55d6867fe659f4783e57db7b2ae0bb04e4ac816e

ah; haven't seen that patch

> T5 is the message processor object.  Reading it will only have two
> outcomes, neither of which is particularly useful:
> 1) the message count decrements, and a valid message will be lost
> 2) an invalid message will be read (reportid == 0xff)

I found it useful for debugging; but I agree that it interferes with 
normal operation of the driver -- T5 should not be added

regards, p.
diff mbox

Patch

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index fc52dc5..63a82bb 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -251,6 +251,7 @@  struct mxt_data {
 static bool mxt_object_readable(unsigned int type)
 {
 	switch (type) {
+	case MXT_GEN_MESSAGE_T5:
 	case MXT_GEN_COMMAND_T6:
 	case MXT_GEN_POWER_T7:
 	case MXT_GEN_ACQUIRE_T8: