net: ethernet: faraday: To support device tree usage.
Subsystems (3)
PATCH v4 1/1 net: ethernet: faraday: To support device tree usage.
---
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
---
.../net/{moxa,moxart-mac.txt => faraday,ftmac.txt} | 7 +++++--
.../devicetree/bindings/vendor-prefixes.txt | 1 +
drivers/net/ethernet/faraday/ftmac100.c | 7 +++++++
3 files changed, 13 insertions(+), 2 deletions(-)
rename Documentation/devicetree/bindings/net/{moxa,moxart-mac.txt => faraday,ftmac.txt} (68%)Documentation/devicetree/bindings/net/faraday,ftmac.txt renamed from Documentation/devicetree/bindings/net/moxa,moxart-mac.txt +5 -2
@@ -1,8 +1,11 @@ -MOXA ART Ethernet Controller +Faraday Ethernet Controller Required properties: -- compatible : Must be "moxa,moxart-mac" +- compatible : Must contain "faraday,ftmac", as well as one of + the SoC specific identifiers: + "andestech,atmac100" + "moxa,moxart-mac" - reg : Should contain register location and length - interrupts : Should contain the mac interrupt number
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -102,6 +102,7 @@ everest Everest Semiconductor Co. Ltd. everspin Everspin Technologies, Inc. excito Excito ezchip EZchip Semiconductor +faraday Faraday Technology Corporation fcs Fairchild Semiconductor firefly Firefly focaltech FocalTech Systems Co.,Ltd
drivers/net/ethernet/faraday/ftmac100.c +7 -0
@@ -1172,11 +1172,17 @@ static int __exit 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 =__exit_p (ftmac100_remove), .driver = { .name =DRV_NAME , + .of_match_table = ftmac100_of_ids }, };
@@ -1200,3 +1206,4 @@ static void __exit ftmac100_exit(void)MODULE_AUTHOR ("Po-Yu Chuang <[email protected]>" );MODULE_DESCRIPTION ("FTMAC100 driver" );MODULE_LICENSE ("GPL" ); +MODULE_DEVICE_TABLE (of, ftmac100_of_ids);
Signature · 1 line
1.7.9.5
Quoted 9 lines · CET Greentime Hu
Signed-off-by Greentime Hu <[email protected]>---
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:
- Changeatmac100_of_idstoftmac100_of_ids
The patch looks good to me now, but please add a proper commit log before your Signed-off-by tag.
Arnd