[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160824232437.9446-7-robh@kernel.org>
Date: Wed, 24 Aug 2016 18:24:36 -0500
From: Rob Herring <robh@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Marcel Holtmann <marcel@...tmann.org>,
Jiri Slaby <jslaby@...e.com>,
Sebastian Reichel <sre@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
"Dr . H . Nikolaus Schaller" <hns@...delico.com>,
Alan Cox <gnomes@...rguk.ukuu.org.uk>
Cc: Loic Poulain <loic.poulain@...el.com>, Pavel Machek <pavel@....cz>,
Peter Hurley <peter@...leysoftware.com>,
NeilBrown <neil@...wn.name>,
Linus Walleij <linus.walleij@...aro.org>,
linux-bluetooth@...r.kernel.org, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 5/6] serio: add serial configuration functions
Just stub functions ATM.
Signed-off-by: Rob Herring <robh@...nel.org>
---
include/linux/serio.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 5d0b69f..5bf1754 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -41,6 +41,8 @@ struct serio {
void (*close)(struct serio *);
int (*start)(struct serio *);
void (*stop)(struct serio *);
+ void (*set_flow_control)(struct serio *, bool);
+ unsigned int (*set_baudrate)(struct serio *, unsigned int);
struct serio *parent;
/* Entry in parent->children list */
@@ -170,6 +172,20 @@ static inline void serio_drv_write_wakeup(struct serio *serio)
serio->drv->write_wakeup(serio);
}
+static inline void serio_set_flow_control(struct serio *serio, bool enable)
+{
+ if (serio->set_flow_control)
+ serio->set_flow_control(serio, enable);
+}
+
+static inline unsigned int serio_set_baudrate(struct serio *serio, unsigned int speed)
+{
+ if (serio->set_baudrate)
+ return serio->set_baudrate(serio, speed);
+
+ return 0;
+}
+
/*
* Use the following functions to manipulate serio's per-port
* driver-specific data.
--
2.9.3
Powered by blists - more mailing lists