Re: [PATCH 5/5 v2] tty: serial: altera_jtaguart: Add device tree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 18, 2011 at 12:54 AM, Tobias Klauser <tklauser@xxxxxxxxxx> wrote:
> Advertise the possibility to use this driver with device tree if
> CONFIG_OF is set.
>
> Signed-off-by: Tobias Klauser <tklauser@xxxxxxxxxx>
> ---
>  .../devicetree/bindings/altera_jtaguart.txt        |    4 ++++
>  drivers/tty/serial/altera_jtaguart.c               |   15 +++++++++++++--
>  2 files changed, 17 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/altera_jtaguart.txt
>
> diff --git a/Documentation/devicetree/bindings/altera_jtaguart.txt b/Documentation/devicetree/bindings/altera_jtaguart.txt
> new file mode 100644
> index 0000000..c152f65
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/altera_jtaguart.txt

This should be in
Documentation/devicetree/bindings/serial/altera_jtaguart.txt, but
otherwise:

Acked-by: Grant Likely <grant.likely@xxxxxxxxxxxx>

> @@ -0,0 +1,4 @@
> +Altera JTAG UART
> +
> +Required properties:
> +- compatible : should be "ALTR,juart-1.0"
> diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
> index 8f014bb..60e049b 100644
> --- a/drivers/tty/serial/altera_jtaguart.c
> +++ b/drivers/tty/serial/altera_jtaguart.c
> @@ -466,12 +466,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
>        return 0;
>  }
>
> +#ifdef CONFIG_OF
> +static struct of_device_id altera_jtaguart_match[] = {
> +       { .compatible = "ALTR,juart-1.0", },
> +       {},
> +};
> +MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
> +#else
> +#define altera_jtaguart_match NULL
> +#endif /* CONFIG_OF */
> +
>  static struct platform_driver altera_jtaguart_platform_driver = {
>        .probe  = altera_jtaguart_probe,
>        .remove = __devexit_p(altera_jtaguart_remove),
>        .driver = {
> -               .name   = DRV_NAME,
> -               .owner  = THIS_MODULE,
> +               .name           = DRV_NAME,
> +               .owner          = THIS_MODULE,
> +               .of_match_table = altera_jtaguart_match,
>        },
>  };
>
> --
> 1.7.0.4
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux