All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Dyer <nick.dyer@itdev.co.uk>
To: Dirk Behme <dirk.behme@de.bosch.com>
Cc: linux-input@vger.kernel.org
Subject: Re: Input: atmel_mxt_ts - status of the for-dtor branch and sscanf issue
Date: Tue, 27 Jan 2015 17:31:25 +0000	[thread overview]
Message-ID: <54C7CB6D.9050603@itdev.co.uk> (raw)
In-Reply-To: <54BD01D9.90608@de.bosch.com>

On 19/01/15 13:08, Dirk Behme wrote:
> 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.

for-dtor is a set of patches that I have waiting to go upstream. I'm trying
to feed them into mainline, but it's a slow process unfortunately. Any
feedback/review of these patches is greatly appreciated.

It does get rebased frequently, for instance to re-order the patches or to
take account of upstream review, so I would suggest not pulling it into
your tree. I do however keep some backported branches (maxtouch-v3.x) at
https://github.com/atmel-maxtouch/linux/ against various kernel versions
which aren't ever rebased, which you should be able to pull from.

> 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?

I'm not convinced it's the right solution. I suspect the root cause is that
the FW loader doesn't null-terminate the buffer we are handed from
user-space, so sscanf runs on past the end sometimes. So I think we need to
do something like this (from the chromiumos fork of this driver):

https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.14/drivers/input/touchscreen/atmel_mxt_ts.c#2251

  reply	other threads:[~2015-01-27 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-02-04 14:46   ` Dirk Behme
2015-03-04  6:54     ` Dirk Behme

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=54C7CB6D.9050603@itdev.co.uk \
    --to=nick.dyer@itdev.co.uk \
    --cc=dirk.behme@de.bosch.com \
    --cc=linux-input@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.