diff options
Diffstat (limited to 'drivers/misc/ti-st/st_core.c')
-rw-r--r-- | drivers/misc/ti-st/st_core.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c index f7bb96f3a424..dd2c879faff6 100644 --- a/drivers/misc/ti-st/st_core.c +++ b/drivers/misc/ti-st/st_core.c | |||
@@ -52,6 +52,24 @@ static void remove_channel_from_table(struct st_data_s *st_gdata, | |||
52 | st_gdata->list[proto->chnl_id] = NULL; | 52 | st_gdata->list[proto->chnl_id] = NULL; |
53 | } | 53 | } |
54 | 54 | ||
55 | /* | ||
56 | * called from KIM during firmware download. | ||
57 | * | ||
58 | * This is a wrapper function to tty->ops->write_room. | ||
59 | * It returns number of free space available in | ||
60 | * uart tx buffer. | ||
61 | */ | ||
62 | int st_get_uart_wr_room(struct st_data_s *st_gdata) | ||
63 | { | ||
64 | struct tty_struct *tty; | ||
65 | if (unlikely(st_gdata == NULL || st_gdata->tty == NULL)) { | ||
66 | pr_err("tty unavailable to perform write"); | ||
67 | return -1; | ||
68 | } | ||
69 | tty = st_gdata->tty; | ||
70 | return tty->ops->write_room(tty); | ||
71 | } | ||
72 | |||
55 | /* can be called in from | 73 | /* can be called in from |
56 | * -- KIM (during fw download) | 74 | * -- KIM (during fw download) |
57 | * -- ST Core (during st_write) | 75 | * -- ST Core (during st_write) |