devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] tty: serial: altera_jtaguart: Add device tree support
       [not found] <cover.1297974227.git.tklauser@distanz.ch>
@ 2011-02-17 20:30 ` Tobias Klauser
  2011-02-18  7:54   ` [PATCH 5/5 v2] " Tobias Klauser
       [not found]   ` <c28550ba11ed228f4137ced1ab34761c08ad38ad.1297974227.git.tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Tobias Klauser @ 2011-02-17 20:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Grant Likely, linux-serial,
	devicetree-discuss
  Cc: nios2-dev

Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 .../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
@@ -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..d0f8779 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 5/5 v2] tty: serial: altera_jtaguart: Add device tree support
  2011-02-17 20:30 ` [PATCH 5/5] tty: serial: altera_jtaguart: Add device tree support Tobias Klauser
@ 2011-02-18  7:54   ` Tobias Klauser
  2011-02-18  7:59     ` Grant Likely
       [not found]   ` <c28550ba11ed228f4137ced1ab34761c08ad38ad.1297974227.git.tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Tobias Klauser @ 2011-02-18  7:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Grant Likely, linux-serial,
	devicetree-discuss
  Cc: nios2-dev

Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 .../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
@@ -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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 5/5 v2] tty: serial: altera_jtaguart: Add device tree support
  2011-02-18  7:54   ` [PATCH 5/5 v2] " Tobias Klauser
@ 2011-02-18  7:59     ` Grant Likely
  0 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2011-02-18  7:59 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Greg Kroah-Hartman, linux-serial, devicetree-discuss, nios2-dev

On Fri, Feb 18, 2011 at 12:54 AM, Tobias Klauser <tklauser@distanz.ch> wrote:
> Advertise the possibility to use this driver with device tree if
> CONFIG_OF is set.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  .../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@secretlab.ca>

> @@ -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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 5/5 v3] tty: serial: altera_jtaguart: Add device tree support
       [not found]   ` <c28550ba11ed228f4137ced1ab34761c08ad38ad.1297974227.git.tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
@ 2011-02-18  8:10     ` Tobias Klauser
  2011-02-28  8:26       ` Grant Likely
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Klauser @ 2011-02-18  8:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Grant Likely,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: nios2-dev-1eJk0qcHJCcaeqlQEoCUNoJY59XmG8rH

Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
---
v3:
 - put device tree binding documentation in the correct place (thanks Grant
   Likely)
v2:
 - add missing semicolon after definition of altera_jtaguart_match

 .../devicetree/bindings/serial/altera_jtaguart.txt |    4 ++++
 drivers/tty/serial/altera_jtaguart.c               |   15 +++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/altera_jtaguart.txt

diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
new file mode 100644
index 0000000..c152f65
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
@@ -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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 5/5 v3] tty: serial: altera_jtaguart: Add device tree support
  2011-02-18  8:10     ` [PATCH 5/5 v3] " Tobias Klauser
@ 2011-02-28  8:26       ` Grant Likely
  0 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2011-02-28  8:26 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Greg Kroah-Hartman, linux-serial, devicetree-discuss, nios2-dev

On Fri, Feb 18, 2011 at 09:10:01AM +0100, Tobias Klauser wrote:
> Advertise the possibility to use this driver with device tree if
> CONFIG_OF is set.
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Applied, thanks.

g.

> ---
> v3:
>  - put device tree binding documentation in the correct place (thanks Grant
>    Likely)
> v2:
>  - add missing semicolon after definition of altera_jtaguart_match
> 
>  .../devicetree/bindings/serial/altera_jtaguart.txt |    4 ++++
>  drivers/tty/serial/altera_jtaguart.c               |   15 +++++++++++++--
>  2 files changed, 17 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/serial/altera_jtaguart.txt
> 
> diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
> new file mode 100644
> index 0000000..c152f65
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
> @@ -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
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-28  8:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1297974227.git.tklauser@distanz.ch>
2011-02-17 20:30 ` [PATCH 5/5] tty: serial: altera_jtaguart: Add device tree support Tobias Klauser
2011-02-18  7:54   ` [PATCH 5/5 v2] " Tobias Klauser
2011-02-18  7:59     ` Grant Likely
     [not found]   ` <c28550ba11ed228f4137ced1ab34761c08ad38ad.1297974227.git.tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
2011-02-18  8:10     ` [PATCH 5/5 v3] " Tobias Klauser
2011-02-28  8:26       ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).