WIP FPC-III support
[linux/fpc-iii.git] / drivers / staging / vt6656 / usbpipe.h
blob52c2a928c9c142536efc9994d48172d5a5ffcdf2
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
4 * All rights reserved.
6 * File: usbpipe.h
8 * Purpose:
10 * Author: Warren Hsu
12 * Date: Mar. 30, 2005
16 #ifndef __USBPIPE_H__
17 #define __USBPIPE_H__
19 #include "device.h"
21 struct vnt_interrupt_data {
22 u8 tsr0;
23 u8 pkt0;
24 u16 time0;
25 u8 tsr1;
26 u8 pkt1;
27 u16 time1;
28 u8 tsr2;
29 u8 pkt2;
30 u16 time2;
31 u8 tsr3;
32 u8 pkt3;
33 u16 time3;
34 __le64 tsf;
35 u8 isr0;
36 u8 isr1;
37 u8 rts_success;
38 u8 rts_fail;
39 u8 ack_fail;
40 u8 fcs_err;
41 u8 sw[2];
42 } __packed;
44 struct vnt_tx_usb_header {
45 u8 type;
46 u8 pkt_no;
47 __le16 tx_byte_count;
48 } __packed;
50 #define VNT_REG_BLOCK_SIZE 64
52 int vnt_control_out(struct vnt_private *priv, u8 request, u16 value,
53 u16 index, u16 length, const u8 *buffer);
54 int vnt_control_in(struct vnt_private *priv, u8 request, u16 value,
55 u16 index, u16 length, u8 *buffer);
57 int vnt_control_out_u8(struct vnt_private *priv, u8 reg, u8 ref_off, u8 data);
58 int vnt_control_in_u8(struct vnt_private *priv, u8 reg, u8 reg_off, u8 *data);
60 int vnt_control_out_blocks(struct vnt_private *priv,
61 u16 block, u8 reg, u16 len, const u8 *data);
63 int vnt_start_interrupt_urb(struct vnt_private *priv);
64 int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb);
65 int vnt_tx_context(struct vnt_private *priv,
66 struct vnt_usb_send_context *context,
67 struct sk_buff *skb);
69 #endif /* __USBPIPE_H__ */