blob: c93c508baf0e0beff393c46b1df91514f69f1e07 [file] [log] [blame]
Gilad Arnold5b2d00a2012-02-24 14:10:08 -08001# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4#
5# These rules are in charge of exporting the dut_flaga and dut_flagb GPIOs on
6# different platforms. The GPIO IDs are registered as attributes, which can be
7# detected by client processes. This was motivated by update engine
8# auto-testing framework.
9
10# Identify the GPIO chip and set dut_flaga identifier on different platforms.
11# Unfortunately, Mario does not have a debug header, hence no GPIOs exposed.
12#
13# - Alex:
14ATTR{[dmi/id]product_name}=="Alex", SUBSYSTEM=="gpio", KERNEL=="gpiochip192", \
15 ENV{ID_GPIO_DUTFLAGA}="205", ENV{ID_GPIO_DUTFLAGB}="202"
Gilad Arnold17d6c8b2012-02-29 13:16:13 -080016
Gilad Arnold5b2d00a2012-02-24 14:10:08 -080017# - ZGB:
Gilad Arnold17d6c8b2012-02-29 13:16:13 -080018# TODO(garnold) dutflaga/b export is disabled until we figure out what's pulling
19# the signal up (http://code.google.com/p/chromium-os/issues/detail?id=27077)
20#ATTR{[dmi/id]product_name}=="ZGB", SUBSYSTEM=="gpio", KERNEL=="gpiochip192", \
21# ENV{ID_GPIO_DUTFLAGA}="216", ENV{ID_GPIO_DUTFLAGB}="195"
22
Gilad Arnold5b2d00a2012-02-24 14:10:08 -080023# - Lumpy, Stumpy:
24# TODO(garnold) Stumpy is current disabled, as its dutflag GPIOs are
25# non-pull-up wired, which means that they can read arbitrary values when not
26# connected to Servo. Once fixed or properly handled by the application, this
27# should read "Lumpy|Stumpty".
28ATTR{[dmi/id]product_name}=="Lumpy", SUBSYSTEM=="gpio", KERNEL=="gpiochip160", \
29 ENV{ID_GPIO_DUTFLAGA}="173", ENV{ID_GPIO_DUTFLAGB}="170"
30
31# Export dut_flaga/b and register their identifier as an attribute.
32ACTION=="add|change", SUBSYSTEM=="gpio", \
33 ENV{ID_GPIO_DUTFLAGA}=="?*", ENV{ID_GPIO_DUTFLAGB}=="?*", \
34 ATTR{subsystem/export}="%E{ID_GPIO_DUTFLAGA}", \
35 ATTR{subsystem/export}="%E{ID_GPIO_DUTFLAGB}"