aboutsummaryrefslogtreecommitdiff
path: root/rmi4update/rmi4update.cpp
AgeCommit message (Collapse)Author
2015-10-16UPSTREAM: rmi4update: remove redundant include of alloca.hAndrew Duggan
(cherry picked from commit cf807718a2a6802475be33bff400835d447e5bff) Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 Change-Id: I3bdd5c1b4aca08c9ed8fa524472bdb52285be125
2015-10-16UPSTREAM: rmi4update: fix uninitialized variable warningAndrew Duggan
Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 (cherry picked from commit 757b6f6c072b023dd42d71dfb65417987a611234) Change-Id: I57d6cd10f0d775fc4dfdbe51fd8b76ba4038eef6
2015-10-16UPSTREAM: rmi4update: Optimize writing firmware blocksAndrew Duggan
Most HID devices allow appending the reflash command to the end of the firmware block. This avoids sending a second report with the just the command. Also, after the block is written HID devices send an attention report. Only read the F34 control registers if waiting for that attention report times out. Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 (cherry picked from commit 76743e425429076626df483691ce7abe563abd81) Change-Id: I0a3276d77605843cbb6ddec221320a6048d7b925
2015-09-10rmi4update: Check that Read() and Write() return exactly the expected amount.Andrew Duggan
2015-09-10rmi4update: massively speed up update when no update neededAndrew de los Reyes
2015-09-10rmi4update: Check Read() and Write() return lengthsAndrew de los Reyes
Addresses security concern: All users of Read and Write fail to check for return value being equal to desired write size (only look for <0, not a size >= 0 but less than expected). This can lead to all kinds of corruption or overflows.
2015-06-23Reset and rebind the driver even if update failsAndrew Duggan
2015-05-07Rebind the driver when switching between bootloader and UI in case the size ↵Andrew Duggan
of input reports changed If the firmware configuration has changed then the size of input reports between the bootloader and the UI may be different. Forcing a rebind of the driver when switching modes will update the transport drivers of the new input report size.
2015-05-06Allow rebinding of the transport device to force a reload of the HID descriptorsAndrew Duggan
In some cases during firmware update the size of the input reports can change this commit allows for the unbinding and rebinding of the transport HID device to force a reload of the HID descriptors so that the new size if read by the HID transport drivers.
2015-03-16Add error message when the tool refuses to update the device if the firmware ↵Andrew Duggan
image is not newer then the firmware on the device
2015-02-23Disable all interrupts not related to the update process before entering ↵Andrew Duggan
flash programming
2014-11-10Check the interrupt sources in WaitforIdle to ensure F34 generated the interruptAndrew Duggan
2014-09-29Add lockdown command line optionSatoshi Noguchi
2014-07-29Restructure firmware_image so that the firmware image checksum gets check ↵Andrew Duggan
before reading from the device. Also, merge the extract header and initialize functions.
2014-05-23Add support for v6 bootloaders and RMI F34 version 1Andrew Duggan
2014-05-06Keep going if attention times out, but print a message so that attn reports ↵Andrew Duggan
can be fixed otherwise it will be really slow. But, this will only happen if something is broken in the driver.
2014-04-16Update copyright notices.Andrew Duggan
2014-04-04Implement timing, this time in microseconds.Andrew Duggan
2014-04-03Add support for compiling for Android.Andrew Duggan
2014-04-03Initial commitAndrew Duggan