blob: 877953c08a781c877e70b144c9c5d7047c8668ef [file] [log] [blame]
# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Replay input devices (accel) udev events needed by Chrome"
author ""
# This job is used to replay events of devices needed by Chrome,
# in particular accelerometers.
# Given accelerometer needs VPD data, and on some kernel, VPD data is cached
# in the stateful partition, this job has to start after boot-service.
# Subsystems listed here must be excluded from udev-trigger.conf to avoid
# replaying twice.
# script must run otherwise device will never go in tablet mode/rotate.
oom score never
start on started boot-services
stop on stopping boot-services
# Use sysname-match to trigger the platform and chromeos devices.
udevadm trigger --action=add --subsystem-match=chromeos \
--subsystem-match=platform --sysname-match="*cros-ec*" \
# Use attr-match to trigger the iio accelerometer devices.
udevadm trigger --action=add --subsystem-match=iio \
exec udevadm settle
end script