Power-on only touch devices during firmware update

When scanning for touch devices we power on all devices in the paths
that we examine. This causes the camera leds on some devices to power on
and raises privacy concerns from users. We previously worked around this
issue by adding a regex to exclude specific device paths. However, some
camera device paths do not have unique device specific paths.

This CL introduces a more generic solution that uses the device driver
name to determine if a device is a touch device. The `check_update`
function already included this kind of filtering. This change therefore
uses the same rules to determine if a device path belongs to a touch
device before powering it on.

BUG=b:231745026, b:322430755
TEST=FEATURES=test emerge-${B} chromeos-base/touch_updater \
     chromeos-base/chromeos-touch-common
TEST=Manual validation on ciri and redrix

Change-Id: Iea4706f9d860b3c742c189aa1622ff65f04e1aac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/touch_updater/+/5508460
Tested-by: Hanlin Chen <hanlinchen@google.com>
Reviewed-by: Kenneth Albanowski <kenalba@google.com>
Reviewed-by: Sean O'Brien <seobrien@chromium.org>
Commit-Queue: Henry Barnor <hbarnor@chromium.org>
2 files changed