]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cp2112: driver for the namesake GPIO and I2C master gadget
authorAndriy Gapon <avg@FreeBSD.org>
Thu, 6 Aug 2020 13:41:42 +0000 (13:41 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Thu, 6 Aug 2020 13:41:42 +0000 (13:41 +0000)
commitc178a7e73ccb042a30b8a3634e5d92e2ae83c41e
treed124443e2ef53987b94c1c00b0e80f6253608978
parent0736ad87b96e41e17f9598eb9c50c794bf035e67
cp2112: driver for the namesake GPIO and I2C master gadget

Documentation:
- CP2112 Datasheet
  https://www.silabs.com/documents/public/data-sheets/cp2112-datasheet.pdf
- AN495: CP2112 Interface Specification
  https://www.silabs.com/documents/public/application-notes/an495-cp2112-interface-specification.pdf
- CP2112 Errata
  https://www.silabs.com/documents/public/errata/cp2112-errata.pdf

The logic is implemented as three sub-drivers.
The parent driver claims the USB device and creates two child devices.
One acts as a GPIO controller and the other is an I2C controller.

Tested with CP2112 revision F02.
Both features seem to work.
HTU21 sensor was used as an I2C slave.

Reviewed by: adrian, hselasky
MFC after: 2 weeks
Relnotes: maybe
Differential Revision: https://reviews.freebsd.org/D25359
sys/conf/files
sys/dev/usb/misc/cp2112.c [new file with mode: 0644]
sys/modules/usb/Makefile
sys/modules/usb/cp2112/Makefile [new file with mode: 0644]