summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pch.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2012-05-241-11/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull GPIO driver changes from Grant Likely: "Lots of gpio changes, both to core code and drivers. Changes do touch architecture code to remove the need for separate arm/gpio.h includes in most architectures. Some new drivers are added, and a number of gpio drivers are converted to use irq_domains for gpio inputs used as interrupts. Device tree support has been amended to allow multiple gpio_chips to use the same device tree node. Remaining changes are primarily bug fixes." * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: (33 commits) gpio/generic: initialize basic_mmio_gpio shadow variables properly gpiolib: Remove 'const' from data argument of gpiochip_find() gpio/rc5t583: add gpio driver for RICOH PMIC RC5T583 gpiolib: quiet gpiochip_add boot message noise gpio: mpc8xxx: Prevent NULL pointer deref in demux handler gpio/lpc32xx: Add device tree support gpio: Adjust of_xlate API to support multiple GPIO chips gpiolib: Implement devm_gpio_request_one() gpio-mcp23s08: dbg_show: fix pullup configuration display Add support for TCA6424A gpio/omap: (re)fix wakeups on level-triggered GPIOs gpio/omap: fix broken context restore for non-OFF mode transitions gpio/omap: fix missing check in *_runtime_suspend() gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume() gpio/omap: remove suspend/resume callbacks gpio/omap: remove retrigger variable in gpio_irq_handler gpio/omap: remove saved_wakeup field from struct gpio_bank gpio/omap: remove suspend_wakeup field from struct gpio_bank gpio/omap: remove saved_fallingdetect, saved_risingdetect gpio/omap: remove virtual_irq_start variable ... Conflicts: drivers/gpio/gpio-samsung.c
| * gpio: Convert drivers to use module_pci_driver()Axel Lin2012-04-071-11/+1
| | | | | | | | | | | | | | | | | | This patch converts the drivers in drivers/gpio/* to use module_pci_driver() macro which makes the code smaller and a bit simpler by having less boilerplate. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* | gpio: pch9: Use proper flow type handlersThomas Gleixner2012-05-111-29/+28
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jean-Francois Dagenais reported: Configuring a gpio pin with the gpio-pch driver with "IRQF_TRIGGER_LOW | IRQF_ONESHOT" generates an interrupt storm for threaded ISR until the ISR thread actually gets to physically clear the interrupt on the triggering chip!! The immediate observable symptom is the high CPU usage for my ISR thread task and the interrupt count in /proc/interrupts incrementing radically. The driver is wrong in several ways: 1) Using handle_simple_irq() does not provide proper flow control handling. In the case of oneshot threaded handlers for the demultiplexed interrupts this results in an interrupt storm because the simple handler does not deal with masking/unmasking. Even without threaded oneshot handlers an interrupt storm for level type interrupts can easily be triggered when the interrupt is disabled and the interrupt line is activated from the device. 2) Acknowlegding the demultiplexed interrupt before calling the handler is wrong for level type interrupts. 3) The set_type function unconditionally enables the interrupt. It's supposed to set the type and nothing else. The unmasking is done by the core code. Move the acknowledge code into a separate function and add it to the demux irqchip callbacks. Remove the unconditional enabling from the set_type() callback and set the proper flow handlers depending on the selected type (level/edge). Reported-and-tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio: Add missing spin_lock_init in gpio-pch driverAxel Lin2012-02-011-0/+1
| | | | | | | | | | | This bug was introduced by commit d568a681 "gpio-pch: add spinlock in suspend/resume processing" which adds a spinlock to struct pch_gpio but never init the spinlock. Reported-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio-pch: cleanup __iomem annotation usageMárton Németh2012-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | The __iomem annotation is to be used together with pointers used as iowrite32() parameter. For more details see [1] and [2]. This patch will remove the following sparse warnings ("make C=1"): * warning: incorrect type in assignment (different address spaces) * warning: incorrect type in argument 1 (different address spaces) * warning: incorrect type in argument 2 (different address spaces) References: [1] A new I/O memory access mechanism (Sep 15, 2004) http://lwn.net/Articles/102232/ [2] Being more anal about iospace accesses (Sep 15, 2004) http://lwn.net/Articles/102240/ Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio-pch: cleanup NULL pointer checkingMárton Németh2012-01-161-1/+1
| | | | | | | | This patch will remove the following sparse warning ("make C=1"): * warning: Using plain integer as NULL pointer Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* pch_gpio: Change company name OKI SEMICONDUCTOR to LAPIS SemiconductorTomoya MORINAGA2011-12-121-3/+3
| | | | | | | | On October 1 in 2011, OKI SEMICONDUCTOR Co., Ltd. changed the company name in to LAPIS Semiconductor Co., Ltd. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* pch_gpio: Support new device LAPIS Semiconductor ML7831 IOHTomoya MORINAGA2011-12-121-0/+1
| | | | | | | ML7831 is companion chip for Intel Atom E6xx series. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* drivers/gpio: Fix drivers who are implicit users of module.hPaul Gortmaker2011-10-311-0/+1
| | | | | | | | A pending cleanup will mean that module.h won't be implicitly everywhere anymore. Make sure the modular drivers in gpio are actually calling out for <module.h> explicitly in advance. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* gpio-pch: Use NUMA_NO_NODE not GFP_KERNELTomoya MORINAGA2011-10-191-1/+1
| | | | | | | | | | | | | | | | Currently, GFP_KERNEL is used as parameter of irq_alloc_descs like below. irq_base = irq_alloc_descs(-1, IOH_IRQ_BASE, num_ports[j], GFP_KERNEL); This is not true. So, this patch uses NUMA_NO_NODE not GFP_KERNEL. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: David Rientjes <rientjes@google.com> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio-pch: Support interrupt functionTomoya MORINAGA2011-10-051-0/+187
| | | | | Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio-pch: Save register value in suspend()Tomoya MORINAGA2011-10-051-1/+21
| | | | | | | | | Currently, when suspend is occurred, register im0/1 and gpio_use_sel are not saved. This patch modifies so that register im0/1 and gpio_use_sel are saved. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio-pch: modify gpio_nums and maskTomoya MORINAGA2011-10-051-6/+25
| | | | | | | | | | Currently, the number of GPIO pins is set fixed value(=12). Also PIN MASK is set as '0xfff'. However the pins differs by IOH. This patch sets the value correctly. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio-pch: support ML7223 IOH n-BusTomoya MORINAGA2011-10-051-0/+1
| | | | | Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio-pch: add spinlock in suspend/resume processingTomoya MORINAGA2011-10-051-0/+10
| | | | | Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio-pch: Delete invalid "restore" code in suspend()Tomoya MORINAGA2011-10-051-1/+0
| | | | | Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* gpio: reorganize driversGrant Likely2011-06-061-0/+316
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