Thread (51 messages) 51 messages, 4 authors, 2013-04-08

Re: Atmel updates to atmel_mxt_ts touch controller driver

From: Nick Dyer <hidden>
Date: 2013-02-22 20:53:13
Also in: lkml

Peter Meerwald wrote:
the series gets rid of the fragile binary config data and handle_pdata()
- I like it, but haven't tested yet

is there a reference to the specification of the new config format? the
format of the old pdata->config was immediately obvious from reading the
source, the new way not so much...
It's basically:

OBP_RAW V1
family_id variant_id version build x_size y_size num_objects
info_block_crc
config_crc
<type> <instance> <num_bytes> <object_bytes...>
(repeat last line for each object/instance)

Everything is ASCII hex. It's designed to be simple to parse/generate. We
also have an INI like format called xcfg which is much friendlier to
humans, but parsing that in a kernel driver would be a bit horrid.

I can point you to a bit of code that writes it:

https://github.com/atmel-maxtouch/obp-utils/blob/master/src/libmaxtouch/config.c#L39

It will not read the config CRC, but you can get that from dmesg output
(it's in T6 messages).

You can try the mxt-app tool without the driver changes via i2c-dev, just
run it like "mxt-app -d2 -a4b" (for /dev/i2c-2, addr 4b).

cheers

-- 
Nick Dyer
Senior Software Engineer, ITDev
Hardware and Software Development Consultancy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help