hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/Documentation/driver-api/uio-howto.rst
....@@ -274,10 +274,10 @@
274274 region, it will show up in the corresponding sysfs node.
275275
276276 - ``int memtype``: Required if the mapping is used. Set this to
277
- ``UIO_MEM_PHYS`` if you you have physical memory on your card to be
277
+ ``UIO_MEM_PHYS`` if you have physical memory on your card to be
278278 mapped. Use ``UIO_MEM_LOGICAL`` for logical memory (e.g. allocated
279
- with :c:func:`kmalloc()`). There's also ``UIO_MEM_VIRTUAL`` for
280
- virtual memory.
279
+ with :c:func:`__get_free_pages()` but not kmalloc()). There's also
280
+ ``UIO_MEM_VIRTUAL`` for virtual memory.
281281
282282 - ``phys_addr_t addr``: Required if the mapping is used. Fill in the
283283 address of your memory block. This address is the one that appears in
....@@ -408,6 +408,13 @@
408408 internal registers to create the kernel part of the driver. All you need
409409 to know is the irq number of the pin the chip is connected to.
410410
411
+When used in a device-tree enabled system, the driver needs to be
412
+probed with the ``"of_id"`` module parameter set to the ``"compatible"``
413
+string of the node the driver is supposed to handle. By default, the
414
+node's name (without the unit address) is exposed as name for the
415
+UIO device in userspace. To set a custom name, a property named
416
+``"linux,uio-name"`` may be specified in the DT node.
417
+
411418 Using uio_dmem_genirq for platform devices
412419 ------------------------------------------
413420
....@@ -463,8 +470,8 @@
463470
464471 Information about all UIO devices is available in sysfs. The first thing
465472 you should do in your driver is check ``name`` and ``version`` to make
466
-sure your talking to the right device and that its kernel driver has the
467
-version you expect.
473
+sure you're talking to the right device and that its kernel driver has
474
+the version you expect.
468475
469476 You should also make sure that the memory mapping you need exists and
470477 has the size you expect.