Skip to content

Commit 42337b9

Browse files
andrewshaduraJiri Kosina
authored andcommitted
HID: add driver for U2F Zero built-in LED and RNG
U2F Zero supports custom commands for blinking the LED and getting data from the internal hardware RNG. Expose the blinking function as a LED device, and the internal hardware RNG as an HWRNG so that it can be used to feed the enthropy pool. Signed-off-by: Andrej Shadura <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 8ed8662 commit 42337b9

File tree

4 files changed

+388
-0
lines changed

4 files changed

+388
-0
lines changed

drivers/hid/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,21 @@ config HID_UDRAW_PS3
10031003
Say Y here if you want to use the THQ uDraw gaming tablet for
10041004
the PS3.
10051005

1006+
config HID_U2FZERO
1007+
tristate "U2F Zero LED and RNG support"
1008+
depends on USB_HID
1009+
depends on LEDS_CLASS
1010+
help
1011+
Support for the LED of the U2F Zero device.
1012+
1013+
U2F Zero supports custom commands for blinking the LED
1014+
and getting data from the internal hardware RNG.
1015+
The internal hardware can be used to feed the enthropy pool.
1016+
1017+
U2F Zero only supports blinking its LED, so this driver doesn't
1018+
allow setting the brightness to anything but 1, which will
1019+
trigger a single blink and immediately reset to back 0.
1020+
10061021
config HID_WACOM
10071022
tristate "Wacom Intuos/Graphire tablet support (USB)"
10081023
depends on USB_HID

drivers/hid/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o
109109
obj-$(CONFIG_HID_TIVO) += hid-tivo.o
110110
obj-$(CONFIG_HID_TOPSEED) += hid-topseed.o
111111
obj-$(CONFIG_HID_TWINHAN) += hid-twinhan.o
112+
obj-$(CONFIG_HID_U2FZERO) += hid-u2fzero.o
112113
hid-uclogic-objs := hid-uclogic-core.o \
113114
hid-uclogic-rdesc.o \
114115
hid-uclogic-params.o

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@
323323
#define USB_DEVICE_ID_CYGNAL_RADIO_SI470X 0x818a
324324
#define USB_DEVICE_ID_FOCALTECH_FTXXXX_MULTITOUCH 0x81b9
325325
#define USB_DEVICE_ID_CYGNAL_CP2112 0xea90
326+
#define USB_DEVICE_ID_U2F_ZERO 0x8acf
326327

327328
#define USB_DEVICE_ID_CYGNAL_RADIO_SI4713 0x8244
328329

0 commit comments

Comments
 (0)