Skip to content

Commit

Permalink
usb: Add driver for Altus Metrum ChaosKey device (v2)
Browse files Browse the repository at this point in the history
This is a hardware random number generator. The driver provides both a
/dev/chaoskeyX entry and hooks the entropy source up to the kernel
hwrng interface. More information about the device can be found at
http://chaoskey.org

The USB ID for ChaosKey was allocated from the OpenMoko USB vendor
space and is visible as 'USBtrng' here:

http://wiki.openmoko.org/wiki/USB_Product_IDs

v2: Respond to review from Oliver Neukum <[email protected]>

 * Delete extensive debug infrastructure and replace it with calls to
   dev_dbg.

 * Allocate I/O buffer separately from device structure to obey
   requirements for non-coherant architectures.

 * Initialize mutexes before registering device to ensure that open
   cannot be invoked before the device is ready to proceed.

 * Return number of bytes read instead of -EINTR when partial read
   operation is aborted due to a signal.

 * Make sure device mutex is unlocked in read error paths.

 * Add MAINTAINERS entry for the driver

Signed-off-by: Keith Packard <[email protected]>
Cc: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
keith-packard authored and gregkh committed Mar 26, 2015
1 parent 1fcefbd commit 66e3e59
Show file tree
Hide file tree
Showing 4 changed files with 549 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10129,6 +10129,12 @@ S: Maintained
F: drivers/net/usb/cdc_*.c
F: include/uapi/linux/usb/cdc.h

USB CHAOSKEY DRIVER
M: Keith Packard <[email protected]>
L: [email protected]
S: Maintained
F: drivers/usb/misc/chaoskey.c

USB CYPRESS C67X00 DRIVER
M: Peter Korsgaard <[email protected]>
L: [email protected]
Expand Down
12 changes: 12 additions & 0 deletions drivers/usb/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,15 @@ config USB_LINK_LAYER_TEST
This driver is for generating specific traffic for Super Speed Link
Layer Test Device. Say Y only when you want to conduct USB Super Speed
Link Layer Test for host controllers.

config USB_CHAOSKEY
tristate "ChaosKey random number generator driver support"
help
Say Y here if you want to connect an AltusMetrum ChaosKey to
your computer's USB port. The ChaosKey is a hardware random
number generator which hooks into the kernel entropy pool to
ensure a large supply of entropy for /dev/random and
/dev/urandom and also provides direct access via /dev/chaoskeyX

To compile this driver as a module, choose M here: the
module will be called chaoskey.
1 change: 1 addition & 0 deletions drivers/usb/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ obj-$(CONFIG_USB_USS720) += uss720.o
obj-$(CONFIG_USB_SEVSEG) += usbsevseg.o
obj-$(CONFIG_USB_YUREX) += yurex.o
obj-$(CONFIG_USB_HSIC_USB3503) += usb3503.o
obj-$(CONFIG_USB_CHAOSKEY) += chaoskey.o

obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/
obj-$(CONFIG_USB_LINK_LAYER_TEST) += lvstest.o
Loading

0 comments on commit 66e3e59

Please sign in to comment.