Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Randy Dunlap and committed by
Jonathan Corbet
ebe14885 a9600c98

+23 -12
+23 -12
Documentation/input/gameport-programming.rst
··· 21 21 addresses is preferred, because the likelihood of clashing with the standard 22 22 0x201 address is smaller. 23 23 24 - Eg. if your driver supports addresses 0x200, 0x208, 0x210 and 0x218, then 24 + E.g. if your driver supports addresses 0x200, 0x208, 0x210 and 0x218, then 25 25 0x218 would be the address of first choice. 26 26 27 27 If your hardware supports a gameport address that is not mapped to ISA io ··· 78 78 79 79 for (i = 0; i < 4; i++) 80 80 axes[i] = my_mmio[i]; 81 - buttons[i] = my_mmio[4]; 81 + buttons[0] = my_mmio[4]; 82 82 } 83 83 84 84 int my_open(struct gameport *gameport, int mode) ··· 117 117 The gameport structure 118 118 ~~~~~~~~~~~~~~~~~~~~~~ 119 119 120 - .. note:: 121 - 122 - This section is outdated. There are several fields here that don't 123 - match what's there at include/linux/gameport.h. 124 - 125 120 :: 126 121 127 122 struct gameport { 128 123 129 - void *private; 124 + void *port_data; 130 125 131 126 A private pointer for free use in the gameport driver. (Not the joystick 132 127 driver!) 133 128 134 129 :: 135 130 136 - int number; 131 + char name[32]; 137 132 138 - Number assigned to the gameport when registered. Informational purpose only. 133 + Driver's name as set by driver calling gameport_set_name(). Informational 134 + purpose only. 135 + 136 + :: 137 + 138 + char phys[32]; 139 + 140 + gameport's physical name/description as set by driver calling gameport_set_phys(). 141 + Informational purpose only. 139 142 140 143 :: 141 144 ··· 213 210 214 211 :: 215 212 216 - struct gameport_dev *dev; 217 - struct gameport *next; 213 + struct timer_list poll_timer; 214 + unsigned int poll_interval; /* in msecs */ 215 + spinlock_t timer_lock; 216 + unsigned int poll_cnt; 217 + void (*poll_handler)(struct gameport *); 218 + struct gameport *parent, *child; 219 + struct gameport_driver *drv; 220 + struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ 221 + struct device dev; 222 + struct list_head node; 218 223 219 224 For internal use by the gameport layer. 220 225