mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
input: Documentation: corrections for gameport-programming.rst
Use "E.g." instead of "Eg.". Use correct index for buttons[] array. Update all of struct gameport's descriptions. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-5-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
a9600c9858
commit
ebe14885ab
@ -21,7 +21,7 @@ choose which one to program the hardware to, starting from the more exotic
|
|||||||
addresses is preferred, because the likelihood of clashing with the standard
|
addresses is preferred, because the likelihood of clashing with the standard
|
||||||
0x201 address is smaller.
|
0x201 address is smaller.
|
||||||
|
|
||||||
Eg. if your driver supports addresses 0x200, 0x208, 0x210 and 0x218, then
|
E.g. if your driver supports addresses 0x200, 0x208, 0x210 and 0x218, then
|
||||||
0x218 would be the address of first choice.
|
0x218 would be the address of first choice.
|
||||||
|
|
||||||
If your hardware supports a gameport address that is not mapped to ISA io
|
If your hardware supports a gameport address that is not mapped to ISA io
|
||||||
@ -78,7 +78,7 @@ the gameport. To register a cooked gameport::
|
|||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
axes[i] = my_mmio[i];
|
axes[i] = my_mmio[i];
|
||||||
buttons[i] = my_mmio[4];
|
buttons[0] = my_mmio[4];
|
||||||
}
|
}
|
||||||
|
|
||||||
int my_open(struct gameport *gameport, int mode)
|
int my_open(struct gameport *gameport, int mode)
|
||||||
@ -117,25 +117,28 @@ Simple::
|
|||||||
The gameport structure
|
The gameport structure
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
This section is outdated. There are several fields here that don't
|
|
||||||
match what's there at include/linux/gameport.h.
|
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
struct gameport {
|
struct gameport {
|
||||||
|
|
||||||
void *private;
|
void *port_data;
|
||||||
|
|
||||||
A private pointer for free use in the gameport driver. (Not the joystick
|
A private pointer for free use in the gameport driver. (Not the joystick
|
||||||
driver!)
|
driver!)
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
int number;
|
char name[32];
|
||||||
|
|
||||||
Number assigned to the gameport when registered. Informational purpose only.
|
Driver's name as set by driver calling gameport_set_name(). Informational
|
||||||
|
purpose only.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
char phys[32];
|
||||||
|
|
||||||
|
gameport's physical name/description as set by driver calling gameport_set_phys().
|
||||||
|
Informational purpose only.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
@ -210,8 +213,16 @@ gameport.
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
struct gameport_dev *dev;
|
struct timer_list poll_timer;
|
||||||
struct gameport *next;
|
unsigned int poll_interval; /* in msecs */
|
||||||
|
spinlock_t timer_lock;
|
||||||
|
unsigned int poll_cnt;
|
||||||
|
void (*poll_handler)(struct gameport *);
|
||||||
|
struct gameport *parent, *child;
|
||||||
|
struct gameport_driver *drv;
|
||||||
|
struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */
|
||||||
|
struct device dev;
|
||||||
|
struct list_head node;
|
||||||
|
|
||||||
For internal use by the gameport layer.
|
For internal use by the gameport layer.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user