Skip to content

Commit d3cf8fd

Browse files
shcgitdavem330
authored andcommitted
net: cx89x0: Add DT support
Add DT support to the Cirrus Logic CS89x0 driver. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d9fa17e commit d3cf8fd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

drivers/net/ethernet/cirrus/cs89x0.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
#include <linux/errno.h>
5454
#include <linux/netdevice.h>
5555
#include <linux/etherdevice.h>
56+
#include <linux/of.h>
57+
#include <linux/of_device.h>
5658
#include <linux/platform_device.h>
5759
#include <linux/kernel.h>
5860
#include <linux/types.h>
@@ -1895,9 +1897,17 @@ static int cs89x0_platform_remove(struct platform_device *pdev)
18951897
return 0;
18961898
}
18971899

1900+
static const struct __maybe_unused of_device_id cs89x0_match[] = {
1901+
{ .compatible = "cirrus,cs8900", },
1902+
{ .compatible = "cirrus,cs8920", },
1903+
{ },
1904+
};
1905+
MODULE_DEVICE_TABLE(of, cs89x0_match);
1906+
18981907
static struct platform_driver cs89x0_driver = {
18991908
.driver = {
1900-
.name = DRV_NAME,
1909+
.name = DRV_NAME,
1910+
.of_match_table = of_match_ptr(cs89x0_match),
19011911
},
19021912
.remove = cs89x0_platform_remove,
19031913
};

0 commit comments

Comments
 (0)