@@ -5,7 +5,7 @@ GPIO Driver Interface
5
5
This document serves as a guide for writers of GPIO chip drivers.
6
6
7
7
Each GPIO controller driver needs to include the following header, which defines
8
- the structures used to define a GPIO driver:
8
+ the structures used to define a GPIO driver::
9
9
10
10
#include <linux/gpio/driver.h>
11
11
@@ -398,12 +398,15 @@ provided. A big portion of overhead code will be managed by gpiolib,
398
398
under the assumption that your interrupts are 1-to-1-mapped to the
399
399
GPIO line index:
400
400
401
- GPIO line offset Hardware IRQ
402
- 0 0
403
- 1 1
404
- 2 2
405
- ... ...
406
- ngpio-1 ngpio-1
401
+ .. csv-table ::
402
+ :header: GPIO line offset, Hardware IRQ
403
+
404
+ 0,0
405
+ 1,1
406
+ 2,2
407
+ ...,...
408
+ ngpio-1, ngpio-1
409
+
407
410
408
411
If some GPIO lines do not have corresponding IRQs, the bitmask valid_mask
409
412
and the flag need_valid_mask in gpio_irq_chip can be used to mask off some
@@ -413,7 +416,7 @@ The preferred way to set up the helpers is to fill in the
413
416
struct gpio_irq_chip inside struct gpio_chip before adding the gpio_chip.
414
417
If you do this, the additional irq_chip will be set up by gpiolib at the
415
418
same time as setting up the rest of the GPIO functionality. The following
416
- is a typical example of a cascaded interrupt handler using gpio_irq_chip:
419
+ is a typical example of a cascaded interrupt handler using gpio_irq_chip::
417
420
418
421
.. code-block :: c
419
422
@@ -450,7 +453,7 @@ is a typical example of a cascaded interrupt handler using gpio_irq_chip:
450
453
return devm_gpiochip_add_data(dev, &g->gc, g);
451
454
452
455
The helper support using hierarchical interrupt controllers as well.
453
- In this case the typical set-up will look like this:
456
+ In this case the typical set-up will look like this::
454
457
455
458
.. code-block :: c
456
459
0 commit comments