Now local_gpio has landed, also accept a more verbose
and cleaner yaml config syntax for ftdi_gpio.
For now keep support for the current configuration string.
Closes: #42
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Client-only builds benefit from using feature options, which are not
supported by the meson 0.45.1 (the version in Ubuntu bionic).
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
It is expected that the majority of CDBA users do not need the server
binary. Allow users to disable the cdba-server binary and build just the
client.
Fixes: #48
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Since the FTDI is hot-pluggable, the output lines can be protected
for unwanted changes by a supplementary GPIO that allows the FTDI
gpio outputs to be enabled for the required functions.
Closes: #43
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Some devices / hubs require switching both USB-2 and USB-3 ports to
function correctly. Add ppps3_path device option to control USB-3 port
in addition to the USB-2 port.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This driver permits controlling local (on the system) gpios
by using the libgpiod library.
Support for gpiod v1 and v2 is added, and parses the options
via the yaml parser.
This can be tested with the gpio-sim module:
https://docs.kernel.org/admin-guide/gpio/gpio-sim.html
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Export the functions and struct to enable devices to parse
yaml aswell via the parse_options op to be stored in the
device control_options device property.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
If we got to device_close(), the parent SSH might have been exited,
making standard file descriptors unusable. Rebind them to /dev/null, so
that any output during device_close (both from the cdba server and the
helpers) doesn't cause SIGPIPE.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Control the board using external program. It will be called with 3
arguments: <board> <command> <on/off>, where command is one of "power",
"usb", "key-fastboot", "key-power".
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Separate backend operations into control and console operations. Main
idea is that each device has single set of console ops (conmux or
console) and at most one way to control it. Each backend driver exports
a structure with the set of callbacks.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Allow PPPS function even if there is no device->usb callback. PPPS is
useable even with no control interface.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>