blob: f8b1d672fcbbde3f5255dda34db2bb1fe1b4cc1c [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#
Gilad Arnold6d63d772012-03-01 11:54:32 -080013# TODO(garnold) dutflaga/b export is disabled until we figure out what's
14# pulling the signal up on zgb and lumpy, and implement a safe fallback
15# machanism for such cases where autoupdate fails with the internal address
16# (http://code.google.com/p/chromium-os/issues/detail?id=27077)
17
Gilad Arnold5b2d00a2012-02-24 14:10:08 -080018# - Alex:
Gilad Arnolded747312012-03-15 18:20:41 -070019ATTR{[dmi/id]product_name}=="Alex", SUBSYSTEM=="gpio", KERNEL=="gpiochip192", \
20 ENV{ID_GPIO_DUTFLAGA}="205", ENV{ID_GPIO_DUTFLAGB}="202"
Gilad Arnold17d6c8b2012-02-29 13:16:13 -080021
Gilad Arnold5b2d00a2012-02-24 14:10:08 -080022# - ZGB:
Gilad Arnold17d6c8b2012-02-29 13:16:13 -080023#ATTR{[dmi/id]product_name}=="ZGB", SUBSYSTEM=="gpio", KERNEL=="gpiochip192", \
24# ENV{ID_GPIO_DUTFLAGA}="216", ENV{ID_GPIO_DUTFLAGB}="195"
25
Gilad Arnold5b2d00a2012-02-24 14:10:08 -080026# - Lumpy, Stumpy:
Gilad Arnold6d63d772012-03-01 11:54:32 -080027# TODO(garnold) stumpy's dutflag GPIOs are non-pull-up wired, which means that
28# they can read arbitrary values when not connected to Servo. Once fixed or
29# properly handled by the application, this should read "Lumpy|Stumpy".
30#ATTR{[dmi/id]product_name}=="Lumpy", SUBSYSTEM=="gpio", KERNEL=="gpiochip160", \
31# ENV{ID_GPIO_DUTFLAGA}="173", ENV{ID_GPIO_DUTFLAGB}="170"
Gilad Arnold5b2d00a2012-02-24 14:10:08 -080032
33# Export dut_flaga/b and register their identifier as an attribute.
34ACTION=="add|change", SUBSYSTEM=="gpio", \
35 ENV{ID_GPIO_DUTFLAGA}=="?*", ENV{ID_GPIO_DUTFLAGB}=="?*", \
36 ATTR{subsystem/export}="%E{ID_GPIO_DUTFLAGA}", \
37 ATTR{subsystem/export}="%E{ID_GPIO_DUTFLAGB}"