Force FW update when Atmel devices have HWID: 0.0
Previously the Atmel touch firmware updater script strictly required
that the device it was updating reported the correct "hw_version" that
matched the firmware on disk. Recently it's become clear that you can
corrupt a FW update by interrupting it in the middle and the device
won't maintain it's hw_version. On the next boot, the device will
report 0.0 for it's hw_version which won't match the FW on disk.
This CL modifies the script so that if the device reports a hw_version
of 0.0, it will print a warning message then plow on ahead as normal.
This allows it to recover a device with corrupted FW in this manner.
The downside is that we can't differentiate *which* sensor we're
updating anymore if there are multiple Atmel options. I don't
believe there are any dual-sourced Atmel touch devices at this time so
this shouldn't have any negative effects on existing projects.
BUG=chrome-os-partner:57932
TEST=emerged and deployed on my Kevin and heavily exercised. After
manually corrupting my touchpad's FW, turning my computer off & on
recovers it without any manual interaction. (Although rebooting doesn't
but the script still does the correct thing -- that's a different issue
and it due to the HW or FW)
Change-Id: I954ce7e89185ed869b85bafe7db95b91773b103f
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/391105
1 file changed