From cfc03ba555a4a828d650e560b4b13e42665de77c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 4 Aug 2014 20:09:41 +0200 Subject: [PATCH 1/5] Add of_match_table section for ti,tps6586x-rtc driver --- drivers/rtc/rtc-tps6586x.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index 426901c..fc8af05 100644 --- a/drivers/rtc/rtc-tps6586x.c +++ b/drivers/rtc/rtc-tps6586x.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -247,6 +248,14 @@ static irqreturn_t tps6586x_rtc_irq(int irq, void *data) return IRQ_HANDLED; } +#ifdef CONFIG_OF +static const struct of_device_id tps6586x_rtc_dt_match[] = { + { .compatible = "ti,tps6586x-rtc", }, + {} +}; +MODULE_DEVICE_TABLE(of, tps6586x_rtc_dt_match); +#endif + static int tps6586x_rtc_probe(struct platform_device *pdev) { struct device *tps_dev = to_tps6586x_dev(&pdev->dev); @@ -338,6 +347,7 @@ static struct platform_driver tps6586x_rtc_driver = { .driver = { .name = "tps6586x-rtc", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(tps6586x_rtc_dt_match), .pm = &tps6586x_pm_ops, }, .probe = tps6586x_rtc_probe, -- 1.8.3.1 From edf63fdece0c2e64dc5e2b821a0108d97f259262 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 4 Aug 2014 20:32:59 +0200 Subject: [PATCH 2/5] Add of_match_table section for ti,tps65910-rtc driver --- drivers/rtc/rtc-tps65910.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 7af0020..7439480 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -221,6 +222,14 @@ static const struct rtc_class_ops tps65910_rtc_ops = { .alarm_irq_enable = tps65910_rtc_alarm_irq_enable, }; +#ifdef CONFIG_OF +static const struct of_device_id tps65910_rtc_dt_match[] = { + { .compatible = "ti,tps65910-rtc", }, + {} +}; +MODULE_DEVICE_TABLE(of, tps65910_rtc_dt_match); +#endif + static int tps65910_rtc_probe(struct platform_device *pdev) { struct tps65910 *tps65910 = NULL; @@ -327,6 +336,7 @@ static struct platform_driver tps65910_rtc_driver = { .remove = tps65910_rtc_remove, .driver = { .owner = THIS_MODULE, + .of_match_table = of_match_ptr(tps65910_rtc_dt_match), .name = "tps65910-rtc", .pm = &tps65910_rtc_pm_ops, }, -- 1.8.3.1 From 61234bcffd07424d64a01bcf352f4454203bcdd9 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 4 Aug 2014 22:33:44 +0200 Subject: [PATCH 3/5] Add of_match_table section for emmicro,em3027 driver --- drivers/rtc/rtc-em3027.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-em3027.c b/drivers/rtc/rtc-em3027.c index fccf366..3528eac 100644 --- a/drivers/rtc/rtc-em3027.c +++ b/drivers/rtc/rtc-em3027.c @@ -15,6 +15,7 @@ #include #include #include +#include /* Registers */ #define EM3027_REG_ON_OFF_CTRL 0x00 @@ -113,6 +114,14 @@ static const struct rtc_class_ops em3027_rtc_ops = { .set_time = em3027_set_time, }; +#ifdef CONFIG_OF +static const struct of_device_id of_em3027_rtc_match[] = { + { .compatible = "emmicro,em3027", }, + {} +}; +MODULE_DEVICE_TABLE(of, of_em3027_rtc_match); +#endif + static int em3027_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -138,7 +147,9 @@ static struct i2c_device_id em3027_id[] = { static struct i2c_driver em3027_driver = { .driver = { - .name = "rtc-em3027", + .name = "rtc-em3027", + .owner = THIS_MODULE, + .of_match_table = of_match_ptr(of_em3027_rtc_match), }, .probe = &em3027_probe, .id_table = em3027_id, -- 1.8.3.1 From f7bea871337e14efdd55b11f9721492ada5655b0 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 4 Aug 2014 22:39:04 +0200 Subject: [PATCH 4/5] Add of_match_table section for ti,tps80031-rtc driver --- drivers/rtc/rtc-tps80031.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/rtc/rtc-tps80031.c b/drivers/rtc/rtc-tps80031.c index 3e400dc..4a190c2 100644 --- a/drivers/rtc/rtc-tps80031.c +++ b/drivers/rtc/rtc-tps80031.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -233,6 +234,14 @@ static const struct rtc_class_ops tps80031_rtc_ops = { .alarm_irq_enable = tps80031_rtc_alarm_irq_enable, }; +#ifdef CONFIG_OF +static const struct of_device_id tps80031_rtc_dt_match[] = { + { .compatible = "ti,tps80031-rtc", }, + {} +}; +MODULE_DEVICE_TABLE(of, tps80031_rtc_dt_match); +#endif + static int tps80031_rtc_probe(struct platform_device *pdev) { struct tps80031_rtc *rtc; @@ -325,6 +334,7 @@ static struct platform_driver tps80031_rtc_driver = { .driver = { .name = "tps80031-rtc", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(tps80031_rtc_dt_match), .pm = &tps80031_pm_ops, }, .probe = tps80031_rtc_probe, -- 1.8.3.1 From 43d7ad405857e1a838cbaf1caee3e28f8b55e0be Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 5 Aug 2014 10:21:46 +0200 Subject: [PATCH 5/5] Add of_match_table section for ams,as3722-rtc driver --- drivers/rtc/rtc-as3722.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/rtc/rtc-as3722.c b/drivers/rtc/rtc-as3722.c index 9f38eda..8dbd3bc 100644 --- a/drivers/rtc/rtc-as3722.c +++ b/drivers/rtc/rtc-as3722.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -173,6 +174,14 @@ static const struct rtc_class_ops as3722_rtc_ops = { .alarm_irq_enable = as3722_rtc_alarm_irq_enable, }; +#ifdef CONFIG_OF +static const struct of_device_id as3722_rtc_dt_match[] = { + { .compatible = "ams,as3722-rtc", }, + {} +}; +MODULE_DEVICE_TABLE(of, as3722_rtc_dt_match); +#endif + static int as3722_rtc_probe(struct platform_device *pdev) { struct as3722 *as3722 = dev_get_drvdata(pdev->dev.parent); @@ -249,6 +258,8 @@ static struct platform_driver as3722_rtc_driver = { .probe = as3722_rtc_probe, .driver = { .name = "as3722-rtc", + .owner = THIS_MODULE, + .of_match_table = of_match_ptr(as3722_rtc_dt_match), .pm = &as3722_rtc_pm_ops, }, }; -- 1.8.3.1