Lines Matching full:your

62 If you use UIO for your card's driver, here's what you get:
66 - develop the main part of your driver in user space, with all the
69 - bugs in your driver won't crash the kernel.
71 - updates of your driver can take place without recompiling the kernel.
82 :c:func:`mmap()` to access registers or RAM locations of your card.
112 To handle interrupts properly, your custom kernel module can provide its
130 - ``name``: The name of your device. It is recommended to use the name
131 of your kernel module for this.
133 - ``version``: A version string defined by your driver. This allows the
134 user space part of your driver to deal with different versions of the
173 memory of mapping N, you have to use N times the page size as your
210 Writing your own kernel module
219 This structure tells the framework the details of your driver, Some of
222 - ``const char *name``: Required. The name of your driver as it will
223 appear in sysfs. I recommend using the name of your module for this.
238 - ``long irq``: Required. If your hardware generates an interrupt, it's
239 your modules task to determine the irq number during initialization.
251 function, you can set it here. If this pointer is not NULL, your
255 Optional. You might want to have your own :c:func:`open()`,
256 e.g. to enable interrupts only when your device is actually used.
259 Optional. If you define your own :c:func:`open()`, you will
268 Usually, your device will have one or more memory regions that can be
277 ``UIO_MEM_PHYS`` if you have physical memory on your card to be
283 address of your memory block. This address is the one that appears in
292 from within your kernel module, you will want to map it internally by
302 Sometimes, your device can have one or more port regions which can not
327 What you need to do in your interrupt handler depends on your hardware
329 code in your kernel interrupt handler low. If your hardware requires no
330 action that you *have* to perform after each interrupt, then your
333 If, on the other hand, your hardware *needs* some action to be performed
334 after each interrupt, then you *must* do it in your kernel module. Note
335 that you cannot rely on the userspace part of your driver. Your
336 userspace program can terminate at any time, possibly leaving your
339 There might also be applications where you want to read data from your
342 loss of data if your userspace program misses an interrupt.
344 A note on shared interrupts: Your driver should support interrupt
345 sharing whenever this is possible. It is possible if and only if your
346 driver can detect whether your hardware has triggered the interrupt or
348 your driver sees that the IRQ bit is actually set, it will perform its
350 that it was not your hardware that caused the interrupt, it will do
354 If you decide not to support shared interrupts, your card won't work in
363 generic way. In the same place where you define your
364 ``struct platform_device``, you simply also implement your interrupt
365 handler and fill your ``struct uio_info``. A pointer to this
366 ``struct uio_info`` is then used as ``platform_data`` for your platform
370 addresses and sizes of your memory mappings. This information is passed
404 implement your own.
462 Once you have a working kernel module for your hardware, you can write
463 the userspace part of your driver. You don't need any special libraries,
464 your driver can be written in any reasonable language, you can use
468 Getting information about your UIO device
472 you should do in your driver is check ``name`` and ``version`` to make
484 With ``lsuio`` you can quickly check if your kernel module is loaded and
489 lot of functions you could use in your userspace driver code.
499 meaning for UIO devices: It is used to select which mapping of your
501 N times the page size as your offset::
512 After you successfully mapped your devices memory, you can access it
514 After that, your hardware starts working and will generate an interrupt
515 as soon as it's finished, has some data available, or needs your
523 interrupt count of your device. If the value is one more than the value
547 If there already is a hardware specific kernel driver for your device,