Commit 5c9bdc3f authored by Linus Walleij's avatar Linus Walleij

serial/sirf: fixup for changes to pin control

We changed the signature of the pin multiplexing functions to
handle any pin business, so fix up the Sirf driver to call this
new interface and rename some variables to make the semantics
understandable.

Cc: linux-serial@vger.kernel.org
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: default avatarBarry Song <Baohua.Song@csr.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 77a59883
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <linux/pinctrl/pinmux.h> #include <linux/pinctrl/consumer.h>
#include "sirfsoc_uart.h" #include "sirfsoc_uart.h"
...@@ -673,12 +673,12 @@ int sirfsoc_uart_probe(struct platform_device *pdev) ...@@ -673,12 +673,12 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
port->irq = res->start; port->irq = res->start;
if (sirfport->hw_flow_ctrl) { if (sirfport->hw_flow_ctrl) {
sirfport->pmx = pinmux_get(&pdev->dev, NULL); sirfport->p = pinctrl_get(&pdev->dev, NULL);
ret = IS_ERR(sirfport->pmx); ret = IS_ERR(sirfport->p);
if (ret) if (ret)
goto pmx_err; goto pin_err;
pinmux_enable(sirfport->pmx); pinctrl_enable(sirfport->p);
} }
port->ops = &sirfsoc_uart_ops; port->ops = &sirfsoc_uart_ops;
...@@ -696,10 +696,10 @@ int sirfsoc_uart_probe(struct platform_device *pdev) ...@@ -696,10 +696,10 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
port_err: port_err:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
if (sirfport->hw_flow_ctrl) { if (sirfport->hw_flow_ctrl) {
pinmux_disable(sirfport->pmx); pinctrl_disable(sirfport->p);
pinmux_put(sirfport->pmx); pinctrl_put(sirfport->p);
} }
pmx_err: pin_err:
irq_err: irq_err:
devm_iounmap(&pdev->dev, port->membase); devm_iounmap(&pdev->dev, port->membase);
err: err:
...@@ -712,8 +712,8 @@ static int sirfsoc_uart_remove(struct platform_device *pdev) ...@@ -712,8 +712,8 @@ static int sirfsoc_uart_remove(struct platform_device *pdev)
struct uart_port *port = &sirfport->port; struct uart_port *port = &sirfport->port;
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
if (sirfport->hw_flow_ctrl) { if (sirfport->hw_flow_ctrl) {
pinmux_disable(sirfport->pmx); pinctrl_disable(sirfport->p);
pinmux_put(sirfport->pmx); pinctrl_put(sirfport->p);
} }
devm_iounmap(&pdev->dev, port->membase); devm_iounmap(&pdev->dev, port->membase);
uart_remove_one_port(&sirfsoc_uart_drv, port); uart_remove_one_port(&sirfsoc_uart_drv, port);
......
...@@ -162,7 +162,7 @@ struct sirfsoc_uart_port { ...@@ -162,7 +162,7 @@ struct sirfsoc_uart_port {
unsigned char ms_enabled; unsigned char ms_enabled;
struct uart_port port; struct uart_port port;
struct pinmux *pmx; struct pinctrl *p;
}; };
/* Hardware Flow Control */ /* Hardware Flow Control */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment