Gilad Arnold | 5b2d00a | 2012-02-24 14:10:08 -0800 | [diff] [blame] | 1 | # 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 Arnold | 6d63d77 | 2012-03-01 11:54:32 -0800 | [diff] [blame] | 13 | # 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 Arnold | 5b2d00a | 2012-02-24 14:10:08 -0800 | [diff] [blame] | 18 | # - Alex: |
Gilad Arnold | ed74731 | 2012-03-15 18:20:41 -0700 | [diff] [blame] | 19 | ATTR{[dmi/id]product_name}=="Alex", SUBSYSTEM=="gpio", KERNEL=="gpiochip192", \ |
| 20 | ENV{ID_GPIO_DUTFLAGA}="205", ENV{ID_GPIO_DUTFLAGB}="202" |
Gilad Arnold | 17d6c8b | 2012-02-29 13:16:13 -0800 | [diff] [blame] | 21 | |
Gilad Arnold | 5b2d00a | 2012-02-24 14:10:08 -0800 | [diff] [blame] | 22 | # - ZGB: |
Gilad Arnold | 17d6c8b | 2012-02-29 13:16:13 -0800 | [diff] [blame] | 23 | #ATTR{[dmi/id]product_name}=="ZGB", SUBSYSTEM=="gpio", KERNEL=="gpiochip192", \ |
| 24 | # ENV{ID_GPIO_DUTFLAGA}="216", ENV{ID_GPIO_DUTFLAGB}="195" |
| 25 | |
Gilad Arnold | 5b2d00a | 2012-02-24 14:10:08 -0800 | [diff] [blame] | 26 | # - Lumpy, Stumpy: |
Gilad Arnold | 6d63d77 | 2012-03-01 11:54:32 -0800 | [diff] [blame] | 27 | # 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 Arnold | 5b2d00a | 2012-02-24 14:10:08 -0800 | [diff] [blame] | 32 | |
| 33 | # Export dut_flaga/b and register their identifier as an attribute. |
| 34 | ACTION=="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}" |