Page MenuHomeFreeBSD

cp2112: driver for the namesake GPIO and I2C master gadget
ClosedPublic

Authored by avg on Jun 19 2020, 1:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 7 2024, 6:51 AM
Unknown Object (File)
Jan 7 2024, 6:45 AM
Unknown Object (File)
Jan 7 2024, 6:45 AM
Unknown Object (File)
Jan 7 2024, 6:45 AM
Unknown Object (File)
Jan 5 2024, 3:44 AM
Unknown Object (File)
Dec 23 2023, 2:08 AM
Unknown Object (File)
Nov 21 2023, 7:36 PM
Unknown Object (File)
Oct 20 2023, 6:35 PM
Subscribers

Details

Summary

Documentation:

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.

Test Plan

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avg requested review of this revision.Jun 19 2020, 1:55 PM

add a couple of missing changes

adrian added a subscriber: adrian.

the GPIO/i2c bits at first glance look ok.

This revision is now accepted and ready to land.Jul 14 2020, 6:15 AM
sys/dev/usb/misc/cp2112.c
1073 ↗(On Diff #73335)

Maybe add some defines for these magic constant lengths? Describing what they are.

1136 ↗(On Diff #73335)

.. same with this one. is the 16 byte limit used elsewhere?

Should also add a build rule to sys/conf/files .

sys/dev/usb/misc/cp2112.c
430 ↗(On Diff #73335)

Nice if vendor 0x1009 could be added to usbdevs. If not known, then just leave it.

@adrian , @hselasky , thank you very much for the reviews!
I will do some improvements right now, but will leave others for a later time (hopefully soon).

avg retitled this revision from [DRAFT] cp2112: driver for the namesake GPIO and I2C master gadget to cp2112: driver for the namesake GPIO and I2C master gadget.Aug 6 2020, 1:14 PM