aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 14:48:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 14:48:03 -0400
commit3dbde57ad941c55345fd7fac0ee3f70f204b02d8 (patch)
tree237c6de64d05da3f61b9ac1724e37a5c1f014b71 /drivers/tty
parenta6e6d863cf68bba886acfe47dbdc8f245cce588f (diff)
parent2207a4e1ca6a1bb126360b6d0c236af6664532f2 (diff)
Merge tag 'pinctrl-for-v3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control changes from Linus Walleij: - A large slew of improvements of the Genric pin configuration support, and deployment in four different platforms: Rockchip, Super-H PFC, ABx500 and TZ1090. Support BIAS_BUS_HOLD, get device tree parsing and debugfs support into shape. - We also have device tree support with generic naming conventions for the generic pin configuration. - Delete the unused and confusing direct pinconf API. Now state transitions is *the* way to control pins and multiplexing. - New drivers for Rockchip, TZ1090, and TZ1090 PDC. - Two pin control states related to power management are now handled in the device core: "sleep" and "idle", removing a lot of boilerplate code in drivers. We do not yet know if this is the final word for pin PM, but it already make things a lot easier to handle. - Handle sparse GPIO ranges passing a list of disparate pins, and utilize these in the new BayTrail (x86 Atom SoC) driver. - Make the sunxi (AllWinner) driver handle external interrupts. - Make it possible for pinctrl-single to handle the case where several pins are managed by a single register, and augment it to handle sleep modes. - Cleanups and improvements for the abx500 drivers. - Move Sirf pin control drivers to their own directory, support save/restore of context and add support for the SiRFatlas6 SoC. - PMU muxing for the Dove pinctrl driver. - Finalization and support for VF610 in the i.MX6 pinctrl driver. - Smoothen out various Exynos rough edges. - Generic cleanups of various kinds. * tag 'pinctrl-for-v3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (82 commits) pinctrl: vt8500: wmt: remove redundant dev_err call in wmt_pinctrl_probe() pinctrl: remove bindings for pinconf options needing more thought pinctrl: remove slew-rate parameter from tz1090 pinctrl: set unit for debounce time pinconfig to usec pinctrl: more clarifications for generic pull configs pinctrl: rip out the direct pinconf API pinctrl-tz1090-pdc: add TZ1090 PDC pinctrl driver pinctrl-tz1090: add TZ1090 pinctrl driver pinctrl: samsung: Staticize drvdata_list pinctrl: rockchip: Add missing irq_gc_unlock() call before return error pinctrl: abx500: rework error path pinctrl: abx500: suppress hardcoded value pinctrl: abx500: factorize code pinctrl: abx500: fix abx500_gpio_get() pinctrl: abx500: fix abx500_pin_config_set() pinctrl: abx500: Add device tree support sh-pfc: Guard DT parsing with #ifdef CONFIG_OF pinctrl: add Intel BayTrail GPIO/pinctrl support pinctrl: fix pinconf_ops::pin_config_dbg_parse_modify kerneldoc pinctrl: Staticize local symbols ... Conflicts: drivers/net/ethernet/ti/davinci_mdio.c drivers/pinctrl/Makefile
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/amba-pl011.c42
1 files changed, 3 insertions, 39 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index ad41319d1d9b..28b35ad9c6cd 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -150,10 +150,6 @@ struct pl011_dmatx_data {
150struct uart_amba_port { 150struct uart_amba_port {
151 struct uart_port port; 151 struct uart_port port;
152 struct clk *clk; 152 struct clk *clk;
153 /* Two optional pin states - default & sleep */
154 struct pinctrl *pinctrl;
155 struct pinctrl_state *pins_default;
156 struct pinctrl_state *pins_sleep;
157 const struct vendor_data *vendor; 153 const struct vendor_data *vendor;
158 unsigned int dmacr; /* dma control reg */ 154 unsigned int dmacr; /* dma control reg */
159 unsigned int im; /* interrupt mask */ 155 unsigned int im; /* interrupt mask */
@@ -1479,12 +1475,7 @@ static int pl011_hwinit(struct uart_port *port)
1479 int retval; 1475 int retval;
1480 1476
1481 /* Optionaly enable pins to be muxed in and configured */ 1477 /* Optionaly enable pins to be muxed in and configured */
1482 if (!IS_ERR(uap->pins_default)) { 1478 pinctrl_pm_select_default_state(port->dev);
1483 retval = pinctrl_select_state(uap->pinctrl, uap->pins_default);
1484 if (retval)
1485 dev_err(port->dev,
1486 "could not set default pins\n");
1487 }
1488 1479
1489 /* 1480 /*
1490 * Try to enable the clock producer. 1481 * Try to enable the clock producer.
@@ -1610,7 +1601,6 @@ static void pl011_shutdown(struct uart_port *port)
1610{ 1601{
1611 struct uart_amba_port *uap = (struct uart_amba_port *)port; 1602 struct uart_amba_port *uap = (struct uart_amba_port *)port;
1612 unsigned int cr; 1603 unsigned int cr;
1613 int retval;
1614 1604
1615 /* 1605 /*
1616 * disable all interrupts 1606 * disable all interrupts
@@ -1653,13 +1643,7 @@ static void pl011_shutdown(struct uart_port *port)
1653 */ 1643 */
1654 clk_disable_unprepare(uap->clk); 1644 clk_disable_unprepare(uap->clk);
1655 /* Optionally let pins go into sleep states */ 1645 /* Optionally let pins go into sleep states */
1656 if (!IS_ERR(uap->pins_sleep)) { 1646 pinctrl_pm_select_sleep_state(port->dev);
1657 retval = pinctrl_select_state(uap->pinctrl, uap->pins_sleep);
1658 if (retval)
1659 dev_err(port->dev,
1660 "could not set pins to sleep state\n");
1661 }
1662
1663 1647
1664 if (uap->port.dev->platform_data) { 1648 if (uap->port.dev->platform_data) {
1665 struct amba_pl011_data *plat; 1649 struct amba_pl011_data *plat;
@@ -2012,12 +1996,7 @@ static int __init pl011_console_setup(struct console *co, char *options)
2012 return -ENODEV; 1996 return -ENODEV;
2013 1997
2014 /* Allow pins to be muxed in and configured */ 1998 /* Allow pins to be muxed in and configured */
2015 if (!IS_ERR(uap->pins_default)) { 1999 pinctrl_pm_select_default_state(uap->port.dev);
2016 ret = pinctrl_select_state(uap->pinctrl, uap->pins_default);
2017 if (ret)
2018 dev_err(uap->port.dev,
2019 "could not set default pins\n");
2020 }
2021 2000
2022 ret = clk_prepare(uap->clk); 2001 ret = clk_prepare(uap->clk);
2023 if (ret) 2002 if (ret)
@@ -2131,21 +2110,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
2131 goto out; 2110 goto out;
2132 } 2111 }
2133 2112
2134 uap->pinctrl = devm_pinctrl_get(&dev->dev);
2135 if (IS_ERR(uap->pinctrl)) {
2136 ret = PTR_ERR(uap->pinctrl);
2137 goto out;
2138 }
2139 uap->pins_default = pinctrl_lookup_state(uap->pinctrl,
2140 PINCTRL_STATE_DEFAULT);
2141 if (IS_ERR(uap->pins_default))
2142 dev_err(&dev->dev, "could not get default pinstate\n");
2143
2144 uap->pins_sleep = pinctrl_lookup_state(uap->pinctrl,
2145 PINCTRL_STATE_SLEEP);
2146 if (IS_ERR(uap->pins_sleep))
2147 dev_dbg(&dev->dev, "could not get sleep pinstate\n");
2148
2149 uap->clk = devm_clk_get(&dev->dev, NULL); 2113 uap->clk = devm_clk_get(&dev->dev, NULL);
2150 if (IS_ERR(uap->clk)) { 2114 if (IS_ERR(uap->clk)) {
2151 ret = PTR_ERR(uap->clk); 2115 ret = PTR_ERR(uap->clk);