stupdate: Support driver rebind under Linux 5.4 in addition to 4.4.

This looks for "i2c_hid_acpi" then "i2c_hid" drivers, and attempts the
post-update rebind with whichever driver it finds first.  Previously
this assumed the system used "i2c_hid" driver name.

This also adds a fallback on a post-update reboot if neither driver name
is found (therefore no rebind attempt), or if the rebind attempt failed.

This will be cleaned up after the next Atlas AP firmware uprev, which
will fix ACPI re-enumeration of this touch controller and allow for
simply rebinding the parent I2C adapter (without hardcoding its driver
name).

BUG=b:177350937
TEST=Tested on 2x Atlas DUT running CrOS R94 top-of-tree with Linux
kernel 4.4 and 5.4.

Updated touchscreen FW symlink on Atlas DUT to change live version
backwards and forwards.  Verified the touchscreen FW updates succeeded,
the driver reload succeeded (from /var/log/messages), expected sysfs
entries are present, and the touchscreen works without any extra reboots
needed.

Interrupted a touchscreen FW update and then rebooted, such that the DUT
booted up without any touchscreen HID device.  Verified that the
touchscreen FW update succeeded, the driver rebind succeeded, expected
sysfs entries became present, and the touchscreen became
functional again, without needing any extra reboots.

Tested post-update reboot paths by injecting false failures in the
scripts.  No-driver-found scenario was tested by corrupting both driver
names, and rebind-failure scenario was tested by assigning an incorrect
extant driver name.

Change-Id: I66d4eead1f13716b617b0e8dfdc4a646eb7058ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/touch_updater/+/3093383
Tested-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-by: Harry Cutts <hcutts@chromium.org>
Commit-Queue: Matthew Blecker <matthewb@chromium.org>
1 file changed