linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Input: atmel_mxt_ts - status of the for-dtor branch and sscanf issue
@ 2015-01-19 13:08 Dirk Behme
  2015-01-27 17:31 ` Nick Dyer
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2015-01-19 13:08 UTC (permalink / raw)
  To: Nick Dyer; +Cc: linux-input

Hi Nick,

we have two questions regarding the atmel_mxt_ts driver:

First, what's the status of your github 'for-dtor' branch [1]? Is this 
subject to change? Or how stable is it? Will it go into mainline, soon?

We've tested the patches in that branch on top of the mainline ~v3.18 
atmel_mxt_ts patches and they improve the driver a lot. So we'd like to 
pick that patches into our internal development tree.


Second, with that branch, doing a config file download, we sometimes 
randomly get

atmel_mxt_ts 2-004a: Bad format: failed to parse object
atmel_mxt_ts 2-004a: Error -22 updating config

at the end of the parsing, depending on the byte following the 
firmware/config file in memory. Our config file does have CR/LF endings. 
The sscanf() returns "1" in that case.

A quick hack solution to that is skipping the last two bytes [2]. What 
do you think?

Best regards

Dirk

[1] https://github.com/ndyer/linux/commits/for-dtor

[2]

@@ -1586,7 +1586,7 @@ static int mxt_prepare_cfg_mem(struct mxt_data *data,
         u16 reg;
         u8 val;

-       while (data_pos < cfg->size) {
+       while ((data_pos + 2) < cfg->size) {
                 /* Read type, instance, length */
                 ret = sscanf(cfg->data + data_pos, "%x %x %x%n",
                              &type, &instance, &size, &offset);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-04  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 13:08 Input: atmel_mxt_ts - status of the for-dtor branch and sscanf issue Dirk Behme
2015-01-27 17:31 ` Nick Dyer
2015-02-04 14:46   ` Dirk Behme
2015-03-04  6:54     ` Dirk Behme

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).