0029-gpio-add-gpio-latch-driver.patch 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261
  1. diff -Nur linux-4.1.6.orig/drivers/gpio/gpio-latch.c linux-4.1.6/drivers/gpio/gpio-latch.c
  2. --- linux-4.1.6.orig/drivers/gpio/gpio-latch.c 1970-01-01 01:00:00.000000000 +0100
  3. +++ linux-4.1.6/drivers/gpio/gpio-latch.c 2015-09-16 00:47:41.982063655 +0200
  4. @@ -0,0 +1,220 @@
  5. +/*
  6. + * GPIO latch driver
  7. + *
  8. + * Copyright (C) 2014 Gabor Juhos <juhosg@openwrt.org>
  9. + *
  10. + * This program is free software; you can redistribute it and/or modify it
  11. + * under the terms of the GNU General Public License version 2 as published
  12. + * by the Free Software Foundation.
  13. + */
  14. +
  15. +#include <linux/kernel.h>
  16. +#include <linux/init.h>
  17. +#include <linux/module.h>
  18. +#include <linux/types.h>
  19. +#include <linux/gpio.h>
  20. +#include <linux/slab.h>
  21. +#include <linux/platform_device.h>
  22. +
  23. +#include <linux/platform_data/gpio-latch.h>
  24. +
  25. +struct gpio_latch_chip {
  26. + struct gpio_chip gc;
  27. +
  28. + struct mutex mutex;
  29. + struct mutex latch_mutex;
  30. + bool latch_enabled;
  31. + int le_gpio;
  32. + bool le_active_low;
  33. + int *gpios;
  34. +};
  35. +
  36. +static inline struct gpio_latch_chip *to_gpio_latch_chip(struct gpio_chip *gc)
  37. +{
  38. + return container_of(gc, struct gpio_latch_chip, gc);
  39. +}
  40. +
  41. +static void gpio_latch_lock(struct gpio_latch_chip *glc, bool enable)
  42. +{
  43. + mutex_lock(&glc->mutex);
  44. +
  45. + if (enable)
  46. + glc->latch_enabled = true;
  47. +
  48. + if (glc->latch_enabled)
  49. + mutex_lock(&glc->latch_mutex);
  50. +}
  51. +
  52. +static void gpio_latch_unlock(struct gpio_latch_chip *glc, bool disable)
  53. +{
  54. + if (glc->latch_enabled)
  55. + mutex_unlock(&glc->latch_mutex);
  56. +
  57. + if (disable)
  58. + glc->latch_enabled = true;
  59. +
  60. + mutex_unlock(&glc->mutex);
  61. +}
  62. +
  63. +static int
  64. +gpio_latch_get(struct gpio_chip *gc, unsigned offset)
  65. +{
  66. + struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
  67. + int ret;
  68. +
  69. + gpio_latch_lock(glc, false);
  70. + ret = gpio_get_value(glc->gpios[offset]);
  71. + gpio_latch_unlock(glc, false);
  72. +
  73. + return ret;
  74. +}
  75. +
  76. +static void
  77. +gpio_latch_set(struct gpio_chip *gc, unsigned offset, int value)
  78. +{
  79. + struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
  80. + bool enable_latch = false;
  81. + bool disable_latch = false;
  82. + int gpio;
  83. +
  84. + gpio = glc->gpios[offset];
  85. +
  86. + if (gpio == glc->le_gpio) {
  87. + enable_latch = value ^ glc->le_active_low;
  88. + disable_latch = !enable_latch;
  89. + }
  90. +
  91. + gpio_latch_lock(glc, enable_latch);
  92. + gpio_set_value(gpio, value);
  93. + gpio_latch_unlock(glc, disable_latch);
  94. +}
  95. +
  96. +static int
  97. +gpio_latch_direction_input(struct gpio_chip *gc, unsigned offset)
  98. +{
  99. + struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
  100. + int ret;
  101. +
  102. + gpio_latch_lock(glc, false);
  103. + ret = gpio_direction_input(glc->gpios[offset]);
  104. + gpio_latch_unlock(glc, false);
  105. +
  106. + return ret;
  107. +}
  108. +
  109. +static int
  110. +gpio_latch_direction_output(struct gpio_chip *gc, unsigned offset, int value)
  111. +{
  112. + struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
  113. + bool enable_latch = false;
  114. + bool disable_latch = false;
  115. + int gpio;
  116. + int ret;
  117. +
  118. + gpio = glc->gpios[offset];
  119. +
  120. + if (gpio == glc->le_gpio) {
  121. + enable_latch = value ^ glc->le_active_low;
  122. + disable_latch = !enable_latch;
  123. + }
  124. +
  125. + gpio_latch_lock(glc, enable_latch);
  126. + ret = gpio_direction_output(gpio, value);
  127. + gpio_latch_unlock(glc, disable_latch);
  128. +
  129. + return ret;
  130. +}
  131. +
  132. +static int gpio_latch_probe(struct platform_device *pdev)
  133. +{
  134. + struct gpio_latch_chip *glc;
  135. + struct gpio_latch_platform_data *pdata;
  136. + struct gpio_chip *gc;
  137. + int size;
  138. + int ret;
  139. + int i;
  140. +
  141. + pdata = dev_get_platdata(&pdev->dev);
  142. + if (!pdata)
  143. + return -EINVAL;
  144. +
  145. + if (pdata->le_gpio_index >= pdata->num_gpios ||
  146. + !pdata->num_gpios ||
  147. + !pdata->gpios)
  148. + return -EINVAL;
  149. +
  150. + for (i = 0; i < pdata->num_gpios; i++) {
  151. + int gpio = pdata->gpios[i];
  152. +
  153. + ret = devm_gpio_request(&pdev->dev, gpio,
  154. + GPIO_LATCH_DRIVER_NAME);
  155. + if (ret)
  156. + return ret;
  157. + }
  158. +
  159. + glc = devm_kzalloc(&pdev->dev, sizeof(*glc), GFP_KERNEL);
  160. + if (!glc)
  161. + return -ENOMEM;
  162. +
  163. + mutex_init(&glc->mutex);
  164. + mutex_init(&glc->latch_mutex);
  165. +
  166. + size = pdata->num_gpios * sizeof(glc->gpios[0]);
  167. + glc->gpios = devm_kzalloc(&pdev->dev, size , GFP_KERNEL);
  168. + if (!glc->gpios)
  169. + return -ENOMEM;
  170. +
  171. + memcpy(glc->gpios, pdata->gpios, size);
  172. +
  173. + glc->le_gpio = glc->gpios[pdata->le_gpio_index];
  174. + glc->le_active_low = pdata->le_active_low;
  175. +
  176. + gc = &glc->gc;
  177. +
  178. + gc->label = GPIO_LATCH_DRIVER_NAME;
  179. + gc->base = pdata->base;
  180. + gc->can_sleep = true;
  181. + gc->ngpio = pdata->num_gpios;
  182. + gc->get = gpio_latch_get;
  183. + gc->set = gpio_latch_set;
  184. + gc->direction_input = gpio_latch_direction_input,
  185. + gc->direction_output = gpio_latch_direction_output;
  186. +
  187. + platform_set_drvdata(pdev, glc);
  188. +
  189. + ret = gpiochip_add(&glc->gc);
  190. + if (ret)
  191. + return ret;
  192. +
  193. + return 0;
  194. +}
  195. +
  196. +static int gpio_latch_remove(struct platform_device *pdev)
  197. +{
  198. + struct gpio_latch_chip *glc = platform_get_drvdata(pdev);
  199. +
  200. + gpiochip_remove(&glc->gc);
  201. + return 0;
  202. +}
  203. +
  204. +
  205. +static struct platform_driver gpio_latch_driver = {
  206. + .probe = gpio_latch_probe,
  207. + .remove = gpio_latch_remove,
  208. + .driver = {
  209. + .name = GPIO_LATCH_DRIVER_NAME,
  210. + .owner = THIS_MODULE,
  211. + },
  212. +};
  213. +
  214. +static int __init gpio_latch_init(void)
  215. +{
  216. + return platform_driver_register(&gpio_latch_driver);
  217. +}
  218. +
  219. +postcore_initcall(gpio_latch_init);
  220. +
  221. +MODULE_DESCRIPTION("GPIO latch driver");
  222. +MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
  223. +MODULE_LICENSE("GPL v2");
  224. +MODULE_ALIAS("platform:" GPIO_LATCH_DRIVER_NAME);
  225. diff -Nur linux-4.1.6.orig/drivers/gpio/Kconfig linux-4.1.6/drivers/gpio/Kconfig
  226. --- linux-4.1.6.orig/drivers/gpio/Kconfig 2015-08-17 05:52:51.000000000 +0200
  227. +++ linux-4.1.6/drivers/gpio/Kconfig 2015-09-16 00:47:15.279630571 +0200
  228. @@ -988,4 +988,9 @@
  229. endmenu
  230. +config GPIO_LATCH
  231. + tristate "GPIO latch driver"
  232. + help
  233. + Say yes here to enable a GPIO latch driver.
  234. +
  235. endif
  236. diff -Nur linux-4.1.6.orig/drivers/gpio/Kconfig.orig linux-4.1.6/drivers/gpio/Kconfig.orig
  237. --- linux-4.1.6.orig/drivers/gpio/Kconfig.orig 1970-01-01 01:00:00.000000000 +0100
  238. +++ linux-4.1.6/drivers/gpio/Kconfig.orig 2015-08-17 05:52:51.000000000 +0200
  239. @@ -0,0 +1,991 @@
  240. +#
  241. +# GPIO infrastructure and drivers
  242. +#
  243. +
  244. +config ARCH_HAVE_CUSTOM_GPIO_H
  245. + bool
  246. + help
  247. + Selecting this config option from the architecture Kconfig allows
  248. + the architecture to provide a custom asm/gpio.h implementation
  249. + overriding the default implementations. New uses of this are
  250. + strongly discouraged.
  251. +
  252. +config ARCH_WANT_OPTIONAL_GPIOLIB
  253. + bool
  254. + help
  255. + Select this config option from the architecture Kconfig, if
  256. + it is possible to use gpiolib on the architecture, but let the
  257. + user decide whether to actually build it or not.
  258. + Select this instead of ARCH_REQUIRE_GPIOLIB, if your architecture does
  259. + not depend on GPIOs being available, but rather let the user
  260. + decide whether he needs it or not.
  261. +
  262. +config ARCH_REQUIRE_GPIOLIB
  263. + bool
  264. + select GPIOLIB
  265. + help
  266. + Platforms select gpiolib if they use this infrastructure
  267. + for all their GPIOs, usually starting with ones integrated
  268. + into SOC processors.
  269. + Selecting this from the architecture code will cause the gpiolib
  270. + code to always get built in.
  271. +
  272. +
  273. +menuconfig GPIOLIB
  274. + bool "GPIO Support"
  275. + depends on ARCH_WANT_OPTIONAL_GPIOLIB || ARCH_REQUIRE_GPIOLIB
  276. + help
  277. + This enables GPIO support through the generic GPIO library.
  278. + You only need to enable this, if you also want to enable
  279. + one or more of the GPIO drivers below.
  280. +
  281. + If unsure, say N.
  282. +
  283. +if GPIOLIB
  284. +
  285. +config GPIO_DEVRES
  286. + def_bool y
  287. + depends on HAS_IOMEM
  288. +
  289. +config OF_GPIO
  290. + def_bool y
  291. + depends on OF
  292. +
  293. +config GPIO_ACPI
  294. + def_bool y
  295. + depends on ACPI
  296. +
  297. +config GPIOLIB_IRQCHIP
  298. + select IRQ_DOMAIN
  299. + bool
  300. +
  301. +config DEBUG_GPIO
  302. + bool "Debug GPIO calls"
  303. + depends on DEBUG_KERNEL
  304. + help
  305. + Say Y here to add some extra checks and diagnostics to GPIO calls.
  306. + These checks help ensure that GPIOs have been properly initialized
  307. + before they are used, and that sleeping calls are not made from
  308. + non-sleeping contexts. They can make bitbanged serial protocols
  309. + slower. The diagnostics help catch the type of setup errors
  310. + that are most common when setting up new platforms or boards.
  311. +
  312. +config GPIO_SYSFS
  313. + bool "/sys/class/gpio/... (sysfs interface)"
  314. + depends on SYSFS
  315. + help
  316. + Say Y here to add a sysfs interface for GPIOs.
  317. +
  318. + This is mostly useful to work around omissions in a system's
  319. + kernel support. Those are common in custom and semicustom
  320. + hardware assembled using standard kernels with a minimum of
  321. + custom patches. In those cases, userspace code may import
  322. + a given GPIO from the kernel, if no kernel driver requested it.
  323. +
  324. + Kernel drivers may also request that a particular GPIO be
  325. + exported to userspace; this can be useful when debugging.
  326. +
  327. +config GPIO_GENERIC
  328. + tristate
  329. +
  330. +# put drivers in the right section, in alphabetical order
  331. +
  332. +# This symbol is selected by both I2C and SPI expanders
  333. +config GPIO_MAX730X
  334. + tristate
  335. +
  336. +menu "Memory mapped GPIO drivers"
  337. +
  338. +config GPIO_74XX_MMIO
  339. + tristate "GPIO driver for 74xx-ICs with MMIO access"
  340. + depends on OF_GPIO
  341. + select GPIO_GENERIC
  342. + help
  343. + Say yes here to support GPIO functionality for 74xx-compatible ICs
  344. + with MMIO access. Compatible models include:
  345. + 1 bit: 741G125 (Input), 741G74 (Output)
  346. + 2 bits: 742G125 (Input), 7474 (Output)
  347. + 4 bits: 74125 (Input), 74175 (Output)
  348. + 6 bits: 74365 (Input), 74174 (Output)
  349. + 8 bits: 74244 (Input), 74273 (Output)
  350. + 16 bits: 741624 (Input), 7416374 (Output)
  351. +
  352. +config GPIO_ALTERA
  353. + tristate "Altera GPIO"
  354. + depends on OF_GPIO
  355. + select GPIO_GENERIC
  356. + select GPIOLIB_IRQCHIP
  357. + help
  358. + Say Y or M here to build support for the Altera PIO device.
  359. +
  360. + If driver is built as a module it will be called gpio-altera.
  361. +
  362. +config GPIO_BCM_KONA
  363. + bool "Broadcom Kona GPIO"
  364. + depends on OF_GPIO && (ARCH_BCM_MOBILE || COMPILE_TEST)
  365. + help
  366. + Turn on GPIO support for Broadcom "Kona" chips.
  367. +
  368. +config GPIO_CLPS711X
  369. + tristate "CLPS711X GPIO support"
  370. + depends on ARCH_CLPS711X || COMPILE_TEST
  371. + select GPIO_GENERIC
  372. + help
  373. + Say yes here to support GPIO on CLPS711X SoCs.
  374. +
  375. +config GPIO_DAVINCI
  376. + bool "TI Davinci/Keystone GPIO support"
  377. + default y if ARCH_DAVINCI
  378. + depends on ARM && (ARCH_DAVINCI || ARCH_KEYSTONE)
  379. + help
  380. + Say yes here to enable GPIO support for TI Davinci/Keystone SoCs.
  381. +
  382. +config GPIO_DWAPB
  383. + tristate "Synopsys DesignWare APB GPIO driver"
  384. + select GPIO_GENERIC
  385. + select GENERIC_IRQ_CHIP
  386. + help
  387. + Say Y or M here to build support for the Synopsys DesignWare APB
  388. + GPIO block.
  389. +
  390. +config GPIO_EM
  391. + tristate "Emma Mobile GPIO"
  392. + depends on ARM && OF_GPIO
  393. + help
  394. + Say yes here to support GPIO on Renesas Emma Mobile SoCs.
  395. +
  396. +config GPIO_EP93XX
  397. + def_bool y
  398. + depends on ARCH_EP93XX
  399. + select GPIO_GENERIC
  400. +
  401. +config GPIO_F7188X
  402. + tristate "F71869, F71869A, F71882FG and F71889F GPIO support"
  403. + depends on X86
  404. + help
  405. + This option enables support for GPIOs found on Fintek Super-I/O
  406. + chips F71869, F71869A, F71882FG and F71889F.
  407. +
  408. + To compile this driver as a module, choose M here: the module will
  409. + be called f7188x-gpio.
  410. +
  411. +config GPIO_GE_FPGA
  412. + bool "GE FPGA based GPIO"
  413. + depends on GE_FPGA
  414. + select GPIO_GENERIC
  415. + help
  416. + Support for common GPIO functionality provided on some GE Single Board
  417. + Computers.
  418. +
  419. + This driver provides basic support (configure as input or output, read
  420. + and write pin state) for GPIO implemented in a number of GE single
  421. + board computers.
  422. +
  423. +config GPIO_GENERIC_PLATFORM
  424. + tristate "Generic memory-mapped GPIO controller support (MMIO platform device)"
  425. + select GPIO_GENERIC
  426. + help
  427. + Say yes here to support basic platform_device memory-mapped GPIO controllers.
  428. +
  429. +config GPIO_GRGPIO
  430. + tristate "Aeroflex Gaisler GRGPIO support"
  431. + depends on OF
  432. + select GPIO_GENERIC
  433. + select IRQ_DOMAIN
  434. + help
  435. + Select this to support Aeroflex Gaisler GRGPIO cores from the GRLIB
  436. + VHDL IP core library.
  437. +
  438. +config GPIO_ICH
  439. + tristate "Intel ICH GPIO"
  440. + depends on PCI && X86
  441. + select MFD_CORE
  442. + select LPC_ICH
  443. + help
  444. + Say yes here to support the GPIO functionality of a number of Intel
  445. + ICH-based chipsets. Currently supported devices: ICH6, ICH7, ICH8
  446. + ICH9, ICH10, Series 5/3400 (eg Ibex Peak), Series 6/C200 (eg
  447. + Cougar Point), NM10 (Tiger Point), and 3100 (Whitmore Lake).
  448. +
  449. + If unsure, say N.
  450. +
  451. +config GPIO_IOP
  452. + tristate "Intel IOP GPIO"
  453. + depends on ARM && (ARCH_IOP32X || ARCH_IOP33X)
  454. + help
  455. + Say yes here to support the GPIO functionality of a number of Intel
  456. + IOP32X or IOP33X.
  457. +
  458. + If unsure, say N.
  459. +
  460. +config GPIO_IT8761E
  461. + tristate "IT8761E GPIO support"
  462. + depends on X86 # unconditional access to IO space.
  463. + help
  464. + Say yes here to support GPIO functionality of IT8761E super I/O chip.
  465. +
  466. +config GPIO_LOONGSON
  467. + bool "Loongson-2/3 GPIO support"
  468. + depends on CPU_LOONGSON2 || CPU_LOONGSON3
  469. + help
  470. + driver for GPIO functionality on Loongson-2F/3A/3B processors.
  471. +
  472. +config GPIO_LYNXPOINT
  473. + tristate "Intel Lynxpoint GPIO support"
  474. + depends on ACPI && X86
  475. + select GPIOLIB_IRQCHIP
  476. + help
  477. + driver for GPIO functionality on Intel Lynxpoint PCH chipset
  478. + Requires ACPI device enumeration code to set up a platform device.
  479. +
  480. +config GPIO_MB86S7X
  481. + bool "GPIO support for Fujitsu MB86S7x Platforms"
  482. + depends on ARCH_MB86S7X
  483. + help
  484. + Say yes here to support the GPIO controller in Fujitsu MB86S70 SoCs.
  485. +
  486. +config GPIO_MM_LANTIQ
  487. + bool "Lantiq Memory mapped GPIOs"
  488. + depends on LANTIQ && SOC_XWAY
  489. + help
  490. + This enables support for memory mapped GPIOs on the External Bus Unit
  491. + (EBU) found on Lantiq SoCs. The gpios are output only as they are
  492. + created by attaching a 16bit latch to the bus.
  493. +
  494. +config GPIO_MOXART
  495. + bool "MOXART GPIO support"
  496. + depends on ARCH_MOXART
  497. + select GPIO_GENERIC
  498. + help
  499. + Select this option to enable GPIO driver for
  500. + MOXA ART SoC devices.
  501. +
  502. +config GPIO_MPC5200
  503. + def_bool y
  504. + depends on PPC_MPC52xx
  505. +
  506. +config GPIO_MPC8XXX
  507. + bool "MPC512x/MPC8xxx GPIO support"
  508. + depends on PPC_MPC512x || PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || \
  509. + FSL_SOC_BOOKE || PPC_86xx
  510. + help
  511. + Say Y here if you're going to use hardware that connects to the
  512. + MPC512x/831x/834x/837x/8572/8610 GPIOs.
  513. +
  514. +config GPIO_MSM_V2
  515. + tristate "Qualcomm MSM GPIO v2"
  516. + depends on GPIOLIB && OF && ARCH_QCOM
  517. + help
  518. + Say yes here to support the GPIO interface on ARM v7 based
  519. + Qualcomm MSM chips. Most of the pins on the MSM can be
  520. + selected for GPIO, and are controlled by this driver.
  521. +
  522. +config GPIO_MVEBU
  523. + def_bool y
  524. + depends on PLAT_ORION
  525. + depends on OF
  526. + select GPIO_GENERIC
  527. + select GENERIC_IRQ_CHIP
  528. +
  529. +config GPIO_MXC
  530. + def_bool y
  531. + depends on ARCH_MXC
  532. + select GPIO_GENERIC
  533. + select GENERIC_IRQ_CHIP
  534. +
  535. +config GPIO_MXS
  536. + def_bool y
  537. + depends on ARCH_MXS
  538. + select GPIO_GENERIC
  539. + select GENERIC_IRQ_CHIP
  540. +
  541. +config GPIO_OCTEON
  542. + tristate "Cavium OCTEON GPIO"
  543. + depends on GPIOLIB && CAVIUM_OCTEON_SOC
  544. + default y
  545. + help
  546. + Say yes here to support the on-chip GPIO lines on the OCTEON
  547. + family of SOCs.
  548. +
  549. +config GPIO_OMAP
  550. + bool "TI OMAP GPIO support" if COMPILE_TEST && !ARCH_OMAP2PLUS
  551. + default y if ARCH_OMAP
  552. + depends on ARM
  553. + select GENERIC_IRQ_CHIP
  554. + select GPIOLIB_IRQCHIP
  555. + help
  556. + Say yes here to enable GPIO support for TI OMAP SoCs.
  557. +
  558. +config GPIO_PL061
  559. + bool "PrimeCell PL061 GPIO support"
  560. + depends on ARM_AMBA
  561. + select IRQ_DOMAIN
  562. + select GPIOLIB_IRQCHIP
  563. + help
  564. + Say yes here to support the PrimeCell PL061 GPIO device
  565. +
  566. +config GPIO_PXA
  567. + bool "PXA GPIO support"
  568. + depends on ARCH_PXA || ARCH_MMP
  569. + help
  570. + Say yes here to support the PXA GPIO device
  571. +
  572. +config GPIO_RCAR
  573. + tristate "Renesas R-Car GPIO"
  574. + depends on ARM && (ARCH_SHMOBILE || COMPILE_TEST)
  575. + select GPIOLIB_IRQCHIP
  576. + help
  577. + Say yes here to support GPIO on Renesas R-Car SoCs.
  578. +
  579. +config GPIO_SAMSUNG
  580. + bool
  581. + depends on PLAT_SAMSUNG
  582. + help
  583. + Legacy GPIO support. Use only for platforms without support for
  584. + pinctrl.
  585. +
  586. +config GPIO_SCH
  587. + tristate "Intel SCH/TunnelCreek/Centerton/Quark X1000 GPIO"
  588. + depends on PCI && X86
  589. + select MFD_CORE
  590. + select LPC_SCH
  591. + help
  592. + Say yes here to support GPIO interface on Intel Poulsbo SCH,
  593. + Intel Tunnel Creek processor, Intel Centerton processor or
  594. + Intel Quark X1000 SoC.
  595. +
  596. + The Intel SCH contains a total of 14 GPIO pins. Ten GPIOs are
  597. + powered by the core power rail and are turned off during sleep
  598. + modes (S3 and higher). The remaining four GPIOs are powered by
  599. + the Intel SCH suspend power supply. These GPIOs remain
  600. + active during S3. The suspend powered GPIOs can be used to wake the
  601. + system from the Suspend-to-RAM state.
  602. +
  603. + The Intel Tunnel Creek processor has 5 GPIOs powered by the
  604. + core power rail and 9 from suspend power supply.
  605. +
  606. + The Intel Centerton processor has a total of 30 GPIO pins.
  607. + Twenty-one are powered by the core power rail and 9 from the
  608. + suspend power supply.
  609. +
  610. + The Intel Quark X1000 SoC has 2 GPIOs powered by the core
  611. + power well and 6 from the suspend power well.
  612. +
  613. +config GPIO_SCH311X
  614. + tristate "SMSC SCH311x SuperI/O GPIO"
  615. + help
  616. + Driver to enable the GPIOs found on SMSC SMSC SCH3112, SCH3114 and
  617. + SCH3116 "Super I/O" chipsets.
  618. +
  619. + To compile this driver as a module, choose M here: the module will
  620. + be called gpio-sch311x.
  621. +
  622. +config GPIO_SPEAR_SPICS
  623. + bool "ST SPEAr13xx SPI Chip Select as GPIO support"
  624. + depends on PLAT_SPEAR
  625. + select GENERIC_IRQ_CHIP
  626. + help
  627. + Say yes here to support ST SPEAr SPI Chip Select as GPIO device
  628. +
  629. +config GPIO_STA2X11
  630. + bool "STA2x11/ConneXt GPIO support"
  631. + depends on MFD_STA2X11
  632. + select GENERIC_IRQ_CHIP
  633. + help
  634. + Say yes here to support the STA2x11/ConneXt GPIO device.
  635. + The GPIO module has 128 GPIO pins with alternate functions.
  636. +
  637. +config GPIO_STP_XWAY
  638. + bool "XWAY STP GPIOs"
  639. + depends on SOC_XWAY
  640. + help
  641. + This enables support for the Serial To Parallel (STP) unit found on
  642. + XWAY SoC. The STP allows the SoC to drive a shift registers cascade,
  643. + that can be up to 24 bit. This peripheral is aimed at driving leds.
  644. + Some of the gpios/leds can be auto updated by the soc with dsl and
  645. + phy status.
  646. +
  647. +config GPIO_SYSCON
  648. + tristate "GPIO based on SYSCON"
  649. + depends on MFD_SYSCON && OF
  650. + help
  651. + Say yes here to support GPIO functionality though SYSCON driver.
  652. +
  653. +config GPIO_TB10X
  654. + bool
  655. + select GENERIC_IRQ_CHIP
  656. + select OF_GPIO
  657. +
  658. +config GPIO_TS5500
  659. + tristate "TS-5500 DIO blocks and compatibles"
  660. + depends on TS5500 || COMPILE_TEST
  661. + help
  662. + This driver supports Digital I/O exposed by pin blocks found on some
  663. + Technologic Systems platforms. It includes, but is not limited to, 3
  664. + blocks of the TS-5500: DIO1, DIO2 and the LCD port, and the TS-5600
  665. + LCD port.
  666. +
  667. +config GPIO_TZ1090
  668. + bool "Toumaz Xenif TZ1090 GPIO support"
  669. + depends on SOC_TZ1090
  670. + select GENERIC_IRQ_CHIP
  671. + default y
  672. + help
  673. + Say yes here to support Toumaz Xenif TZ1090 GPIOs.
  674. +
  675. +config GPIO_TZ1090_PDC
  676. + bool "Toumaz Xenif TZ1090 PDC GPIO support"
  677. + depends on SOC_TZ1090
  678. + default y
  679. + help
  680. + Say yes here to support Toumaz Xenif TZ1090 PDC GPIOs.
  681. +
  682. +config GPIO_VF610
  683. + def_bool y
  684. + depends on ARCH_MXC && SOC_VF610
  685. + select GPIOLIB_IRQCHIP
  686. + help
  687. + Say yes here to support Vybrid vf610 GPIOs.
  688. +
  689. +config GPIO_VR41XX
  690. + tristate "NEC VR4100 series General-purpose I/O Uint support"
  691. + depends on CPU_VR41XX
  692. + help
  693. + Say yes here to support the NEC VR4100 series General-purpose I/O Uint
  694. +
  695. +config GPIO_VX855
  696. + tristate "VIA VX855/VX875 GPIO"
  697. + depends on PCI
  698. + select MFD_CORE
  699. + select MFD_VX855
  700. + help
  701. + Support access to the VX855/VX875 GPIO lines through the gpio library.
  702. +
  703. + This driver provides common support for accessing the device,
  704. + additional drivers must be enabled in order to use the
  705. + functionality of the device.
  706. +
  707. +config GPIO_XGENE
  708. + bool "APM X-Gene GPIO controller support"
  709. + depends on ARM64 && OF_GPIO
  710. + help
  711. + This driver is to support the GPIO block within the APM X-Gene SoC
  712. + platform's generic flash controller. The GPIO pins are muxed with
  713. + the generic flash controller's address and data pins. Say yes
  714. + here to enable the GFC GPIO functionality.
  715. +
  716. +config GPIO_XGENE_SB
  717. + tristate "APM X-Gene GPIO standby controller support"
  718. + depends on ARCH_XGENE && OF_GPIO
  719. + select GPIO_GENERIC
  720. + help
  721. + This driver supports the GPIO block within the APM X-Gene
  722. + Standby Domain. Say yes here to enable the GPIO functionality.
  723. +
  724. +config GPIO_XILINX
  725. + tristate "Xilinx GPIO support"
  726. + depends on OF_GPIO && (PPC || MICROBLAZE || ARCH_ZYNQ || X86)
  727. + help
  728. + Say yes here to support the Xilinx FPGA GPIO device
  729. +
  730. +config GPIO_XTENSA
  731. + bool "Xtensa GPIO32 support"
  732. + depends on XTENSA
  733. + depends on HAVE_XTENSA_GPIO32
  734. + depends on !SMP
  735. + help
  736. + Say yes here to support the Xtensa internal GPIO32 IMPWIRE (input)
  737. + and EXPSTATE (output) ports
  738. +
  739. +config GPIO_ZEVIO
  740. + bool "LSI ZEVIO SoC memory mapped GPIOs"
  741. + depends on ARM && OF_GPIO
  742. + help
  743. + Say yes here to support the GPIO controller in LSI ZEVIO SoCs.
  744. +
  745. +config GPIO_ZYNQ
  746. + tristate "Xilinx Zynq GPIO support"
  747. + depends on ARCH_ZYNQ
  748. + select GPIOLIB_IRQCHIP
  749. + help
  750. + Say yes here to support Xilinx Zynq GPIO controller.
  751. +
  752. +endmenu
  753. +
  754. +menu "I2C GPIO expanders"
  755. + depends on I2C
  756. +
  757. +config GPIO_ADP5588
  758. + tristate "ADP5588 I2C GPIO expander"
  759. + depends on I2C
  760. + help
  761. + This option enables support for 18 GPIOs found
  762. + on Analog Devices ADP5588 GPIO Expanders.
  763. +
  764. +config GPIO_ADP5588_IRQ
  765. + bool "Interrupt controller support for ADP5588"
  766. + depends on GPIO_ADP5588=y
  767. + help
  768. + Say yes here to enable the adp5588 to be used as an interrupt
  769. + controller. It requires the driver to be built in the kernel.
  770. +
  771. +config GPIO_ADNP
  772. + tristate "Avionic Design N-bit GPIO expander"
  773. + depends on I2C && OF_GPIO
  774. + select GPIOLIB_IRQCHIP
  775. + help
  776. + This option enables support for N GPIOs found on Avionic Design
  777. + I2C GPIO expanders. The register space will be extended by powers
  778. + of two, so the controller will need to accommodate for that. For
  779. + example: if a controller provides 48 pins, 6 registers will be
  780. + enough to represent all pins, but the driver will assume a
  781. + register layout for 64 pins (8 registers).
  782. +
  783. +config GPIO_MAX7300
  784. + tristate "Maxim MAX7300 GPIO expander"
  785. + depends on I2C
  786. + select GPIO_MAX730X
  787. + help
  788. + GPIO driver for Maxim MAX7300 I2C-based GPIO expander.
  789. +
  790. +config GPIO_MAX732X
  791. + tristate "MAX7319, MAX7320-7327 I2C Port Expanders"
  792. + depends on I2C
  793. + help
  794. + Say yes here to support the MAX7319, MAX7320-7327 series of I2C
  795. + Port Expanders. Each IO port on these chips has a fixed role of
  796. + Input (designated by 'I'), Push-Pull Output ('O'), or Open-Drain
  797. + Input and Output (designed by 'P'). The combinations are listed
  798. + below:
  799. +
  800. + 8 bits: max7319 (8I), max7320 (8O), max7321 (8P),
  801. + max7322 (4I4O), max7323 (4P4O)
  802. +
  803. + 16 bits: max7324 (8I8O), max7325 (8P8O),
  804. + max7326 (4I12O), max7327 (4P12O)
  805. +
  806. + Board setup code must specify the model to use, and the start
  807. + number for these GPIOs.
  808. +
  809. +config GPIO_MAX732X_IRQ
  810. + bool "Interrupt controller support for MAX732x"
  811. + depends on GPIO_MAX732X=y
  812. + select GPIOLIB_IRQCHIP
  813. + help
  814. + Say yes here to enable the max732x to be used as an interrupt
  815. + controller. It requires the driver to be built in the kernel.
  816. +
  817. +config GPIO_MC9S08DZ60
  818. + bool "MX35 3DS BOARD MC9S08DZ60 GPIO functions"
  819. + depends on I2C=y && MACH_MX35_3DS
  820. + help
  821. + Select this to enable the MC9S08DZ60 GPIO driver
  822. +
  823. +config GPIO_PCA953X
  824. + tristate "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports"
  825. + depends on I2C
  826. + help
  827. + Say yes here to provide access to several register-oriented
  828. + SMBus I/O expanders, made mostly by NXP or TI. Compatible
  829. + models include:
  830. +
  831. + 4 bits: pca9536, pca9537
  832. +
  833. + 8 bits: max7310, max7315, pca6107, pca9534, pca9538, pca9554,
  834. + pca9556, pca9557, pca9574, tca6408, xra1202
  835. +
  836. + 16 bits: max7312, max7313, pca9535, pca9539, pca9555, pca9575,
  837. + tca6416
  838. +
  839. + 24 bits: tca6424
  840. +
  841. + 40 bits: pca9505, pca9698
  842. +
  843. +config GPIO_PCA953X_IRQ
  844. + bool "Interrupt controller support for PCA953x"
  845. + depends on GPIO_PCA953X=y
  846. + select GPIOLIB_IRQCHIP
  847. + help
  848. + Say yes here to enable the pca953x to be used as an interrupt
  849. + controller. It requires the driver to be built in the kernel.
  850. +
  851. +config GPIO_PCF857X
  852. + tristate "PCF857x, PCA{85,96}7x, and MAX732[89] I2C GPIO expanders"
  853. + depends on I2C
  854. + select GPIOLIB_IRQCHIP
  855. + select IRQ_DOMAIN
  856. + help
  857. + Say yes here to provide access to most "quasi-bidirectional" I2C
  858. + GPIO expanders used for additional digital outputs or inputs.
  859. + Most of these parts are from NXP, though TI is a second source for
  860. + some of them. Compatible models include:
  861. +
  862. + 8 bits: pcf8574, pcf8574a, pca8574, pca8574a,
  863. + pca9670, pca9672, pca9674, pca9674a,
  864. + max7328, max7329
  865. +
  866. + 16 bits: pcf8575, pcf8575c, pca8575,
  867. + pca9671, pca9673, pca9675
  868. +
  869. + Your board setup code will need to declare the expanders in
  870. + use, and assign numbers to the GPIOs they expose. Those GPIOs
  871. + can then be used from drivers and other kernel code, just like
  872. + other GPIOs, but only accessible from task contexts.
  873. +
  874. + This driver provides an in-kernel interface to those GPIOs using
  875. + platform-neutral GPIO calls.
  876. +
  877. +config GPIO_SX150X
  878. + bool "Semtech SX150x I2C GPIO expander"
  879. + depends on I2C=y
  880. + select GPIOLIB_IRQCHIP
  881. + default n
  882. + help
  883. + Say yes here to provide support for Semtech SX150-series I2C
  884. + GPIO expanders. Compatible models include:
  885. +
  886. + 8 bits: sx1508q
  887. + 16 bits: sx1509q
  888. +
  889. +endmenu
  890. +
  891. +menu "MFD GPIO expanders"
  892. +
  893. +config GPIO_ADP5520
  894. + tristate "GPIO Support for ADP5520 PMIC"
  895. + depends on PMIC_ADP5520
  896. + help
  897. + This option enables support for on-chip GPIO found
  898. + on Analog Devices ADP5520 PMICs.
  899. +
  900. +config GPIO_ARIZONA
  901. + tristate "Wolfson Microelectronics Arizona class devices"
  902. + depends on MFD_ARIZONA
  903. + help
  904. + Support for GPIOs on Wolfson Arizona class devices.
  905. +
  906. +config GPIO_CRYSTAL_COVE
  907. + tristate "GPIO support for Crystal Cove PMIC"
  908. + depends on INTEL_SOC_PMIC
  909. + select GPIOLIB_IRQCHIP
  910. + help
  911. + Support for GPIO pins on Crystal Cove PMIC.
  912. +
  913. + Say Yes if you have a Intel SoC based tablet with Crystal Cove PMIC
  914. + inside.
  915. +
  916. + This driver can also be built as a module. If so, the module will be
  917. + called gpio-crystalcove.
  918. +
  919. +config GPIO_CS5535
  920. + tristate "AMD CS5535/CS5536 GPIO support"
  921. + depends on MFD_CS5535
  922. + help
  923. + The AMD CS5535 and CS5536 southbridges support 28 GPIO pins that
  924. + can be used for quite a number of things. The CS5535/6 is found on
  925. + AMD Geode and Lemote Yeeloong devices.
  926. +
  927. + If unsure, say N.
  928. +
  929. +config GPIO_DA9052
  930. + tristate "Dialog DA9052 GPIO"
  931. + depends on PMIC_DA9052
  932. + help
  933. + Say yes here to enable the GPIO driver for the DA9052 chip.
  934. +
  935. +config GPIO_DA9055
  936. + tristate "Dialog Semiconductor DA9055 GPIO"
  937. + depends on MFD_DA9055
  938. + help
  939. + Say yes here to enable the GPIO driver for the DA9055 chip.
  940. +
  941. + The Dialog DA9055 PMIC chip has 3 GPIO pins that can be
  942. + be controller by this driver.
  943. +
  944. + If driver is built as a module it will be called gpio-da9055.
  945. +
  946. +config GPIO_DLN2
  947. + tristate "Diolan DLN2 GPIO support"
  948. + depends on MFD_DLN2
  949. + select GPIOLIB_IRQCHIP
  950. +
  951. + help
  952. + Select this option to enable GPIO driver for the Diolan DLN2
  953. + board.
  954. +
  955. + This driver can also be built as a module. If so, the module
  956. + will be called gpio-dln2.
  957. +
  958. +config GPIO_JANZ_TTL
  959. + tristate "Janz VMOD-TTL Digital IO Module"
  960. + depends on MFD_JANZ_CMODIO
  961. + help
  962. + This enables support for the Janz VMOD-TTL Digital IO module.
  963. + This driver provides support for driving the pins in output
  964. + mode only. Input mode is not supported.
  965. +
  966. +config GPIO_KEMPLD
  967. + tristate "Kontron ETX / COMexpress GPIO"
  968. + depends on MFD_KEMPLD
  969. + help
  970. + This enables support for the PLD GPIO interface on some Kontron ETX
  971. + and COMexpress (ETXexpress) modules.
  972. +
  973. + This driver can also be built as a module. If so, the module will be
  974. + called gpio-kempld.
  975. +
  976. +config GPIO_LP3943
  977. + tristate "TI/National Semiconductor LP3943 GPIO expander"
  978. + depends on MFD_LP3943
  979. + help
  980. + GPIO driver for LP3943 MFD.
  981. + LP3943 can be used as a GPIO expander which provides up to 16 GPIOs.
  982. + Open drain outputs are required for this usage.
  983. +
  984. +config GPIO_MSIC
  985. + bool "Intel MSIC mixed signal gpio support"
  986. + depends on MFD_INTEL_MSIC
  987. + help
  988. + Enable support for GPIO on intel MSIC controllers found in
  989. + intel MID devices
  990. +
  991. +config GPIO_PALMAS
  992. + bool "TI PALMAS series PMICs GPIO"
  993. + depends on MFD_PALMAS
  994. + help
  995. + Select this option to enable GPIO driver for the TI PALMAS
  996. + series chip family.
  997. +
  998. +config GPIO_RC5T583
  999. + bool "RICOH RC5T583 GPIO"
  1000. + depends on MFD_RC5T583
  1001. + help
  1002. + Select this option to enable GPIO driver for the Ricoh RC5T583
  1003. + chip family.
  1004. + This driver provides the support for driving/reading the gpio pins
  1005. + of RC5T583 device through standard gpio library.
  1006. +
  1007. +config GPIO_STMPE
  1008. + bool "STMPE GPIOs"
  1009. + depends on MFD_STMPE
  1010. + depends on OF_GPIO
  1011. + select GPIOLIB_IRQCHIP
  1012. + help
  1013. + This enables support for the GPIOs found on the STMPE I/O
  1014. + Expanders.
  1015. +
  1016. +config GPIO_TC3589X
  1017. + bool "TC3589X GPIOs"
  1018. + depends on MFD_TC3589X
  1019. + depends on OF_GPIO
  1020. + select GPIOLIB_IRQCHIP
  1021. + help
  1022. + This enables support for the GPIOs found on the TC3589X
  1023. + I/O Expander.
  1024. +
  1025. +config GPIO_TIMBERDALE
  1026. + bool "Support for timberdale GPIO IP"
  1027. + depends on MFD_TIMBERDALE
  1028. + ---help---
  1029. + Add support for the GPIO IP in the timberdale FPGA.
  1030. +
  1031. +config GPIO_TPS6586X
  1032. + bool "TPS6586X GPIO"
  1033. + depends on MFD_TPS6586X
  1034. + help
  1035. + Select this option to enable GPIO driver for the TPS6586X
  1036. + chip family.
  1037. +
  1038. +config GPIO_TPS65910
  1039. + bool "TPS65910 GPIO"
  1040. + depends on MFD_TPS65910
  1041. + help
  1042. + Select this option to enable GPIO driver for the TPS65910
  1043. + chip family.
  1044. +
  1045. +config GPIO_TPS65912
  1046. + tristate "TI TPS65912 GPIO"
  1047. + depends on (MFD_TPS65912_I2C || MFD_TPS65912_SPI)
  1048. + help
  1049. + This driver supports TPS65912 gpio chip
  1050. +
  1051. +config GPIO_TWL4030
  1052. + tristate "TWL4030, TWL5030, and TPS659x0 GPIOs"
  1053. + depends on TWL4030_CORE
  1054. + help
  1055. + Say yes here to access the GPIO signals of various multi-function
  1056. + power management chips from Texas Instruments.
  1057. +
  1058. +config GPIO_TWL6040
  1059. + tristate "TWL6040 GPO"
  1060. + depends on TWL6040_CORE
  1061. + help
  1062. + Say yes here to access the GPO signals of twl6040
  1063. + audio chip from Texas Instruments.
  1064. +
  1065. +config GPIO_UCB1400
  1066. + tristate "Philips UCB1400 GPIO"
  1067. + depends on UCB1400_CORE
  1068. + help
  1069. + This enables support for the Philips UCB1400 GPIO pins.
  1070. + The UCB1400 is an AC97 audio codec.
  1071. +
  1072. +config GPIO_WM831X
  1073. + tristate "WM831x GPIOs"
  1074. + depends on MFD_WM831X
  1075. + help
  1076. + Say yes here to access the GPIO signals of WM831x power management
  1077. + chips from Wolfson Microelectronics.
  1078. +
  1079. +config GPIO_WM8350
  1080. + tristate "WM8350 GPIOs"
  1081. + depends on MFD_WM8350
  1082. + help
  1083. + Say yes here to access the GPIO signals of WM8350 power management
  1084. + chips from Wolfson Microelectronics.
  1085. +
  1086. +config GPIO_WM8994
  1087. + tristate "WM8994 GPIOs"
  1088. + depends on MFD_WM8994
  1089. + help
  1090. + Say yes here to access the GPIO signals of WM8994 audio hub
  1091. + CODECs from Wolfson Microelectronics.
  1092. +
  1093. +endmenu
  1094. +
  1095. +menu "PCI GPIO expanders"
  1096. + depends on PCI
  1097. +
  1098. +config GPIO_AMD8111
  1099. + tristate "AMD 8111 GPIO driver"
  1100. + depends on PCI
  1101. + help
  1102. + The AMD 8111 south bridge contains 32 GPIO pins which can be used.
  1103. +
  1104. + Note, that usually system firmware/ACPI handles GPIO pins on their
  1105. + own and users might easily break their systems with uncarefull usage
  1106. + of this driver!
  1107. +
  1108. + If unsure, say N
  1109. +
  1110. +config GPIO_BT8XX
  1111. + tristate "BT8XX GPIO abuser"
  1112. + depends on PCI && VIDEO_BT848=n
  1113. + help
  1114. + The BT8xx frame grabber chip has 24 GPIO pins that can be abused
  1115. + as a cheap PCI GPIO card.
  1116. +
  1117. + This chip can be found on Miro, Hauppauge and STB TV-cards.
  1118. +
  1119. + The card needs to be physically altered for using it as a
  1120. + GPIO card. For more information on how to build a GPIO card
  1121. + from a BT8xx TV card, see the documentation file at
  1122. + Documentation/bt8xxgpio.txt
  1123. +
  1124. + If unsure, say N.
  1125. +
  1126. +config GPIO_INTEL_MID
  1127. + bool "Intel Mid GPIO support"
  1128. + depends on PCI && X86
  1129. + select GPIOLIB_IRQCHIP
  1130. + help
  1131. + Say Y here to support Intel Mid GPIO.
  1132. +
  1133. +config GPIO_ML_IOH
  1134. + tristate "OKI SEMICONDUCTOR ML7213 IOH GPIO support"
  1135. + depends on PCI
  1136. + select GENERIC_IRQ_CHIP
  1137. + help
  1138. + ML7213 is companion chip for Intel Atom E6xx series.
  1139. + This driver can be used for OKI SEMICONDUCTOR ML7213 IOH(Input/Output
  1140. + Hub) which is for IVI(In-Vehicle Infotainment) use.
  1141. + This driver can access the IOH's GPIO device.
  1142. +
  1143. +config GPIO_PCH
  1144. + tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7223/ML7831) GPIO"
  1145. + depends on PCI && (X86_32 || COMPILE_TEST)
  1146. + select GENERIC_IRQ_CHIP
  1147. + help
  1148. + This driver is for PCH(Platform controller Hub) GPIO of Intel Topcliff
  1149. + which is an IOH(Input/Output Hub) for x86 embedded processor.
  1150. + This driver can access PCH GPIO device.
  1151. +
  1152. + This driver also can be used for LAPIS Semiconductor IOH(Input/
  1153. + Output Hub), ML7223 and ML7831.
  1154. + ML7223 IOH is for MP(Media Phone) use.
  1155. + ML7831 IOH is for general purpose use.
  1156. + ML7223/ML7831 is companion chip for Intel Atom E6xx series.
  1157. + ML7223/ML7831 is completely compatible for Intel EG20T PCH.
  1158. +
  1159. +config GPIO_RDC321X
  1160. + tristate "RDC R-321x GPIO support"
  1161. + depends on PCI
  1162. + select MFD_CORE
  1163. + select MFD_RDC321X
  1164. + help
  1165. + Support for the RDC R321x SoC GPIOs over southbridge
  1166. + PCI configuration space.
  1167. +
  1168. +config GPIO_SODAVILLE
  1169. + bool "Intel Sodaville GPIO support"
  1170. + depends on X86 && PCI && OF
  1171. + select GPIO_GENERIC
  1172. + select GENERIC_IRQ_CHIP
  1173. + help
  1174. + Say Y here to support Intel Sodaville GPIO.
  1175. +
  1176. +endmenu
  1177. +
  1178. +menu "SPI GPIO expanders"
  1179. + depends on SPI_MASTER
  1180. +
  1181. +config GPIO_74X164
  1182. + tristate "74x164 serial-in/parallel-out 8-bits shift register"
  1183. + depends on SPI_MASTER && OF
  1184. + help
  1185. + Driver for 74x164 compatible serial-in/parallel-out 8-outputs
  1186. + shift registers. This driver can be used to provide access
  1187. + to more gpio outputs.
  1188. +
  1189. +config GPIO_MAX7301
  1190. + tristate "Maxim MAX7301 GPIO expander"
  1191. + depends on SPI_MASTER
  1192. + select GPIO_MAX730X
  1193. + help
  1194. + GPIO driver for Maxim MAX7301 SPI-based GPIO expander.
  1195. +
  1196. +config GPIO_MCP23S08
  1197. + tristate "Microchip MCP23xxx I/O expander"
  1198. + depends on (SPI_MASTER && !I2C) || I2C
  1199. + help
  1200. + SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017
  1201. + I/O expanders.
  1202. + This provides a GPIO interface supporting inputs and outputs.
  1203. + The I2C versions of the chips can be used as interrupt-controller.
  1204. +
  1205. +config GPIO_MC33880
  1206. + tristate "Freescale MC33880 high-side/low-side switch"
  1207. + depends on SPI_MASTER
  1208. + help
  1209. + SPI driver for Freescale MC33880 high-side/low-side switch.
  1210. + This provides GPIO interface supporting inputs and outputs.
  1211. +
  1212. +endmenu
  1213. +
  1214. +menu "USB GPIO expanders"
  1215. + depends on USB
  1216. +
  1217. +config GPIO_VIPERBOARD
  1218. + tristate "Viperboard GPIO a & b support"
  1219. + depends on MFD_VIPERBOARD && USB
  1220. + help
  1221. + Say yes here to access the GPIO signals of Nano River
  1222. + Technologies Viperboard. There are two GPIO chips on the
  1223. + board: gpioa and gpiob.
  1224. + See viperboard API specification and Nano
  1225. + River Tech's viperboard.h for detailed meaning
  1226. + of the module parameters.
  1227. +
  1228. +endmenu
  1229. +
  1230. +endif
  1231. diff -Nur linux-4.1.6.orig/drivers/gpio/Makefile linux-4.1.6/drivers/gpio/Makefile
  1232. --- linux-4.1.6.orig/drivers/gpio/Makefile 2015-08-17 05:52:51.000000000 +0200
  1233. +++ linux-4.1.6/drivers/gpio/Makefile 2015-09-16 00:47:15.279630571 +0200
  1234. @@ -42,6 +42,7 @@
  1235. obj-$(CONFIG_GPIO_KEMPLD) += gpio-kempld.o
  1236. obj-$(CONFIG_ARCH_KS8695) += gpio-ks8695.o
  1237. obj-$(CONFIG_GPIO_INTEL_MID) += gpio-intel-mid.o
  1238. +obj-$(CONFIG_GPIO_LATCH) += gpio-latch.o
  1239. obj-$(CONFIG_GPIO_LOONGSON) += gpio-loongson.o
  1240. obj-$(CONFIG_GPIO_LP3943) += gpio-lp3943.o
  1241. obj-$(CONFIG_ARCH_LPC32XX) += gpio-lpc32xx.o
  1242. diff -Nur linux-4.1.6.orig/include/linux/platform_data/gpio-latch.h linux-4.1.6/include/linux/platform_data/gpio-latch.h
  1243. --- linux-4.1.6.orig/include/linux/platform_data/gpio-latch.h 1970-01-01 01:00:00.000000000 +0100
  1244. +++ linux-4.1.6/include/linux/platform_data/gpio-latch.h 2015-09-16 00:48:10.204407551 +0200
  1245. @@ -0,0 +1,14 @@
  1246. +#ifndef _GPIO_LATCH_H_
  1247. +#define _GPIO_LATCH_H_
  1248. +
  1249. +#define GPIO_LATCH_DRIVER_NAME "gpio-latch"
  1250. +
  1251. +struct gpio_latch_platform_data {
  1252. + int base;
  1253. + int num_gpios;
  1254. + int *gpios;
  1255. + int le_gpio_index;
  1256. + bool le_active_low;
  1257. +};
  1258. +
  1259. +#endif /* _GPIO_LATCH_H_ */