drivers/rtc/rtc-pcf8563.c: add device tree support
Set the of_match_table for this driver so that devices can be described in the device tree. Signed-off-by: Nick Bowler <nbowler@elliptictech.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0a25bf40d8
commit
8dccaf0607
|
@ -19,6 +19,7 @@
|
||||||
#include <linux/rtc.h>
|
#include <linux/rtc.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
|
||||||
#define DRV_VERSION "0.4.3"
|
#define DRV_VERSION "0.4.3"
|
||||||
|
|
||||||
|
@ -285,10 +286,19 @@ static const struct i2c_device_id pcf8563_id[] = {
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, pcf8563_id);
|
MODULE_DEVICE_TABLE(i2c, pcf8563_id);
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
static const struct of_device_id pcf8563_of_match[] __devinitconst = {
|
||||||
|
{ .compatible = "nxp,pcf8563" },
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, pcf8563_of_match);
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct i2c_driver pcf8563_driver = {
|
static struct i2c_driver pcf8563_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "rtc-pcf8563",
|
.name = "rtc-pcf8563",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
.of_match_table = of_match_ptr(pcf8563_of_match),
|
||||||
},
|
},
|
||||||
.probe = pcf8563_probe,
|
.probe = pcf8563_probe,
|
||||||
.remove = pcf8563_remove,
|
.remove = pcf8563_remove,
|
||||||
|
|
Loading…
Reference in a new issue