summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/serial_mctrl_gpio.h
diff options
context:
space:
mode:
authorYegor Yefremov <yegorslists@googlemail.com>2016-05-31 11:59:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-26 00:30:42 +0300
commitbf5cee681e57babde5358a71e59b75151eb02c1a (patch)
tree90642ffa447c90c08f2f3719825b21d4c9a2572d /drivers/tty/serial/serial_mctrl_gpio.h
parent36fd95b17e9c1c41836632d95f2be5cff93b3df8 (diff)
downloadlinux-bf5cee681e57babde5358a71e59b75151eb02c1a.tar.xz
serial: mctrl_gpio: add modem control read routine
mctrl_gpio_get_outputs() returns the state of following signals: RTS, DTR While defining the routine for reading outputs, fix the comment for mctrl_gpio_get() routine as it returns only the state of the input signals. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/serial_mctrl_gpio.h')
-rw-r--r--drivers/tty/serial/serial_mctrl_gpio.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_mctrl_gpio.h b/drivers/tty/serial/serial_mctrl_gpio.h
index 332a33ab0647..fa000bcff217 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.h
+++ b/drivers/tty/serial/serial_mctrl_gpio.h
@@ -48,12 +48,19 @@ struct mctrl_gpios;
void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl);
/*
- * Get state of the modem control output lines from GPIOs.
+ * Get state of the modem control input lines from GPIOs.
* The mctrl flags are updated and returned.
*/
unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl);
/*
+ * Get state of the modem control output lines from GPIOs.
+ * The mctrl flags are updated and returned.
+ */
+unsigned int
+mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl);
+
+/*
* Returns the associated struct gpio_desc to the modem line gidx
*/
struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
@@ -107,6 +114,12 @@ unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl)
return *mctrl;
}
+static inline unsigned int
+mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl)
+{
+ return *mctrl;
+}
+
static inline
struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
enum mctrl_gpio_idx gidx)