Commit | Line | Data |
---|---|---|
a9c5fff5 DB |
1 | # |
2 | # GPIO infrastructure and expanders | |
3 | # | |
4 | ||
5 | config HAVE_GPIO_LIB | |
6 | bool | |
7 | help | |
8 | Platforms select gpiolib if they use this infrastructure | |
9 | for all their GPIOs, usually starting with ones integrated | |
10 | into SOC processors. | |
11 | ||
12 | menu "GPIO Support" | |
13 | depends on HAVE_GPIO_LIB | |
14 | ||
15 | config DEBUG_GPIO | |
16 | bool "Debug GPIO calls" | |
17 | depends on DEBUG_KERNEL | |
18 | help | |
19 | Say Y here to add some extra checks and diagnostics to GPIO calls. | |
20 | The checks help ensure that GPIOs have been properly initialized | |
21 | before they are used and that sleeping calls aren not made from | |
22 | nonsleeping contexts. They can make bitbanged serial protocols | |
23 | slower. The diagnostics help catch the type of setup errors | |
24 | that are most common when setting up new platforms or boards. | |
25 | ||
d8f388d8 DB |
26 | config GPIO_SYSFS |
27 | bool "/sys/class/gpio/... (sysfs interface)" | |
28 | depends on SYSFS && EXPERIMENTAL | |
29 | help | |
30 | Say Y here to add a sysfs interface for GPIOs. | |
31 | ||
32 | This is mostly useful to work around omissions in a system's | |
33 | kernel support. Those are common in custom and semicustom | |
34 | hardware assembled using standard kernels with a minimum of | |
35 | custom patches. In those cases, userspace code may import | |
36 | a given GPIO from the kernel, if no kernel driver requested it. | |
37 | ||
38 | Kernel drivers may also request that a particular GPIO be | |
39 | exported to userspace; this can be useful when debugging. | |
40 | ||
a9c5fff5 DB |
41 | # put expanders in the right section, in alphabetical order |
42 | ||
43 | comment "I2C GPIO expanders:" | |
44 | ||
f3dc3630 | 45 | config GPIO_PCA953X |
7059d4b0 | 46 | tristate "PCA953x, PCA955x, and MAX7310 I/O ports" |
9e60fdcf | 47 | depends on I2C |
48 | help | |
7059d4b0 DB |
49 | Say yes here to provide access to several register-oriented |
50 | SMBus I/O expanders, made mostly by NXP or TI. Compatible | |
51 | models include: | |
52 | ||
53 | 4 bits: pca9536, pca9537 | |
54 | ||
55 | 8 bits: max7310, pca9534, pca9538, pca9554, pca9557 | |
56 | ||
57 | 16 bits: pca9535, pca9539, pca9555 | |
9e60fdcf | 58 | |
59 | This driver can also be built as a module. If so, the module | |
f3dc3630 | 60 | will be called pca953x. |
9e60fdcf | 61 | |
15fae37d | 62 | config GPIO_PCF857X |
1673ad52 | 63 | tristate "PCF857x, PCA{85,96}7x, and MAX732[89] I2C GPIO expanders" |
15fae37d DB |
64 | depends on I2C |
65 | help | |
66 | Say yes here to provide access to most "quasi-bidirectional" I2C | |
67 | GPIO expanders used for additional digital outputs or inputs. | |
68 | Most of these parts are from NXP, though TI is a second source for | |
69 | some of them. Compatible models include: | |
70 | ||
71 | 8 bits: pcf8574, pcf8574a, pca8574, pca8574a, | |
1673ad52 DB |
72 | pca9670, pca9672, pca9674, pca9674a, |
73 | max7328, max7329 | |
15fae37d DB |
74 | |
75 | 16 bits: pcf8575, pcf8575c, pca8575, | |
76 | pca9671, pca9673, pca9675 | |
77 | ||
78 | Your board setup code will need to declare the expanders in | |
79 | use, and assign numbers to the GPIOs they expose. Those GPIOs | |
80 | can then be used from drivers and other kernel code, just like | |
81 | other GPIOs, but only accessible from task contexts. | |
82 | ||
83 | This driver provides an in-kernel interface to those GPIOs using | |
84 | platform-neutral GPIO calls. | |
85 | ||
ff1d5c2f MB |
86 | comment "PCI GPIO expanders:" |
87 | ||
88 | config GPIO_BT8XX | |
89 | tristate "BT8XX GPIO abuser" | |
90 | depends on PCI && VIDEO_BT848=n | |
91 | help | |
92 | The BT8xx frame grabber chip has 24 GPIO pins than can be abused | |
93 | as a cheap PCI GPIO card. | |
94 | ||
95 | This chip can be found on Miro, Hauppauge and STB TV-cards. | |
96 | ||
97 | The card needs to be physically altered for using it as a | |
98 | GPIO card. For more information on how to build a GPIO card | |
99 | from a BT8xx TV card, see the documentation file at | |
100 | Documentation/bt8xxgpio.txt | |
101 | ||
102 | If unsure, say N. | |
103 | ||
a9c5fff5 DB |
104 | comment "SPI GPIO expanders:" |
105 | ||
0c36ec31 JB |
106 | config GPIO_MAX7301 |
107 | tristate "Maxim MAX7301 GPIO expander" | |
108 | depends on SPI_MASTER | |
109 | help | |
110 | gpio driver for Maxim MAX7301 SPI GPIO expander. | |
111 | ||
e58b9e27 DB |
112 | config GPIO_MCP23S08 |
113 | tristate "Microchip MCP23S08 I/O expander" | |
114 | depends on SPI_MASTER | |
115 | help | |
116 | SPI driver for Microchip MCP23S08 I/O expander. This provides | |
117 | a GPIO interface supporting inputs and outputs. | |
118 | ||
a9c5fff5 | 119 | endmenu |