Documentation/input/joydev/joystick.rst

Source file repositories/reference/linux-study-clean/Documentation/input/joydev/joystick.rst

File Facts

System
Linux kernel
Corpus path
Documentation/input/joydev/joystick.rst
Extension
.rst
Size
18727 bytes
Lines
587
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. include:: <isonum.txt>

.. _joystick-doc:

Introduction
============

The joystick driver for Linux provides support for a variety of joysticks
and similar devices. It is based on a larger project aiming to support all
input devices in Linux.

The mailing list for the project is:

	linux-input@vger.kernel.org

send "subscribe linux-input" to majordomo@vger.kernel.org to subscribe to it.

Usage
=====

For basic usage you just choose the right options in kernel config and
you should be set.

Utilities
---------

For testing and other purposes (for example serial devices), there is a set
of utilities, such as ``jstest``, ``jscal``, and ``evtest``,
usually packaged as ``joystick``, ``input-utils``, ``evtest``, and so on.

``inputattach`` utility is required if your joystick is connected to a
serial port.

Device nodes
------------

For applications to be able to use the joysticks, device nodes should be
created in /dev. Normally it is done automatically by the system, but
it can also be done by hand::

    cd /dev
    rm js*
    mkdir input
    mknod input/js0 c 13 0
    mknod input/js1 c 13 1
    mknod input/js2 c 13 2
    mknod input/js3 c 13 3
    ln -s input/js0 js0
    ln -s input/js1 js1
    ln -s input/js2 js2
    ln -s input/js3 js3

For testing with inpututils it's also convenient to create these::

    mknod input/event0 c 13 64
    mknod input/event1 c 13 65
    mknod input/event2 c 13 66
    mknod input/event3 c 13 67

Modules needed
--------------

For all joystick drivers to function, you'll need the userland interface
module in kernel, either loaded or compiled in::

	modprobe joydev

For gameport joysticks, you'll have to load the gameport driver as well::

	modprobe ns558

Annotation

Implementation Notes