summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 20:25:50 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 20:25:50 -0700
commit7fc86a7908a4e9eb2da4b6498f86193d113842d3 (patch)
treec1b2faab48d2a6003c8e8efae5f356a4e792ce0a /drivers/tty
parent90597b6cfc1fc9926a4d54f09bbf5b3254b1b028 (diff)
parent51dddfe839a0ebcb5ff61a779e3f2768714f9957 (diff)
downloadlinux-7fc86a7908a4e9eb2da4b6498f86193d113842d3.tar.bz2
Merge tag 'pinctrl-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pinctrl updates for v3.4 from Linus Walleij (*): - Switches the PXA 168, 910 and MMP over to use pinctrl - Locking revamped - Massive refactorings... - Reform the driver API to use multiple states - Support pin config in the mapping tables - Pinctrl drivers for the nVidia Tegra series - Generic pin config support lib for simple pin controllers - Implement pin config for the U300 * tag 'pinctrl-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (48 commits) ARM: u300: configure some pins as an example pinctrl: support pinconfig on the U300 pinctrl/coh901: use generic pinconf enums and parameters pinctrl: introduce generic pin config pinctrl: fix error path in pinconf_map_to_setting() pinctrl: allow concurrent gpio and mux function ownership of pins pinctrl: forward-declare struct device pinctrl: split pincontrol states into its own header pinctrl: include machine header to core.h ARM: tegra: Select PINCTRL Kconfig variables pinctrl: add a driver for NVIDIA Tegra pinctrl: Show selected function and group in pinmux-pins debugfs pinctrl: enhance mapping table to support pin config operations pinctrl: API changes to support multiple states per device pinctrl: add usecount to pins for muxing pinctrl: refactor struct pinctrl handling in core.c vs pinmux.c pinctrl: fix and simplify locking pinctrl: fix the pin descriptor kerneldoc pinctrl: assume map table entries can't have a NULL name field pinctrl: introduce PINCTRL_STATE_DEFAULT, define hogs as that state ... (*) What is it with all these Linuses these days? There's a Linus at google too. Some day I will get myself my own broadsword, and run around screaming "There can be only one". I used to be _special_ dammit. Snif.
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sirfsoc_uart.c24
-rw-r--r--drivers/tty/serial/sirfsoc_uart.h2
2 files changed, 10 insertions, 16 deletions
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index a60523fee11b..5b3eda2024fe 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -22,7 +22,7 @@
#include <linux/io.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
-#include <linux/pinctrl/pinmux.h>
+#include <linux/pinctrl/consumer.h>
#include "sirfsoc_uart.h"
@@ -673,12 +673,10 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
port->irq = res->start;
if (sirfport->hw_flow_ctrl) {
- sirfport->pmx = pinmux_get(&pdev->dev, NULL);
- ret = IS_ERR(sirfport->pmx);
+ sirfport->p = pinctrl_get_select_default(&pdev->dev);
+ ret = IS_ERR(sirfport->p);
if (ret)
- goto pmx_err;
-
- pinmux_enable(sirfport->pmx);
+ goto pin_err;
}
port->ops = &sirfsoc_uart_ops;
@@ -695,11 +693,9 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
port_err:
platform_set_drvdata(pdev, NULL);
- if (sirfport->hw_flow_ctrl) {
- pinmux_disable(sirfport->pmx);
- pinmux_put(sirfport->pmx);
- }
-pmx_err:
+ if (sirfport->hw_flow_ctrl)
+ pinctrl_put(sirfport->p);
+pin_err:
irq_err:
devm_iounmap(&pdev->dev, port->membase);
err:
@@ -711,10 +707,8 @@ static int sirfsoc_uart_remove(struct platform_device *pdev)
struct sirfsoc_uart_port *sirfport = platform_get_drvdata(pdev);
struct uart_port *port = &sirfport->port;
platform_set_drvdata(pdev, NULL);
- if (sirfport->hw_flow_ctrl) {
- pinmux_disable(sirfport->pmx);
- pinmux_put(sirfport->pmx);
- }
+ if (sirfport->hw_flow_ctrl)
+ pinctrl_put(sirfport->p);
devm_iounmap(&pdev->dev, port->membase);
uart_remove_one_port(&sirfsoc_uart_drv, port);
return 0;
diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h
index fc64260fa93c..6e207fdc2fed 100644
--- a/drivers/tty/serial/sirfsoc_uart.h
+++ b/drivers/tty/serial/sirfsoc_uart.h
@@ -162,7 +162,7 @@ struct sirfsoc_uart_port {
unsigned char ms_enabled;
struct uart_port port;
- struct pinmux *pmx;
+ struct pinctrl *p;
};
/* Hardware Flow Control */