Re: [PATCH] serial/sirf: fixup for changes to pin control

From: Barry Song
Date: Wed Feb 22 2012 - 04:15:20 EST


2012/2/17 Linus Walleij <linus.walleij@xxxxxxxxxx>:
> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Acked-by: Barry Song <Baohua.Song@xxxxxxx>

> ---
> Âdrivers/tty/serial/sirfsoc_uart.c | Â 20 ++++++++++----------
> Âdrivers/tty/serial/sirfsoc_uart.h | Â Â2 +-
> Â2 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
> index a60523f..c1a871e 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,12 @@ 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(&pdev->dev, NULL);
> + Â Â Â Â Â Â Â ret = IS_ERR(sirfport->p);
> Â Â Â Â Â Â Â Âif (ret)
> - Â Â Â Â Â Â Â Â Â Â Â goto pmx_err;
> + Â Â Â Â Â Â Â Â Â Â Â goto pin_err;
>
> - Â Â Â Â Â Â Â pinmux_enable(sirfport->pmx);
> + Â Â Â Â Â Â Â pinctrl_enable(sirfport->p);
> Â Â Â Â}
>
> Â Â Â Âport->ops = &sirfsoc_uart_ops;
> @@ -696,10 +696,10 @@ 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);
> + Â Â Â Â Â Â Â pinctrl_disable(sirfport->p);
> + Â Â Â Â Â Â Â pinctrl_put(sirfport->p);
> Â Â Â Â}
> -pmx_err:
> +pin_err:
> Âirq_err:
> Â Â Â Âdevm_iounmap(&pdev->dev, port->membase);
> Âerr:
> @@ -712,8 +712,8 @@ static int sirfsoc_uart_remove(struct platform_device *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);
> + Â Â Â Â Â Â Â pinctrl_disable(sirfport->p);
> + Â Â Â Â Â Â Â pinctrl_put(sirfport->p);
> Â Â Â Â}
> Â Â Â Âdevm_iounmap(&pdev->dev, port->membase);
> Â Â Â Âuart_remove_one_port(&sirfsoc_uart_drv, port);
> diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h
> index fc64260..6e207fd 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 */
> --
> 1.7.7.6
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/