#
# USB Input driver configuration
#
comment "USB Input Devices"
	depends on USB

config USB_AIPTEK
	tristate "Aiptek 6000U/8000U tablet support"
	depends on USB && INPUT
	help
	  Say Y here if you want to use the USB version of the Aiptek 6000U
	  or Aiptek 8000U tablet.  Make sure to say Y to "Mouse support"
	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
	  (CONFIG_INPUT_EVDEV) as well.

	  To compile this driver as a module, choose M here: the
	  module will be called aiptek.

config USB_WACOM
	tristate "Wacom Intuos/Graphire tablet support"
	depends on USB && INPUT
	help
	  Say Y here if you want to use the USB version of the Wacom Intuos
	  or Graphire tablet.  Make sure to say Y to "Mouse support"
	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
	  (CONFIG_INPUT_EVDEV) as well.

	  To compile this driver as a module, choose M here: the
	  module will be called wacom.

config USB_ACECAD
	tristate "Acecad Flair tablet support"
	depends on USB && INPUT
	help
	  Say Y here if you want to use the USB version of the Acecad Flair
	  tablet.  Make sure to say Y to "Mouse support"
	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
	  (CONFIG_INPUT_EVDEV) as well.

	  To compile this driver as a module, choose M here: the
	  module will be called acecad.

config USB_KBTAB
	tristate "KB Gear JamStudio tablet support"
	depends on USB && INPUT
	help
	  Say Y here if you want to use the USB version of the KB Gear
	  JamStudio tablet.  Make sure to say Y to "Mouse support"
	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
	  (CONFIG_INPUT_EVDEV) as well.

	  To compile this driver as a module, choose M here: the
	  module will be called kbtab.

config USB_POWERMATE
	tristate "Griffin PowerMate and Contour Jog support"
	depends on USB && INPUT
	---help---
	  Say Y here if you want to use Griffin PowerMate or Contour Jog devices.
	  These are aluminum dials which can measure clockwise and anticlockwise
	  rotation.  The dial also acts as a pushbutton.  The base contains an LED
	  which can be instructed to pulse or to switch to a particular intensity.

	  You can download userspace tools from
	  <http://sowerbutts.com/powermate/>.

	  To compile this driver as a module, choose M here: the
	  module will be called powermate.

config USB_TOUCHSCREEN
	tristate "USB Touchscreen Driver"
	depends on USB && INPUT
	---help---
	  USB Touchscreen driver for:
	  - eGalax Touchkit USB (also includes eTurboTouch CT-410/510/700)
	  - PanJit TouchSet USB
	  - 3M MicroTouch USB (EX II series)
	  - ITM
	  - some other eTurboTouch
	  - Gunze AHL61
	  - DMC TSC-10/25

	  Have a look at <http://linux.chapter7.ch/touchkit/> for
	  a usage description and the required user-space stuff.

	  To compile this driver as a module, choose M here: the
	  module will be called usbtouchscreen.

config USB_TOUCHSCREEN_EGALAX
	default y
	bool "eGalax, eTurboTouch CT-410/510/700 device support" if EMBEDDED
	depends on USB_TOUCHSCREEN

config USB_TOUCHSCREEN_PANJIT
	default y
	bool "PanJit device support" if EMBEDDED
	depends on USB_TOUCHSCREEN

config USB_TOUCHSCREEN_3M
	default y
	bool "3M/Microtouch EX II series device support" if EMBEDDED
	depends on USB_TOUCHSCREEN

config USB_TOUCHSCREEN_ITM
	default y
	bool "ITM device support" if EMBEDDED
	depends on USB_TOUCHSCREEN

config USB_TOUCHSCREEN_ETURBO
	default y
	bool "eTurboTouch (non-eGalax compatible) device support" if EMBEDDED
	depends on USB_TOUCHSCREEN

config USB_TOUCHSCREEN_GUNZE
	default y
	bool "Gunze AHL61 device support" if EMBEDDED
	depends on USB_TOUCHSCREEN

config USB_TOUCHSCREEN_DMC_TSC10
	default y
	bool "DMC TSC-10/25 device support" if EMBEDDED
	depends on USB_TOUCHSCREEN

config USB_YEALINK
	tristate "Yealink usb-p1k voip phone"
	depends on USB && INPUT && EXPERIMENTAL
	---help---
	  Say Y here if you want to enable keyboard and LCD functions of the
	  Yealink usb-p1k usb phones. The audio part is enabled by the generic
	  usb sound driver, so you might want to enable that as well.

	  For information about how to use these additional functions, see
	  <file:Documentation/input/yealink.txt>.

	  To compile this driver as a module, choose M here: the module will be
	  called yealink.

config USB_XPAD
	tristate "X-Box gamepad support"
	depends on USB && INPUT
	---help---
	  Say Y here if you want to use the X-Box pad with your computer.
	  Make sure to say Y to "Joystick support" (CONFIG_INPUT_JOYDEV)
	  and/or "Event interface support" (CONFIG_INPUT_EVDEV) as well.

	  For information about how to connect the X-Box pad to USB, see
	  <file:Documentation/input/xpad.txt>.

	  To compile this driver as a module, choose M here: the
	  module will be called xpad.
	  
config USB_ATI_REMOTE
	tristate "ATI / X10 USB RF remote control"
	depends on USB && INPUT
	---help---
	  Say Y here if you want to use an ATI or X10 "Lola" USB remote control.
	  These are RF remotes with USB receivers. 
	  The ATI remote comes with many of ATI's All-In-Wonder video cards.
	  The X10 "Lola" remote is available at:
	     <http://www.x10.com/products/lola_sg1.htm>
	  This driver provides mouse pointer, left and right mouse buttons, 
	  and maps all the other remote buttons to keypress events.
	  
	  To compile this driver as a module, choose M here: the module will be
	  called ati_remote.

config USB_ATI_REMOTE2
	tristate "ATI / Philips USB RF remote control"
	depends on USB && INPUT
	---help---
	  Say Y here if you want to use an ATI or Philips USB RF remote control.
	  These are RF remotes with USB receivers.
	  ATI Remote Wonder II comes with some ATI's All-In-Wonder video cards
	  and is also available as a separate product.
	  This driver provides mouse pointer, left and right mouse buttons,
	  and maps all the other remote buttons to keypress events.

	  To compile this driver as a module, choose M here: the module will be
	  called ati_remote2.

config USB_KEYSPAN_REMOTE
	tristate "Keyspan DMR USB remote control (EXPERIMENTAL)"
	depends on USB && INPUT && EXPERIMENTAL
	---help---
	  Say Y here if you want to use a Keyspan DMR USB remote control.
	  Currently only the UIA-11 type of receiver has been tested.  The tag
	  on the receiver that connects to the USB port should have a P/N that
	  will tell you what type of DMR you have.  The UIA-10 type is not
	  supported at this time.  This driver maps all buttons to keypress
	  events.

	  To compile this driver as a module, choose M here: the module will
	  be called keyspan_remote.

config USB_APPLETOUCH
	tristate "Apple USB Touchpad support"
	depends on USB && INPUT
	---help---
	  Say Y here if you want to use an Apple USB Touchpad.

	  These are the touchpads that can be found on post-February 2005
	  Apple Powerbooks (prior models have a Synaptics touchpad connected
	  to the ADB bus).

	  This driver provides a basic mouse driver but can be interfaced
	  with the synaptics X11 driver to provide acceleration and
	  scrolling in X11.

	  For further information, see
	  <file:Documentation/input/appletouch.txt>.

	  To compile this driver as a module, choose M here: the
	  module will be called appletouch.

config USB_GTCO
        tristate "GTCO CalComp/InterWrite USB Support"
        depends on USB && INPUT
        ---help---
          Say Y here if you want to use the USB version of the GTCO
          CalComp/InterWrite Tablet.  Make sure to say Y to "Mouse support"
          (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
          (CONFIG_INPUT_EVDEV) as well.

          To compile this driver as a module, choose M here: the
          module will be called gtco.
