diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2014-11-20 10:43:23 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-11-20 15:39:41 +0100 |
commit | 4951db7edc9460e5102b9c00b67ceddb09dfbe4c (patch) | |
tree | 5b535572fef788c28bc4cb12871f5ef61014c93f /drivers/char/hw_random/atmel-rng.c | |
parent | hwrng: atmel - use clk_prepapre_enable/_disable_unprepare (diff) | |
download | linux-4951db7edc9460e5102b9c00b67ceddb09dfbe4c.tar.xz linux-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.c | 7 |
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, }, }; |