laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/dahdi-linux/+/26967 )


Change subject: icE1usb: update ice1usb_proto.h to firmware 0.2
......................................................................

icE1usb: update ice1usb_proto.h to firmware 0.2

git revision c308334de7f7fb92504364f29bd815014002d3ce of
https://git.osmocom.org/osmo-e1-hardware

Change-Id: I1423531470a1c9165d713108fb6a87ff47ff6e29
---
M drivers/dahdi/icE1usb/icE1usb.c
M drivers/dahdi/icE1usb/ice1usb_proto.h
2 files changed, 43 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/67/26967/1

diff --git a/drivers/dahdi/icE1usb/icE1usb.c b/drivers/dahdi/icE1usb/icE1usb.c
index 7744828..9339933 100644
--- a/drivers/dahdi/icE1usb/icE1usb.c
+++ b/drivers/dahdi/icE1usb/icE1usb.c
@@ -1012,6 +1012,8 @@
                dev_err(&intf->dev, "Cannot find ON altsetting");
                goto error;
        }
+       dev_info(&intf->dev, "altsetting off=%u, on=%u\n",
+                ieu->alt_off->desc.bAlternateSetting, 
ieu->alt_on->desc.bAlternateSetting);

        /* locate ON / OFF altsettings */
        if (find_endpoints(ieu, ieu->alt_on) < 4) {
@@ -1034,6 +1036,7 @@
        //ddev->location = USB_BUS_PATH;

        dspan = &ieu->dahdi.span;
+       /* TODO: include USB path info? */
        snprintf(dspan->name, sizeof(dspan->name), "icE1usb/1/%d",
                 ieu->alt_on->desc.bInterfaceNumber); //TDOO: device != 1
        snprintf(dspan->desc, sizeof(dspan->desc), "Osmocom icE1USB Card 1 Span 
%d",
diff --git a/drivers/dahdi/icE1usb/ice1usb_proto.h 
b/drivers/dahdi/icE1usb/ice1usb_proto.h
index d0d7304..a249537 100644
--- a/drivers/dahdi/icE1usb/ice1usb_proto.h
+++ b/drivers/dahdi/icE1usb/ice1usb_proto.h
@@ -17,12 +17,51 @@
 /*! returns a bit-mask of optional device capabilities (see enum 
e1usb_dev_capability) */
 #define ICE1USB_DEV_GET_CAPABILITIES   0x01
 #define ICE1USB_DEV_GET_FW_BUILD       0x02
+#define ICE1USB_DEV_GET_GPSDO_STATUS   0x10
+#define ICE1USB_DEV_GET_GPSDO_MODE     0x12    /*!< uint8_t */
+#define ICE1USB_DEV_SET_GPSDO_MODE     0x13    /*!< wValue = mode */
+#define ICE1USB_DEV_GET_GPSDO_TUNE     0x14    /*!< data   = struct 
e1usb_gpsdo_tune */
+#define ICE1USB_DEV_SET_GPSDO_TUNE     0x15    /*!< data   = struct 
e1usb_gpsdo_tune */

 enum e1usb_dev_capability {
        /*! Does this board have a GPS-DO */
        ICE1USB_DEV_CAP_GPSDO,
 };

+enum ice1usb_gpsdo_mode {
+       ICE1USB_GPSDO_MODE_DISABLED     = 0,
+       ICE1USB_GPSDO_MODE_AUTO         = 1,
+};
+
+enum ice1usb_gpsdo_antenna_state {
+       ICE1USB_GPSDO_ANT_UNKNOWN       = 0,
+       ICE1USB_GPSDO_ANT_OK            = 1,
+       ICE1USB_GPSDO_ANT_OPEN          = 2,
+       ICE1USB_GPSDO_ANT_SHORT         = 3,
+};
+
+enum ice1usb_gpsdo_state {
+       ICE1USB_GPSDO_STATE_DISABLED    = 0,
+       ICE1USB_GPSDO_STATE_CALIBRATE   = 1,
+       ICE1USB_GPSDO_STATE_HOLD_OVER   = 2,
+       ICE1USB_GPSDO_STATE_TUNE_COARSE = 3,
+       ICE1USB_GPSDO_STATE_TUNE_FINE   = 4,
+};
+
+struct e1usb_gpsdo_tune {
+       uint16_t coarse;
+       uint16_t fine;
+} __attribute__((packed));
+
+struct e1usb_gpsdo_status {
+       uint8_t state;
+       uint8_t antenna_status;         /*!< Antenna status */
+       uint8_t valid_fix;              /*!< Valid GPS Fix (0/1) */
+       uint8_t mode;                   /*!< Current configured operating mode 
*/
+       struct e1usb_gpsdo_tune tune;   /*!< Current VCXO tuning values */
+       uint32_t freq_est;              /*!< Latest frequency estimate 
measurement */
+} __attribute__((packed));
+

 /* Interface Requests */

@@ -32,6 +71,7 @@
 #define ICE1USB_INTF_GET_TX_CFG                0x03    /*!< struct 
ice1usb_tx_config */
 #define ICE1USB_INTF_SET_RX_CFG                0x04    /*!< struct 
ice1usb_rx_config */
 #define ICE1USB_INTF_GET_RX_CFG                0x05    /*!< struct 
ice1usb_rx_config */
+#define ICE1USB_INTF_GET_ERRORS                0x06    /*!< struct 
ice1usb_irq_err */

 //enum e1usb_intf_capability { };


--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/26967
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I1423531470a1c9165d713108fb6a87ff47ff6e29
Gerrit-Change-Number: 26967
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-MessageType: newchange

Reply via email to