aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hw_random.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-09-14 09:34:38 -0400
committerThomas Gleixner <tglx@linutronix.de>2014-09-14 09:35:36 -0400
commitdb985cbd67c45f875ef43cb5febfaa8cbd203c27 (patch)
tree63542d05b1c0f730ec1ad5f915dc4eb3c015e616 /include/linux/hw_random.h
parentc6f1224573c3b609bd8073b39f496637a16cc06f (diff)
parent468a903c0e5147e3f93187f0b808a3ef957fd00e (diff)
Merge tag 'irqchip-core-3.18' of git://git.infradead.org/users/jcooper/linux into irq/core
irqchip core changes for v3.18 - renesas: suspend to RAM, runtime PM, cleanups and DT binding docs - keystone: add new driver - hip04: add Hisilicon HiP04 driver (without touching irq-gic.c) - gic: Use defines instead of magic number, preserve v2 bybass bits - handle_domain_irq: common low level interrupt entry handler
Diffstat (limited to 'include/linux/hw_random.h')
-rw-r--r--include/linux/hw_random.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
index b4b0eef5fddf..914bb08cd738 100644
--- a/include/linux/hw_random.h
+++ b/include/linux/hw_random.h
@@ -29,6 +29,8 @@
29 * @read: New API. drivers can fill up to max bytes of data 29 * @read: New API. drivers can fill up to max bytes of data
30 * into the buffer. The buffer is aligned for any type. 30 * into the buffer. The buffer is aligned for any type.
31 * @priv: Private data, for use by the RNG driver. 31 * @priv: Private data, for use by the RNG driver.
32 * @quality: Estimation of true entropy in RNG's bitstream
33 * (per mill).
32 */ 34 */
33struct hwrng { 35struct hwrng {
34 const char *name; 36 const char *name;
@@ -38,6 +40,7 @@ struct hwrng {
38 int (*data_read)(struct hwrng *rng, u32 *data); 40 int (*data_read)(struct hwrng *rng, u32 *data);
39 int (*read)(struct hwrng *rng, void *data, size_t max, bool wait); 41 int (*read)(struct hwrng *rng, void *data, size_t max, bool wait);
40 unsigned long priv; 42 unsigned long priv;
43 unsigned short quality;
41 44
42 /* internal. */ 45 /* internal. */
43 struct list_head list; 46 struct list_head list;
@@ -47,5 +50,7 @@ struct hwrng {
47extern int hwrng_register(struct hwrng *rng); 50extern int hwrng_register(struct hwrng *rng);
48/** Unregister a Hardware Random Number Generator driver. */ 51/** Unregister a Hardware Random Number Generator driver. */
49extern void hwrng_unregister(struct hwrng *rng); 52extern void hwrng_unregister(struct hwrng *rng);
53/** Feed random bits into the pool. */
54extern void add_hwgenerator_randomness(const char *buffer, size_t count, size_t entropy);
50 55
51#endif /* LINUX_HWRANDOM_H_ */ 56#endif /* LINUX_HWRANDOM_H_ */