diff --git a/spi/pn5180.c b/spi/pn5180.c index 17f27ac53..a370ce8b1 100644 --- a/spi/pn5180.c +++ b/spi/pn5180.c @@ -47,14 +47,29 @@ int CHIP_remove(struct spi_device *spi) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id CHIP_of_match[] = { + { .compatible = "nxp,pn5180", }, + { } +}; + +MODULE_DEVICE_TABLE(of, CHIP_of_match); +#endif // CONFIG_OF + static struct spi_driver CHIP_driver = { .driver = { - .name = "CHIP", - .owner = THIS_MODULE, + .name = "CHIP", + .owner = THIS_MODULE, +#ifdef CONFIG_OF + .of_match_table = CHIP_of_match, +#endif // CONFIG_OF }, - - .probe = CHIP_probe, - .remove = CHIP_remove, + .probe = CHIP_probe, + .remove = CHIP_remove, }; module_spi_driver(CHIP_driver); + +MODULE_AUTHOR("Gao yang "); +MODULE_DESCRIPTION("NXP PN5180 NFC driver"); +MODULE_LICENSE("GPL");