11da177e4SLinus Torvalds #ifndef CYPRESS_M8_H 21da177e4SLinus Torvalds #define CYPRESS_M8_H 31da177e4SLinus Torvalds 41da177e4SLinus Torvalds /* definitions and function prototypes used for the cypress USB to Serial controller */ 51da177e4SLinus Torvalds 61da177e4SLinus Torvalds /* For sending our feature buffer - controlling serial communication states */ 71da177e4SLinus Torvalds /* Linux HID has no support for serial devices so we do this through the driver */ 81da177e4SLinus Torvalds #define HID_REQ_GET_REPORT 0x01 91da177e4SLinus Torvalds #define HID_REQ_SET_REPORT 0x09 101da177e4SLinus Torvalds 111da177e4SLinus Torvalds /* List other cypress USB to Serial devices here, and add them to the id_table */ 121da177e4SLinus Torvalds 131da177e4SLinus Torvalds /* DeLorme Earthmate USB - a GPS device */ 141da177e4SLinus Torvalds #define VENDOR_ID_DELORME 0x1163 151da177e4SLinus Torvalds #define PRODUCT_ID_EARTHMATEUSB 0x0100 1625b6f08eSLonnie Mendez #define PRODUCT_ID_EARTHMATEUSB_LT20 0x0200 171da177e4SLinus Torvalds 181da177e4SLinus Torvalds /* Cypress HID->COM RS232 Adapter */ 191da177e4SLinus Torvalds #define VENDOR_ID_CYPRESS 0x04b4 201da177e4SLinus Torvalds #define PRODUCT_ID_CYPHIDCOM 0x5500 21*a5c44e29SLonnie Mendez 22*a5c44e29SLonnie Mendez /* Nokia CA-42 USB to serial cable */ 23*a5c44e29SLonnie Mendez #define VENDOR_ID_DAZZLE 0x07d0 24*a5c44e29SLonnie Mendez #define PRODUCT_ID_CA42 0x4101 251da177e4SLinus Torvalds /* End of device listing */ 261da177e4SLinus Torvalds 271da177e4SLinus Torvalds /* Used for setting / requesting serial line settings */ 281da177e4SLinus Torvalds #define CYPRESS_SET_CONFIG 0x01 291da177e4SLinus Torvalds #define CYPRESS_GET_CONFIG 0x02 301da177e4SLinus Torvalds 311da177e4SLinus Torvalds /* Used for throttle control */ 321da177e4SLinus Torvalds #define THROTTLED 0x1 331da177e4SLinus Torvalds #define ACTUALLY_THROTTLED 0x2 341da177e4SLinus Torvalds 351da177e4SLinus Torvalds /* chiptypes - used in case firmware differs from the generic form ... offering 361da177e4SLinus Torvalds * different baud speeds/etc. 371da177e4SLinus Torvalds */ 381da177e4SLinus Torvalds 391da177e4SLinus Torvalds #define CT_EARTHMATE 0x01 401da177e4SLinus Torvalds #define CT_CYPHIDCOM 0x02 41*a5c44e29SLonnie Mendez #define CT_CA42V2 0x03 421da177e4SLinus Torvalds #define CT_GENERIC 0x0F 431da177e4SLinus Torvalds /* End of chiptype definitions */ 441da177e4SLinus Torvalds 451da177e4SLinus Torvalds /* RS-232 serial data communication protocol definitions */ 461da177e4SLinus Torvalds /* these are sent / read at byte 0 of the input/output hid reports */ 471da177e4SLinus Torvalds /* You can find these values defined in the CY4601 USB to Serial design notes */ 481da177e4SLinus Torvalds 491da177e4SLinus Torvalds #define CONTROL_DTR 0x20 /* data terminal ready - flow control - host to device */ 501da177e4SLinus Torvalds #define UART_DSR 0x20 /* data set ready - flow control - device to host */ 511da177e4SLinus Torvalds #define CONTROL_RTS 0x10 /* request to send - flow control - host to device */ 521da177e4SLinus Torvalds #define UART_CTS 0x10 /* clear to send - flow control - device to host */ 531da177e4SLinus Torvalds #define UART_RI 0x10 /* ring indicator - modem - device to host */ 541da177e4SLinus Torvalds #define UART_CD 0x40 /* carrier detect - modem - device to host */ 551da177e4SLinus Torvalds #define CYP_ERROR 0x08 /* received from input report - device to host */ 561da177e4SLinus Torvalds /* Note - the below has nothing to to with the "feature report" reset */ 571da177e4SLinus Torvalds #define CONTROL_RESET 0x08 /* sent with output report - host to device */ 581da177e4SLinus Torvalds 591da177e4SLinus Torvalds /* End of RS-232 protocol definitions */ 601da177e4SLinus Torvalds 611da177e4SLinus Torvalds #endif /* CYPRESS_M8_H */ 62