mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
console: Add send_break support
Add support for send_break to the generic console implementation. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
@@ -68,3 +68,8 @@ int console_write(struct device *device, const void *buf, size_t len)
|
||||
{
|
||||
return write(device->console_fd, buf, len);;
|
||||
}
|
||||
|
||||
void console_send_break(struct device *device)
|
||||
{
|
||||
tcsendbreak(device->console_fd, 0);
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
|
||||
void console_open(struct device *device);
|
||||
int console_write(struct device *device, const void *buf, size_t len);
|
||||
void console_send_break(struct device *device);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -122,6 +122,7 @@ static void parse_board(struct device_parser *dp)
|
||||
} else if (!strcmp(key, "console")) {
|
||||
dev->console_dev = strdup(value);
|
||||
dev->write = console_write;
|
||||
dev->send_break = console_send_break;
|
||||
} else if (!strcmp(key, "voltage")) {
|
||||
dev->voltage = strtoul(value, NULL, 10);
|
||||
} else if (!strcmp(key, "fastboot")) {
|
||||
|
||||
Reference in New Issue
Block a user