aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/hw_random/pic32-rng.c
AgeCommit message (Collapse)AuthorFilesLines
2023-08-04hwrng: Explicitly include correct DT includesRob Herring1-3/+2
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2023-07-20hwrng: pic32 - enable TRNG only while it's usedMartin Kaiser1-22/+19
The probe function enables the TRNG hardware before registering the driver. If registration fails, probe returns an error, but the TRNG remains enabled. Define init and cleanup functions, enable and disable the hardware there. Signed-off-by: Martin Kaiser <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2023-07-20hwrng: pic32 - remove unused definesMartin Kaiser1-10/+3
Remove some unused defines and fix the indentation. Signed-off-by: Martin Kaiser <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2023-07-20hwrng: pic32 - use devm_clk_get_enabledMartin Kaiser1-14/+5
Use devm_clk_get_enabled in the pic32 driver. Ensure that the clock is enabled as long as the driver is registered with the hwrng core. Fixes: 7ea39973d1e5 ("hwrng: pic32 - Use device-managed registration API") Signed-off-by: Martin Kaiser <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2021-03-13hwrng: pic32 - Use device-managed registration APITian Tao1-2/+1
Use devm_hwrng_register to get rid of manual unregistration. Signed-off-by: Tian Tao <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2020-07-09hwrng: pic32 - Fix W=1 unused variable warningHerbert Xu1-1/+1
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu <[email protected]>
2019-10-26hwrng: pic32 - use devm_platform_ioremap_resource() to simplify codeYueHaibing1-3/+1
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 445Thomas Gleixner1-9/+1
Based on 1 normalized pattern(s): this program is free software you can distribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 24 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Armijn Hemel <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-21hwrng: Make explicit that max >= 32 alwaysPrasannaKumar Muralidharan1-3/+0
As hw_random core calls ->read with max > 32 or more, make it explicit. Also remove checks involving 'max' being less than 8. Signed-off-by: PrasannaKumar Muralidharan <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2016-08-16hwrng: pic32 - Delete unnecessary assignment for the field "owner"Markus Elfring1-1/+0
The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2016-02-17hwrng: pic32 - Add PIC32 RNG hardware driverJoshua Henderson1-0/+155
Add support for the hardware true random number generator peripheral found on PIC32. Signed-off-by: Joshua Henderson <[email protected]> Signed-off-by: Purna Chandra Mandal <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Herbert Xu <[email protected]>