Repository navigation
Conversation
We may want to ignore failures to open the tty, for instance: when powering off all devices in a system that has fewer USB ports than are needed to register all the consoles. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
We may want to ignore the failure to open the ftdi port, for instance in situations where the system has fewer USB ports than are needed to register all the consoles with multiple devices and all we want is to just power them all off. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Provide a variant of device_open() that doesn't bail-out on failure to open the console. This will be used by an upcoming new command of cdba-power that allows to power-off all configured boards. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Extend cdba-power with a command allowing to disable all configured boards at once. This is useful on boot of the cdba host where all boards get powered up. One can set up a one-shot systemd service that disables all the boards. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
5bc1a77 to
9f0ea65
Compare
|
I extended the series with some changes that allow to use this on cdba hosts with few USB ports (RPi 4 has 32 total) on which we need to ignore all the consoles. |
lumag
left a comment
There was a problem hiding this comment.
the system has fewer USB ports than are needed to
register all the consoles with multiple devices
I'd argue that it's a system issue, demanding use of another gateway instead of working around in the code.
|
|
||
| alpaca->alpaca_fd = tty_open(dev->control_dev, &alpaca->alpaca_tios); | ||
| if (alpaca->alpaca_fd < 0) | ||
| err(1, "failed to open %s", dev->control_dev); |
There was a problem hiding this comment.
This way we loose error messages. While there is one usecase where they don't make sense, in general they are useful.
Fair enough. I've been able to instead work around this limitation with uhubctl and mainline cdba-power so let's close it. |
Extend cdba-power with a command allowing to disable all configured boards at once. This is useful on boot of the cdba host where all boards get powered up. One can set up a one-shot systemd service that disables all the boards.