aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serdev/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serdev/core.c')
-rw-r--r--drivers/tty/serdev/core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 433de5ea9b02..f71b47334149 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -122,6 +122,18 @@ void serdev_device_write_wakeup(struct serdev_device *serdev)
122} 122}
123EXPORT_SYMBOL_GPL(serdev_device_write_wakeup); 123EXPORT_SYMBOL_GPL(serdev_device_write_wakeup);
124 124
125int serdev_device_write_buf(struct serdev_device *serdev,
126 const unsigned char *buf, size_t count)
127{
128 struct serdev_controller *ctrl = serdev->ctrl;
129
130 if (!ctrl || !ctrl->ops->write_buf)
131 return -EINVAL;
132
133 return ctrl->ops->write_buf(ctrl, buf, count);
134}
135EXPORT_SYMBOL_GPL(serdev_device_write_buf);
136
125int serdev_device_write(struct serdev_device *serdev, 137int serdev_device_write(struct serdev_device *serdev,
126 const unsigned char *buf, size_t count, 138 const unsigned char *buf, size_t count,
127 unsigned long timeout) 139 unsigned long timeout)