[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180529131014.18641-18-ricardo.ribalda@gmail.com>
Date: Tue, 29 May 2018 15:10:12 +0200
From: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
Rob Herring <robh@...nel.org>, Johan Hovold <johan@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>
Subject: [PATCH 17/19] serdev: Mark controllers compatible with ttyport
This allows us to treat differently this controllers, by creating a tty
compatibility layer.
Cc: Rob Herring <robh@...nel.org>
Cc: Johan Hovold <johan@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
---
drivers/tty/serdev/serdev-ttyport.c | 1 +
include/linux/serdev.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
index 4acc5f41dc67..ae961260e4a4 100644
--- a/drivers/tty/serdev/serdev-ttyport.c
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -276,6 +276,7 @@ struct device *serdev_tty_port_register(struct tty_port *port,
serport->tty_drv = drv;
ctrl->ops = &ctrl_ops;
+ ctrl->is_ttyport = true;
old_ops = port->client_ops;
port->client_ops = &client_ops;
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index bb3b9599c652..07d63933bdb9 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -116,6 +116,7 @@ struct serdev_controller {
unsigned int nr;
struct serdev_device *serdev;
const struct serdev_controller_ops *ops;
+ bool is_ttyport;
};
static inline struct serdev_controller *to_serdev_controller(struct device *d)
--
2.17.0
Powered by blists - more mailing lists