Make default debug level show info output

Move some debug that is available separately by running --info down a level.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Add chip attach signal to bridge protocol

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Improve error reporting from bridge functions

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Add missing break to --zero command

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Reserve error value for internal tool

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Refactor code to add calibration error checking

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Combine headers in mxt-app to fix compilation errors

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Add subdir-objects to autotools config

The next version of automake will unconditionally enable this option, so start
using it now to avoid compatibility problems.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Do not use lookup_bootloader address when info block not read

This caused a segmentation fault when trying to flash using i2c-dev. It is
better simply to compare the address with the minimum app mode address.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Include configuration checksum in .xcfg and OBP_RAW files

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Remove unnecessary &x[0] in various locations

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Add extern C definitions to header file for use with C++

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Add libusbdroid build instructions
Add make indent rule using astyle tool

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Reindent code

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Reindent usb_device.c

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Only warn when calibrate message does not arrive

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Add missing USB flags in mxt-app build
Add retries to libusb_open

On some hardware, we have seen that trying to open the device immediately
after enumeration results in a temporary libusb error. Retrying the open then
succeeds which improves reliability.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Improve handling of USB enumeration on reset

The old logic assumed that the device would re-enumerate either at the same
address or the maximum device address on the bus plus one. This logic didn't
handle the case where the device address reached 127 and wrapped.

Instead, build a list of which addresses on the bus are maxtouch devices,
which allows us to detect the new one that has arrived.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>