Skip to content

Commit

Permalink
tty: atmel_serial: add pinctrl support
Browse files Browse the repository at this point in the history
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD committed Oct 13, 2012
1 parent ec6754a commit 784557d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/tty/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/atmel_pdc.h>
#include <linux/atmel_serial.h>
#include <linux/uaccess.h>
#include <linux/pinctrl/consumer.h>

#include <asm/io.h>
#include <asm/ioctls.h>
Expand Down Expand Up @@ -1773,6 +1774,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
struct atmel_uart_data *pdata = pdev->dev.platform_data;
void *data;
int ret = -ENODEV;
struct pinctrl *pinctrl;

BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));

Expand Down Expand Up @@ -1805,6 +1807,12 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)

atmel_init_port(port, pdev);

pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl)) {
ret = PTR_ERR(pinctrl);
goto err;
}

if (!atmel_use_dma_rx(&port->uart)) {
ret = -ENOMEM;
data = kmalloc(sizeof(struct atmel_uart_char)
Expand Down

0 comments on commit 784557d

Please sign in to comment.