xref: /linux/drivers/usb/serial/visor.h (revision aa84dfc4296b8dd296da9a4d9e19ec1e6f7ddb94)
11da177e4SLinus Torvalds /*
21da177e4SLinus Torvalds  * USB HandSpring Visor driver
31da177e4SLinus Torvalds  *
41da177e4SLinus Torvalds  *	Copyright (C) 1999 - 2003
51da177e4SLinus Torvalds  *	    Greg Kroah-Hartman (greg@kroah.com)
61da177e4SLinus Torvalds  *
71da177e4SLinus Torvalds  *	This program is free software; you can redistribute it and/or modify
81da177e4SLinus Torvalds  *	it under the terms of the GNU General Public License as published by
91da177e4SLinus Torvalds  *	the Free Software Foundation; either version 2 of the License, or
101da177e4SLinus Torvalds  *	(at your option) any later version.
111da177e4SLinus Torvalds  *
12*aa84dfc4SGreg Kroah-Hartman  * See Documentation/usb/usb-serial.txt for more information on using this
13*aa84dfc4SGreg Kroah-Hartman  * driver.
141da177e4SLinus Torvalds  *
151da177e4SLinus Torvalds  */
161da177e4SLinus Torvalds 
171da177e4SLinus Torvalds #ifndef __LINUX_USB_SERIAL_VISOR_H
181da177e4SLinus Torvalds #define __LINUX_USB_SERIAL_VISOR_H
191da177e4SLinus Torvalds 
201da177e4SLinus Torvalds 
211da177e4SLinus Torvalds #define HANDSPRING_VENDOR_ID		0x082d
221da177e4SLinus Torvalds #define HANDSPRING_VISOR_ID		0x0100
231da177e4SLinus Torvalds #define HANDSPRING_TREO_ID		0x0200
241da177e4SLinus Torvalds #define HANDSPRING_TREO600_ID		0x0300
251da177e4SLinus Torvalds 
261da177e4SLinus Torvalds #define PALM_VENDOR_ID			0x0830
271da177e4SLinus Torvalds #define PALM_M500_ID			0x0001
281da177e4SLinus Torvalds #define PALM_M505_ID			0x0002
291da177e4SLinus Torvalds #define PALM_M515_ID			0x0003
301da177e4SLinus Torvalds #define PALM_I705_ID			0x0020
311da177e4SLinus Torvalds #define PALM_M125_ID			0x0040
321da177e4SLinus Torvalds #define PALM_M130_ID			0x0050
331da177e4SLinus Torvalds #define PALM_TUNGSTEN_T_ID		0x0060
34ac21e9ffSgregkh@suse.de #define PALM_TREO_650			0x0061
351da177e4SLinus Torvalds #define PALM_TUNGSTEN_Z_ID		0x0031
361da177e4SLinus Torvalds #define PALM_ZIRE_ID			0x0070
371da177e4SLinus Torvalds #define PALM_M100_ID			0x0080
381da177e4SLinus Torvalds 
3904d52461SHendrik Schweppe #define GSPDA_VENDOR_ID		0x115e
4004d52461SHendrik Schweppe #define GSPDA_XPLORE_M68_ID		0xf100
4104d52461SHendrik Schweppe 
421da177e4SLinus Torvalds #define SONY_VENDOR_ID			0x054C
431da177e4SLinus Torvalds #define SONY_CLIE_3_5_ID		0x0038
441da177e4SLinus Torvalds #define SONY_CLIE_4_0_ID		0x0066
451da177e4SLinus Torvalds #define SONY_CLIE_S360_ID		0x0095
461da177e4SLinus Torvalds #define SONY_CLIE_4_1_ID		0x009A
471da177e4SLinus Torvalds #define SONY_CLIE_NX60_ID		0x00DA
481da177e4SLinus Torvalds #define SONY_CLIE_NZ90V_ID		0x00E9
491da177e4SLinus Torvalds #define SONY_CLIE_UX50_ID		0x0144
501da177e4SLinus Torvalds #define SONY_CLIE_TJ25_ID		0x0169
511da177e4SLinus Torvalds 
52c8ba84a0SMaximilian Attems #define ACER_VENDOR_ID			0x0502
53c8ba84a0SMaximilian Attems #define ACER_S10_ID			0x0001
54c8ba84a0SMaximilian Attems 
551da177e4SLinus Torvalds #define SAMSUNG_VENDOR_ID		0x04E8
561da177e4SLinus Torvalds #define SAMSUNG_SCH_I330_ID		0x8001
571da177e4SLinus Torvalds #define SAMSUNG_SPH_I500_ID		0x6601
581da177e4SLinus Torvalds 
59115c1ce5SLarry Battraw #define TAPWAVE_VENDOR_ID		0x12EF
60115c1ce5SLarry Battraw #define TAPWAVE_ZODIAC_ID		0x0100
61115c1ce5SLarry Battraw 
621da177e4SLinus Torvalds #define GARMIN_VENDOR_ID		0x091E
631da177e4SLinus Torvalds #define GARMIN_IQUE_3600_ID		0x0004
641da177e4SLinus Torvalds 
651da177e4SLinus Torvalds #define ACEECA_VENDOR_ID		0x4766
661da177e4SLinus Torvalds #define ACEECA_MEZ1000_ID		0x0001
671da177e4SLinus Torvalds 
681da177e4SLinus Torvalds #define KYOCERA_VENDOR_ID		0x0C88
691da177e4SLinus Torvalds #define KYOCERA_7135_ID			0x0021
701da177e4SLinus Torvalds 
711da177e4SLinus Torvalds #define FOSSIL_VENDOR_ID		0x0E67
721da177e4SLinus Torvalds #define FOSSIL_ABACUS_ID		0x0002
731da177e4SLinus Torvalds 
741da177e4SLinus Torvalds /****************************************************************************
751da177e4SLinus Torvalds  * Handspring Visor Vendor specific request codes (bRequest values)
761da177e4SLinus Torvalds  * A big thank you to Handspring for providing the following information.
771da177e4SLinus Torvalds  * If anyone wants the original file where these values and structures came
781da177e4SLinus Torvalds  * from, send email to <greg@kroah.com>.
791da177e4SLinus Torvalds  ****************************************************************************/
801da177e4SLinus Torvalds 
811da177e4SLinus Torvalds /****************************************************************************
821da177e4SLinus Torvalds  * VISOR_REQUEST_BYTES_AVAILABLE asks the visor for the number of bytes that
831da177e4SLinus Torvalds  * are available to be transferred to the host for the specified endpoint.
841da177e4SLinus Torvalds  * Currently this is not used, and always returns 0x0001
851da177e4SLinus Torvalds  ****************************************************************************/
861da177e4SLinus Torvalds #define VISOR_REQUEST_BYTES_AVAILABLE		0x01
871da177e4SLinus Torvalds 
881da177e4SLinus Torvalds /****************************************************************************
891da177e4SLinus Torvalds  * VISOR_CLOSE_NOTIFICATION is set to the device to notify it that the host
901da177e4SLinus Torvalds  * is now closing the pipe. An empty packet is sent in response.
911da177e4SLinus Torvalds  ****************************************************************************/
921da177e4SLinus Torvalds #define VISOR_CLOSE_NOTIFICATION		0x02
931da177e4SLinus Torvalds 
941da177e4SLinus Torvalds /****************************************************************************
951da177e4SLinus Torvalds  * VISOR_GET_CONNECTION_INFORMATION is sent by the host during enumeration to
961da177e4SLinus Torvalds  * get the endpoints used by the connection.
971da177e4SLinus Torvalds  ****************************************************************************/
981da177e4SLinus Torvalds #define VISOR_GET_CONNECTION_INFORMATION	0x03
991da177e4SLinus Torvalds 
1001da177e4SLinus Torvalds 
1011da177e4SLinus Torvalds /****************************************************************************
1021da177e4SLinus Torvalds  * VISOR_GET_CONNECTION_INFORMATION returns data in the following format
1031da177e4SLinus Torvalds  ****************************************************************************/
1041da177e4SLinus Torvalds struct visor_connection_info {
1051da177e4SLinus Torvalds 	__le16	num_ports;
1061da177e4SLinus Torvalds 	struct {
1071da177e4SLinus Torvalds 		__u8	port_function_id;
1081da177e4SLinus Torvalds 		__u8	port;
1091da177e4SLinus Torvalds 	} connections[2];
1101da177e4SLinus Torvalds };
1111da177e4SLinus Torvalds 
1121da177e4SLinus Torvalds 
1131da177e4SLinus Torvalds /* struct visor_connection_info.connection[x].port defines: */
1141da177e4SLinus Torvalds #define VISOR_ENDPOINT_1		0x01
1151da177e4SLinus Torvalds #define VISOR_ENDPOINT_2		0x02
1161da177e4SLinus Torvalds 
1171da177e4SLinus Torvalds /* struct visor_connection_info.connection[x].port_function_id defines: */
1181da177e4SLinus Torvalds #define VISOR_FUNCTION_GENERIC		0x00
1191da177e4SLinus Torvalds #define VISOR_FUNCTION_DEBUGGER		0x01
1201da177e4SLinus Torvalds #define VISOR_FUNCTION_HOTSYNC		0x02
1211da177e4SLinus Torvalds #define VISOR_FUNCTION_CONSOLE		0x03
1221da177e4SLinus Torvalds #define VISOR_FUNCTION_REMOTE_FILE_SYS	0x04
1231da177e4SLinus Torvalds 
1241da177e4SLinus Torvalds 
1251da177e4SLinus Torvalds /****************************************************************************
1261da177e4SLinus Torvalds  * PALM_GET_SOME_UNKNOWN_INFORMATION is sent by the host during enumeration to
1271da177e4SLinus Torvalds  * get some information from the M series devices, that is currently unknown.
1281da177e4SLinus Torvalds  ****************************************************************************/
1291da177e4SLinus Torvalds #define PALM_GET_EXT_CONNECTION_INFORMATION	0x04
1301da177e4SLinus Torvalds 
1311da177e4SLinus Torvalds /**
1321da177e4SLinus Torvalds  * struct palm_ext_connection_info - return data from a PALM_GET_EXT_CONNECTION_INFORMATION request
1331da177e4SLinus Torvalds  * @num_ports: maximum number of functions/connections in use
1341da177e4SLinus Torvalds  * @endpoint_numbers_different: will be 1 if in and out endpoints numbers are
1351da177e4SLinus Torvalds  *	different, otherwise it is 0.  If value is 1, then
1361da177e4SLinus Torvalds  *	connections.end_point_info is non-zero.  If value is 0, then
1371da177e4SLinus Torvalds  *	connections.port contains the endpoint number, which is the same for in
1381da177e4SLinus Torvalds  *	and out.
1391da177e4SLinus Torvalds  * @port_function_id: contains the creator id of the applicaton that opened
1401da177e4SLinus Torvalds  *	this connection.
1411da177e4SLinus Torvalds  * @port: contains the in/out endpoint number.  Is 0 if in and out endpoint
1421da177e4SLinus Torvalds  *	numbers are different.
1431da177e4SLinus Torvalds  * @end_point_info: high nubbe is in endpoint and low nibble will indicate out
1441da177e4SLinus Torvalds  *	endpoint.  Is 0 if in and out endpoints are the same.
1451da177e4SLinus Torvalds  *
1461da177e4SLinus Torvalds  * The maximum number of connections currently supported is 2
1471da177e4SLinus Torvalds  */
1481da177e4SLinus Torvalds struct palm_ext_connection_info {
1491da177e4SLinus Torvalds 	__u8 num_ports;
1501da177e4SLinus Torvalds 	__u8 endpoint_numbers_different;
1511da177e4SLinus Torvalds 	__le16 reserved1;
1521da177e4SLinus Torvalds 	struct {
1531da177e4SLinus Torvalds 		__u32 port_function_id;
1541da177e4SLinus Torvalds 		__u8 port;
1551da177e4SLinus Torvalds 		__u8 end_point_info;
1561da177e4SLinus Torvalds 		__le16 reserved;
1571da177e4SLinus Torvalds 	} connections[2];
1581da177e4SLinus Torvalds };
1591da177e4SLinus Torvalds 
1601da177e4SLinus Torvalds #endif
1611da177e4SLinus Torvalds 
162