.. | .. |
---|
274 | 274 | region, it will show up in the corresponding sysfs node. |
---|
275 | 275 | |
---|
276 | 276 | - ``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 |
---|
278 | 278 | 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. |
---|
281 | 281 | |
---|
282 | 282 | - ``phys_addr_t addr``: Required if the mapping is used. Fill in the |
---|
283 | 283 | address of your memory block. This address is the one that appears in |
---|
.. | .. |
---|
408 | 408 | internal registers to create the kernel part of the driver. All you need |
---|
409 | 409 | to know is the irq number of the pin the chip is connected to. |
---|
410 | 410 | |
---|
| 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 | + |
---|
411 | 418 | Using uio_dmem_genirq for platform devices |
---|
412 | 419 | ------------------------------------------ |
---|
413 | 420 | |
---|
.. | .. |
---|
463 | 470 | |
---|
464 | 471 | Information about all UIO devices is available in sysfs. The first thing |
---|
465 | 472 | 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. |
---|
468 | 475 | |
---|
469 | 476 | You should also make sure that the memory mapping you need exists and |
---|
470 | 477 | has the size you expect. |
---|