Skip to content

Commit

Permalink
ixp4xx_eth: Probe the PTP module from the device tree
Browse files Browse the repository at this point in the history
This adds device tree probing support for the PTP module
adjacent to the ethernet module. It is pretty straight
forward, all resources are in the device tree as they
come to the platform device.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
linusw authored and davem330 committed Aug 30, 2021
1 parent 323fb75 commit e9e5062
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions drivers/net/ethernet/xscale/ptp_ixp46x.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
#include <linux/device.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
Expand Down Expand Up @@ -311,9 +312,19 @@ static int ptp_ixp_probe(struct platform_device *pdev)
return 0;
}

static const struct of_device_id ptp_ixp_match[] = {
{
.compatible = "intel,ixp46x-ptp-timer",
},
{ },
};

static struct platform_driver ptp_ixp_driver = {
.driver.name = "ptp-ixp46x",
.driver.suppress_bind_attrs = true,
.driver = {
.name = "ptp-ixp46x",
.of_match_table = ptp_ixp_match,
.suppress_bind_attrs = true,
},
.probe = ptp_ixp_probe,
};
module_platform_driver(ptp_ixp_driver);
Expand Down

0 comments on commit e9e5062

Please sign in to comment.