summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/atmel-rng.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2014-11-20 10:43:23 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2014-11-20 22:39:41 +0800
commit4951db7edc9460e5102b9c00b67ceddb09dfbe4c (patch)
tree5b535572fef788c28bc4cb12871f5ef61014c93f /drivers/char/hw_random/atmel-rng.c
parent21961efa1381053633aed190fdaac21481fb6c12 (diff)
downloadlinux-stable-4951db7edc9460e5102b9c00b67ceddb09dfbe4c.tar.gz
linux-stable-4951db7edc9460e5102b9c00b67ceddb09dfbe4c.tar.bz2
linux-stable-4951db7edc9460e5102b9c00b67ceddb09dfbe4c.zip
hwrng: atmel - add DT support
Add DT support. Make the driver depend on CONFIG_OF as at91sam9g45 was the only SoC making use of the TRNG block and this SoC is now fully migrated to DT. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Peter Korsgaard <peter@korsgaard.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random/atmel-rng.c')
-rw-r--r--drivers/char/hw_random/atmel-rng.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index 644ec4882206..0bb0b2120a63 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -123,6 +123,12 @@ static const struct dev_pm_ops atmel_trng_pm_ops = {
};
#endif /* CONFIG_PM */
+static const struct of_device_id atmel_trng_dt_ids[] = {
+ { .compatible = "atmel,at91sam9g45-trng" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, atmel_trng_dt_ids);
+
static struct platform_driver atmel_trng_driver = {
.probe = atmel_trng_probe,
.remove = atmel_trng_remove,
@@ -132,6 +138,7 @@ static struct platform_driver atmel_trng_driver = {
#ifdef CONFIG_PM
.pm = &atmel_trng_pm_ops,
#endif /* CONFIG_PM */
+ .of_match_table = atmel_trng_dt_ids,
},
};