summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-langwell.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers/gpio/gpio-langwell.c: fix error return codeJulia Lawall2012-08-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; } | ret = 0 ) ... when != ret = e1 *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...); ... when != x = e2 when != ret = e3 *if (x == NULL || ...) { ... when != ret = e4 * return ret; } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio/langwell: re-read the IRQ status register after each iterationMika Westerberg2012-05-101-3/+1
| | | | | | | | | | | The IRQ status register should be re-read after each iteration. Otherwise the loop misses the interrupt if it gets raised immediately after handled. Reported-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio/langwell: convert to use irq_domainMika Westerberg2012-05-081-21/+29
| | | | | | | | | irq_domain already provides a facility to translate from hardware IRQ numbers to Linux IRQ numbers so use that instead of open-coding the logic in the driver. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio/langwell: clear IRQ edge detect registers at initMika Westerberg2012-04-051-0/+21
| | | | | | | | | The boot firmware might leave the registers configured causing interrupts to happen even when no handler for them is yet registered. Fix this by clearing the IRQ edge detect registers at init. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio/langwell: allocate IRQ descriptors dynamically for SPARSE_IRQMika Westerberg2012-04-051-3/+13
| | | | | | | | | Since x86 is using SPARSE_IRQ by default nowadays it means that we need to allocate IRQ descriptors dynamically using irq_alloc_descs() otherwise the genirq code fails to convert our irq numbers to suitable descriptors. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio/langwell: use devm_* helpers to simplify probeMika Westerberg2012-04-051-11/+7
| | | | | | | | Use devm_* helper functions where possible to make the error handling in the probe function simpler. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio: langwell: ensure alternate function is clearedAdrian Hunter2011-10-061-0/+27
| | | | | | | | | Alternate function must be zero for the pin to act as a GPIO. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2011-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: (61 commits) gpio/mxc/mxs: fix build error introduced by the irq_gc_ack() renaming mcp23s08: add i2c support mcp23s08: isolate spi specific parts mcp23s08: get rid of setup/teardown callbacks gpio/tegra: dt: add binding for gpio polarity mcp23s08: remove unused work queue gpio/da9052: remove a redundant assignment for gpio->da9052 gpio/mxc: add device tree probe support ARM: mxc: use ARCH_NR_GPIOS to define gpio number gpio/mxc: get rid of the uses of cpu_is_mx() gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables gpio: Move mpc5200 gpio driver to drivers/gpio GPIO: DA9052 GPIO module v3 gpio/tegra: Use engineering names in DT compatible property of/gpio: Add new method for getting gpios under different property names gpio/dt: Refine GPIO device tree binding gpio/ml-ioh: fix off-by-one for displaying variable i in dev_err gpio/pca953x: Deprecate meaningless device-tree bindings gpio/pca953x: Remove dynamic platform data pointer gpio/pca953x: Fix IRQ support. ...
* gpio: reorganize driversGrant Likely2011-06-061-0/+458
Sort the gpio makefile and enforce the naming convention gpio-*.c for gpio drivers. v2: cleaned up filenames in Kconfig and comment blocks v3: fixup use of BASIC_MMIO to GENERIC_GPIO for mxc Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
OpenPOWER on IntegriCloud