diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-03-19 08:40:14 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-04 10:07:08 +0200 |
commit | 6875404fdb44f5353ef374c7c95c7701862fe2b3 (patch) | |
tree | 4c73cd84dd33bddcb862c4e380848bd3c85820cc /drivers/rtc | |
parent | 87b7cbbc704ded68183e13e9382455e10e5c0e8e (diff) | |
download | linux-stable-6875404fdb44f5353ef374c7c95c7701862fe2b3.tar.gz linux-stable-6875404fdb44f5353ef374c7c95c7701862fe2b3.tar.bz2 linux-stable-6875404fdb44f5353ef374c7c95c7701862fe2b3.zip |
rtc: x1205: Add DT probing support
This makes it possible to probe the X1205 RTC from the
device tree. This is needed when adding device tree boot
support for the IXP4xx-based NSLU2 which has this RTC.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-x1205.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c index f08f18e4fcdf..ad2ae2f0536e 100644 --- a/drivers/rtc/rtc-x1205.c +++ b/drivers/rtc/rtc-x1205.c @@ -673,9 +673,16 @@ static const struct i2c_device_id x1205_id[] = { }; MODULE_DEVICE_TABLE(i2c, x1205_id); +static const struct of_device_id x1205_dt_ids[] = { + { .compatible = "xircom,x1205", }, + {}, +}; +MODULE_DEVICE_TABLE(of, x1205_dt_ids); + static struct i2c_driver x1205_driver = { .driver = { .name = "rtc-x1205", + .of_match_table = x1205_dt_ids, }, .probe = x1205_probe, .remove = x1205_remove, |