blob: 01e89c5b600beeb2d9209d441f59dac8a4c42b77 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Load cros-ec devices and sensors 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.
# cros-ec - sensors needed when chrome start. Needed for disabling keyboard in
# smart keyboard mode.
start on starting ui
# 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