summaryrefslogtreecommitdiffstats
path: root/Documentation/serial/driver
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2015-09-30 10:19:41 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 18:47:51 +0100
commitce59e48fdbad2aa6609ceb87e1306ec69e577e05 (patch)
tree94bcb6b50144bda28e1934ff24021dd358636b2a /Documentation/serial/driver
parent7d8c70d8048c7b4307dff95d9300d6b1ea7a3547 (diff)
downloadlinux-stable-ce59e48fdbad2aa6609ceb87e1306ec69e577e05.tar.gz
linux-stable-ce59e48fdbad2aa6609ceb87e1306ec69e577e05.tar.bz2
linux-stable-ce59e48fdbad2aa6609ceb87e1306ec69e577e05.zip
serial: mctrl_gpio: implement interrupt handling
This allows to reduce the per-driver boiler plate considerably. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/serial/driver')
-rw-r--r--Documentation/serial/driver10
1 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index c415b0ef4493..379468e12680 100644
--- a/Documentation/serial/driver
+++ b/Documentation/serial/driver
@@ -439,11 +439,13 @@ Modem control lines via GPIO
Some helpers are provided in order to set/get modem control lines via GPIO.
-mctrl_gpio_init(dev, idx):
+mctrl_gpio_init(port, idx):
This will get the {cts,rts,...}-gpios from device tree if they are
present and request them, set direction etc, and return an
allocated structure. devm_* functions are used, so there's no need
to call mctrl_gpio_free().
+ As this sets up the irq handling make sure to not handle changes to the
+ gpio input lines in your driver, too.
mctrl_gpio_free(dev, gpios):
This will free the requested gpios in mctrl_gpio_init().
@@ -458,3 +460,9 @@ mctrl_gpio_set(gpios, mctrl):
mctrl_gpio_get(gpios, mctrl):
This will update mctrl with the gpios values.
+
+mctrl_gpio_enable_ms(gpios):
+ Enables irqs and handling of changes to the ms lines.
+
+mctrl_gpio_disable_ms(gpios):
+ Disables irqs and handling of changes to the ms lines.