devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5] net: ethernet: faraday: To support device tree usage.
@ 2017-05-17  7:28 Greentime Hu
  2017-05-18 14:11 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Greentime Hu @ 2017-05-17  7:28 UTC (permalink / raw)
  To: green.hu, netdev, devicetree, andrew, arnd, jiri, linux-kernel,
	f.fainelli, robh+dt, mark.rutland, davem

To support device tree usage for ftmac100.

Signed-off-by: Greentime Hu <green.hu@gmail.com>
---
Changes in v5:
  - Nothing changed in this patch and I have committed faraday,ftmac.txt.
Changes in v4:
  - Use the same binding document to describe the same faraday ethernet controller and add faraday to vendor-prefixes.txt.
Changes in v3:
  - Nothing changed in this patch but I have committed andestech to vendor-prefixes.txt.
Changes in v2:
  - Change atmac100_of_ids to ftmac100_of_ids
---
 drivers/net/ethernet/faraday/ftmac100.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
index 6ac336b..1536356 100644
--- a/drivers/net/ethernet/faraday/ftmac100.c
+++ b/drivers/net/ethernet/faraday/ftmac100.c
@@ -1174,11 +1174,17 @@ static int ftmac100_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id ftmac100_of_ids[] = {
+	{ .compatible = "andestech,atmac100" },
+	{ }
+};
+
 static struct platform_driver ftmac100_driver = {
 	.probe		= ftmac100_probe,
 	.remove		= ftmac100_remove,
 	.driver		= {
 		.name	= DRV_NAME,
+		.of_match_table = ftmac100_of_ids
 	},
 };
 
@@ -1202,3 +1208,4 @@ static void __exit ftmac100_exit(void)
 MODULE_AUTHOR("Po-Yu Chuang <ratbert@faraday-tech.com>");
 MODULE_DESCRIPTION("FTMAC100 driver");
 MODULE_LICENSE("GPL");
+MODULE_DEVICE_TABLE(of, ftmac100_of_ids);
-- 
1.7.9.5

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

* Re: [PATCH v5] net: ethernet: faraday: To support device tree usage.
  2017-05-17  7:28 [PATCH v5] net: ethernet: faraday: To support device tree usage Greentime Hu
@ 2017-05-18 14:11 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-05-18 14:11 UTC (permalink / raw)
  To: green.hu-Re5JQEeQqe8AvxtiuMwx3w
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
	andrew-g2DYL2Zd6BY, arnd-r2nGTMty4D4, jiri-rHqAuBHg3fBzbRFIqnYvSA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	f.fainelli-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8

From: Greentime Hu <green.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 17 May 2017 15:28:19 +0800

> To support device tree usage for ftmac100.
> 
> Signed-off-by: Greentime Hu <green.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-05-18 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-17  7:28 [PATCH v5] net: ethernet: faraday: To support device tree usage Greentime Hu
2017-05-18 14:11 ` David Miller

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).