This issue is for brain storming.
Currently we have several ways to implement board-specific components:
1. Device API, via writing new code (for example LED)
2. Device API, via external config (see device.audio).
3. Args in test list (see usb-storage tests, also button tests)
There are pros and cons, but maybe we want to have some definition or guide line for what to use.
For example, LED & buttons are very similar - usually implemented via gpio or some sysfs node. What if we implement a generic GPIO driver and extend with configs (like audio) so that we can do something like dut.button.GetAllNames(), dut.button.GetStatus(name), dut.led.GetAllNames(), dut.led.GetStatus(name); then we can move the ectool/gpio/input driver code in pytests into board level and simply request the name of button/led in dargs.
Comment 1 by hungte@chromium.org
, Jan 25 2017Status: Assigned (was: Untriaged)
Summary: Factory: Think about the right way to configure per-device components. (was: Factory: Think about the right way to configure pre-device components.)