aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Ham <bob.ham@collabora.com>2016-06-03 07:13:07 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2016-06-07 06:42:43 -0400
commitd3ede2dba3d800912523838a6db35d562e042101 (patch)
tree26515af1b6fb2c1fd4b6087729774d1acb826ca5
parent63044c4fd49f9e2ce8ee9c5ca24afe6ebbb9fb46 (diff)
hwrng: chaoskey - Add support for Araneus Alea I USB RNG
Adds support for the Araneus Alea I USB hardware Random Number Generator which is interfaced with in exactly the same way as the Altus Metrum ChaosKey. We just add the appropriate device ID and modify the config help text. Signed-off-by: Bob Ham <bob.ham@collabora.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/usb/misc/Kconfig11
-rw-r--r--drivers/usb/misc/chaoskey.c4
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
index e9e5ae521fa6..6e705971d637 100644
--- a/drivers/usb/misc/Kconfig
+++ b/drivers/usb/misc/Kconfig
@@ -260,11 +260,12 @@ config USB_CHAOSKEY
260 tristate "ChaosKey random number generator driver support" 260 tristate "ChaosKey random number generator driver support"
261 depends on HW_RANDOM 261 depends on HW_RANDOM
262 help 262 help
263 Say Y here if you want to connect an AltusMetrum ChaosKey to 263 Say Y here if you want to connect an AltusMetrum ChaosKey or
264 your computer's USB port. The ChaosKey is a hardware random 264 Araneus Alea I to your computer's USB port. These devices
265 number generator which hooks into the kernel entropy pool to 265 are hardware random number generators which hook into the
266 ensure a large supply of entropy for /dev/random and 266 kernel entropy pool to ensure a large supply of entropy for
267 /dev/urandom and also provides direct access via /dev/chaoskeyX 267 /dev/random and /dev/urandom and also provides direct access
268 via /dev/chaoskeyX
268 269
269 To compile this driver as a module, choose M here: the 270 To compile this driver as a module, choose M here: the
270 module will be called chaoskey. 271 module will be called chaoskey.
diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c
index 76350e4ee807..9aef46b3dfa8 100644
--- a/drivers/usb/misc/chaoskey.c
+++ b/drivers/usb/misc/chaoskey.c
@@ -55,6 +55,9 @@ MODULE_LICENSE("GPL");
55#define CHAOSKEY_VENDOR_ID 0x1d50 /* OpenMoko */ 55#define CHAOSKEY_VENDOR_ID 0x1d50 /* OpenMoko */
56#define CHAOSKEY_PRODUCT_ID 0x60c6 /* ChaosKey */ 56#define CHAOSKEY_PRODUCT_ID 0x60c6 /* ChaosKey */
57 57
58#define ALEA_VENDOR_ID 0x12d8 /* Araneus */
59#define ALEA_PRODUCT_ID 0x0001 /* Alea I */
60
58#define CHAOSKEY_BUF_LEN 64 /* max size of USB full speed packet */ 61#define CHAOSKEY_BUF_LEN 64 /* max size of USB full speed packet */
59 62
60#define NAK_TIMEOUT (HZ) /* stall/wait timeout for device */ 63#define NAK_TIMEOUT (HZ) /* stall/wait timeout for device */
@@ -69,6 +72,7 @@ MODULE_LICENSE("GPL");
69 72
70static const struct usb_device_id chaoskey_table[] = { 73static const struct usb_device_id chaoskey_table[] = {
71 { USB_DEVICE(CHAOSKEY_VENDOR_ID, CHAOSKEY_PRODUCT_ID) }, 74 { USB_DEVICE(CHAOSKEY_VENDOR_ID, CHAOSKEY_PRODUCT_ID) },
75 { USB_DEVICE(ALEA_VENDOR_ID, ALEA_PRODUCT_ID) },
72 { }, 76 { },
73}; 77};
74MODULE_DEVICE_TABLE(usb, chaoskey_table); 78MODULE_DEVICE_TABLE(usb, chaoskey_table);