Deleted Added
full compact
uchcom.c (292080) uchcom.c (298300)
1/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
2
3/*-
4 * Copyright (c) 2007, Takanori Watanabe
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 42 unchanged lines hidden (view full) ---

51 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
52 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
53 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
54 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
55 * POSSIBILITY OF SUCH DAMAGE.
56 */
57
58#include <sys/cdefs.h>
1/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
2
3/*-
4 * Copyright (c) 2007, Takanori Watanabe
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 42 unchanged lines hidden (view full) ---

51 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
52 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
53 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
54 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
55 * POSSIBILITY OF SUCH DAMAGE.
56 */
57
58#include <sys/cdefs.h>
59__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uchcom.c 292080 2015-12-11 05:28:00Z imp $");
59__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uchcom.c 298300 2016-04-19 22:07:36Z pfg $");
60
61/*
62 * Driver for WinChipHead CH341/340, the worst USB-serial chip in the
63 * world.
64 */
65
66#include <sys/stdint.h>
67#include <sys/stddef.h>

--- 122 unchanged lines hidden (view full) ---

190 {307200, 307200, UCHCOM_BASE_UNKNOWN, {7, 0xD9, 0}},
191 {921600, 921600, UCHCOM_BASE_UNKNOWN, {7, 0xF3, 0}},
192 {2999999, 23530, 6000000, {3, 0, 0}},
193 {23529, 2942, 750000, {2, 0, 0}},
194 {2941, 368, 93750, {1, 0, 0}},
195 {367, 1, 11719, {0, 0, 0}},
196};
197
60
61/*
62 * Driver for WinChipHead CH341/340, the worst USB-serial chip in the
63 * world.
64 */
65
66#include <sys/stdint.h>
67#include <sys/stddef.h>

--- 122 unchanged lines hidden (view full) ---

190 {307200, 307200, UCHCOM_BASE_UNKNOWN, {7, 0xD9, 0}},
191 {921600, 921600, UCHCOM_BASE_UNKNOWN, {7, 0xF3, 0}},
192 {2999999, 23530, 6000000, {3, 0, 0}},
193 {23529, 2942, 750000, {2, 0, 0}},
194 {2941, 368, 93750, {1, 0, 0}},
195 {367, 1, 11719, {0, 0, 0}},
196};
197
198#define NUM_DIVIDERS (sizeof (dividers) / sizeof (dividers[0]))
198#define NUM_DIVIDERS nitems(dividers)
199
200static const STRUCT_USB_HOST_ID uchcom_devs[] = {
201 {USB_VPI(USB_VENDOR_WCH, USB_PRODUCT_WCH_CH341SER, 0)},
202 {USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER, 0)},
203 {USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER_2, 0)},
204};
205
206/* protypes */

--- 671 unchanged lines hidden ---
199
200static const STRUCT_USB_HOST_ID uchcom_devs[] = {
201 {USB_VPI(USB_VENDOR_WCH, USB_PRODUCT_WCH_CH341SER, 0)},
202 {USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER, 0)},
203 {USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER_2, 0)},
204};
205
206/* protypes */

--- 671 unchanged lines hidden ---