doing so significantly simplifies the development of a Linux kernel
driver, as the GPS-DO only exists once (not twice, like the per-E1-line
interface), and Linux kernel USB drivers typically are for an interface.
There is an option to write a usb_device_driver, but doing so will
exclude the per-interface drivers from still being probed in their usual
fashion.
While we introduce this new USB Interface for the GPS-DO, we also
move the related control endpoint requests from the device level to the
interface level.
Finally, some naming inconsistency between "enum
ice1usb_gpsdo_antenna_state" vs. the member name antenna_status is
resolved.
Change-Id: Icd6555a14896c38626fb147b78af44ff719f2254
Note that this is read-only. We drop all data from the host
because we can't have the host reconfigure the module ...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ieb6a653ece882c5f90ab27da1bca04c94184dc5a
In dual port mode we can't have 388 bytes wMaxPacket size, that's
too much reserved bandwidth.
So we dial that back to 292 which is the minimum we can use. We need
4 bytes for header, then 256 byte of nominal transfer size then 32
more byte for potentially one more frame than nominal to compensate
differences between E1 clock and USB clock.
We obviously need to adapt the code filling up the packets to respect
that more restricted size ...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I700adeb909e7955db0d15c6e2beade3d38b21e01
This way they can be used in other parts of the code more easily.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I565d9a43bc26b99bc385b46522e7da6a207b2412
It was pointed out that this should be 0 since we trigger
detach ourselves, we don't need a bus reset.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Id7051ce00863c03e3498f4bab0a7124938e197c0
Some of it was written before some of the helpers were provided
by the no2usb code and was never update. So instead of manually
setting up a bunch of stuff we make proper use of some of the provided
helpers.
Side effects:
- We recall e1_init(0,0) when enabling which happens to work
around a bug ... proper fix coming later.
- The 'dual BD' config for EP 0x81 and 0x83 is fixed. It didn't
matter before since we overwrote it anyway, but now it's used
and so needs to be correct.
- The descriptors don't have the isoc endpoints at all in the
"OFF" alt setting.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I33c92896acfba023abe0152d63dff3afe43b53cd
Those are actually disabled right now, but since the submodule got
updated and the protocol struct/defines changed, this updates them
anyway so you can uncommend/enable them without causing a build
failure
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I1895702eac9c6c392f24327b12f9ba3651e3249a
Currently only the icE1usb-proto is supported. Adaptation for the
final production hardware is yet to be done.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>