Commit Graph

9 Commits

Author SHA1 Message Date
Sylvain Munaut 0036b1fa9f icE1usb fw: Add device request to read/write I2C device registers
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I55a72762d535827a51e5ea1775e9abbd116bc8a8
2022-11-09 11:14:49 +01:00
Sylvain Munaut 321b1c8694 icE1usb fw: Minor doc string update
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: If0b37021698b2d17b8412a1c05a9c7101b06a506
2022-11-09 11:02:51 +01:00
Sylvain Munaut cfb8b0b7a0 icE1usb fw/gpsdo: Export accumulated error
This is a pretty usefu stat as this is what actually matters

Note that structure is just extended so any call with a wLength
shorter will just get the beginning of the struct (usb stack
limits response to wLength) and thus is fully backward compatible.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I0aa919d4870ca7e1b653b82ac4f76ed26b5e3b08
2022-10-04 13:54:49 +02:00
Harald Welte cac342af6b icE1usb: Move GPS-DO USB control to separate USB interface
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
2022-02-01 17:57:12 +01:00
Sylvain Munaut c308334de7 icE1usb fw: Add USB control for the GPSDO function
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: If92aa68d8a49349fa0d6d556eec81bbb80be989c
2022-01-13 13:21:29 +01:00
Harald Welte 1b89f3bcca icE1usb fw: New ICE1USB_INTF_GET_ERRORS control request
This allows the host driver to obtain the current errors, as they would
normally be reported over the IRQ endpoint.  One important use case for
this is to obtain the initial error state when the driver starts up.

Change-Id: I6301bb23234c66afe083ceb500cff8a40813e8b6
2022-01-13 13:21:29 +01:00
Harald Welte 51baa368ce icE1usb firmware: Detect A-bit in TS0; report via USB + LED
Scan over every odd E1 frame TS0 byte to check if the A-bit is set,
indicating a remote alarm.  If so, set yellow LED and report via the
error flags communicated to the host by USB interrupt transfer.

Change-Id: Ic4f57cf79bd32cf75f81ef3073cb8d4a2d1857d8
2022-01-02 12:42:35 +01:00
Harald Welte 805f2cf16e icE1usb fw: Expose error conditions from E1 driver
This will allow the USB interface code to report the errors to the
host PC.

Related: OS#4674
Change-Id: Iba3e00a2b28a2fef6dbd986bfc706c1619c3a3ed
2021-01-05 23:25:34 +01:00
Harald Welte 9469e046f1 icE1usb fw: USB control request handling
This introduces a number of vendor-specific control requests for
configuration of the icE1usb from the host software.

Closes: OS#4675
Change-Id: I9d28566ba21a2a78def5e4a0ba07ecbc4a583aa9
2021-01-05 23:24:32 +01:00