summaryrefslogtreecommitdiff
path: root/Documentation/input/gameport-programming.rst
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-04-26 23:22:43 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-04-26 23:22:43 +0300
commit2f9ef0559efbee18a10a3ca26eefe57f69918693 (patch)
tree3c30d105078c06b51de764e703a59f6ae1c2bb5a /Documentation/input/gameport-programming.rst
parent0c855563182001c829065faa17f8e29e9ceffe13 (diff)
parent441ca977a84dadac6173db7c07c25db110b76c1e (diff)
downloadlinux-2f9ef0559efbee18a10a3ca26eefe57f69918693.tar.xz
Merge tag 'docs-5.13' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "It's been a relatively busy cycle in docsland, though more than usually well contained to Documentation/ itself. Highlights include: - The Chinese translators have been busy and show no signs of stopping anytime soon. Italian has also caught up. - Aditya Srivastava has been working on improvements to the kernel-doc script. - Thorsten continues his work on reporting-issues.rst and related documentation around regression reporting. - Lots of documentation updates, typo fixes, etc. as usual" * tag 'docs-5.13' of git://git.lwn.net/linux: (139 commits) docs/zh_CN: add openrisc translation to zh_CN index docs/zh_CN: add openrisc index.rst translation docs/zh_CN: add openrisc todo.rst translation docs/zh_CN: add openrisc openrisc_port.rst translation docs/zh_CN: add core api translation to zh_CN index docs/zh_CN: add core-api index.rst translation docs/zh_CN: add core-api irq index.rst translation docs/zh_CN: add core-api irq irqflags-tracing.rst translation docs/zh_CN: add core-api irq irq-domain.rst translation docs/zh_CN: add core-api irq irq-affinity.rst translation docs/zh_CN: add core-api irq concepts.rst translation docs: sphinx-pre-install: don't barf on beta Sphinx releases scripts: kernel-doc: improve parsing for kernel-doc comments syntax docs/zh_CN: two minor fixes in zh_CN/doc-guide/ Documentation: dev-tools: Add Testing Overview docs/zh_CN: add translations in zh_CN/dev-tools/gcov docs: reporting-issues: make people CC the regressions list MAINTAINERS: add regressions mailing list doc:it_IT: align Italian documentation docs/zh_CN: sync reporting-issues.rst ...
Diffstat (limited to 'Documentation/input/gameport-programming.rst')
-rw-r--r--Documentation/input/gameport-programming.rst35
1 files changed, 23 insertions, 12 deletions
diff --git a/Documentation/input/gameport-programming.rst b/Documentation/input/gameport-programming.rst
index c96911df1c54..7d7063ad0f9f 100644
--- a/Documentation/input/gameport-programming.rst
+++ b/Documentation/input/gameport-programming.rst
@@ -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
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.
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++)
axes[i] = my_mmio[i];
- buttons[i] = my_mmio[4];
+ buttons[0] = my_mmio[4];
}
int my_open(struct gameport *gameport, int mode)
@@ -117,25 +117,28 @@ Simple::
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 {
- void *private;
+ void *port_data;
A private pointer for free use in the gameport driver. (Not the joystick
driver!)
::
- int number;
+ char name[32];
+
+Driver's name as set by driver calling gameport_set_name(). Informational
+purpose only.
+
+::
+
+ char phys[32];
-Number assigned to the gameport when registered. Informational purpose only.
+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 gameport *next;
+ struct timer_list poll_timer;
+ 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.