aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)AuthorFilesLines
2014-03-28gpio-lynxpoint: force gpio_get() to return "1" and "0" onlyMathias Nyman1-1/+1
Don't return the IN_LVL_BIT directly, a high gpio line returned value "1073741824" intestead of "1" because IN_LVL_BIT is BIT(30) Tested-by: Jerome Blin <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-28gpio: unmap gpio irqs properlyLinus Walleij1-4/+29
When using the irqchip helper inside the gpiolib, make sure the IRQs are unmapped/disposed before the irqdomain is removed as part of removing the gpiochip. Signed-off-by: Linus Walleij <[email protected]>
2014-03-27pch_gpio: set value before enabling output directionDaniel Krueger1-3/+5
This ensures that the output signal does not toggle if set to high. Signed-off-by: Daniel Krueger <[email protected]> Signed-off-by: Alexander Stein <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-27gpio: moxart: Actually set output state in moxart_gpio_direction_output()Axel Lin1-0/+1
moxart_gpio_direction_output() ignored the state passed into it. Fix it. Signed-off-by: Axel Lin <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-27gpio: moxart: Avoid forward declarationAxel Lin1-20/+19
Slightly adjust the code to avoid forward declaration as we need to call moxart_gpio_set() in moxart_gpio_direction_output() to properly set the output state. Signed-off-by: Axel Lin <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-27gpio: mxs: Allow for recursive enable_irq_wake() callMarek Vasut1-1/+2
The scenario here is that someone calls enable_irq_wake() from somewhere in the code. This will result in the lockdep producing a backtrace as can be seen below. In my case, this problem is triggered when using the wl1271 (TI WlCore) driver found in drivers/net/wireless/ti/ . The problem cause is rather obvious from the backtrace, but let's outline the dependency. enable_irq_wake() grabs the IRQ buslock in irq_set_irq_wake(), which in turns calls mxs_gpio_set_wake_irq() . But mxs_gpio_set_wake_irq() calls enable_irq_wake() again on the one-level-higher IRQ , thus it tries to grab the IRQ buslock again in irq_set_irq_wake() . Because the spinlock in irq_set_irq_wake()->irq_get_desc_buslock()->__irq_get_desc_lock() is not marked as recursive, lockdep will spew the stuff below. We know we can safely re-enter the lock, so use IRQ_GC_INIT_NESTED_LOCK to fix the spew. ============================================= [ INFO: possible recursive locking detected ] 3.10.33-00012-gf06b763-dirty #61 Not tainted --------------------------------------------- kworker/0:1/18 is trying to acquire lock: (&irq_desc_lock_class){-.-...}, at: [<c00685f0>] __irq_get_desc_lock+0x48/0x88 but task is already holding lock: (&irq_desc_lock_class){-.-...}, at: [<c00685f0>] __irq_get_desc_lock+0x48/0x88 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&irq_desc_lock_class); lock(&irq_desc_lock_class); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by kworker/0:1/18: #0: (events){.+.+.+}, at: [<c0036308>] process_one_work+0x134/0x4a4 #1: ((&fw_work->work)){+.+.+.}, at: [<c0036308>] process_one_work+0x134/0x4a4 #2: (&irq_desc_lock_class){-.-...}, at: [<c00685f0>] __irq_get_desc_lock+0x48/0x88 stack backtrace: CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 3.10.33-00012-gf06b763-dirty #61 Workqueue: events request_firmware_work_func [<c0013eb4>] (unwind_backtrace+0x0/0xf0) from [<c0011c74>] (show_stack+0x10/0x14) [<c0011c74>] (show_stack+0x10/0x14) from [<c005bb08>] (__lock_acquire+0x140c/0x1a64) [<c005bb08>] (__lock_acquire+0x140c/0x1a64) from [<c005c6a8>] (lock_acquire+0x9c/0x104) [<c005c6a8>] (lock_acquire+0x9c/0x104) from [<c051d5a4>] (_raw_spin_lock_irqsave+0x44/0x58) [<c051d5a4>] (_raw_spin_lock_irqsave+0x44/0x58) from [<c00685f0>] (__irq_get_desc_lock+0x48/0x88) [<c00685f0>] (__irq_get_desc_lock+0x48/0x88) from [<c0068e78>] (irq_set_irq_wake+0x20/0xf4) [<c0068e78>] (irq_set_irq_wake+0x20/0xf4) from [<c027260c>] (mxs_gpio_set_wake_irq+0x1c/0x24) [<c027260c>] (mxs_gpio_set_wake_irq+0x1c/0x24) from [<c0068cf4>] (set_irq_wake_real+0x30/0x44) [<c0068cf4>] (set_irq_wake_real+0x30/0x44) from [<c0068ee4>] (irq_set_irq_wake+0x8c/0xf4) [<c0068ee4>] (irq_set_irq_wake+0x8c/0xf4) from [<c0310748>] (wlcore_nvs_cb+0x10c/0x97c) [<c0310748>] (wlcore_nvs_cb+0x10c/0x97c) from [<c02be5e8>] (request_firmware_work_func+0x38/0x58) [<c02be5e8>] (request_firmware_work_func+0x38/0x58) from [<c0036394>] (process_one_work+0x1c0/0x4a4) [<c0036394>] (process_one_work+0x1c0/0x4a4) from [<c0036a4c>] (worker_thread+0x138/0x394) [<c0036a4c>] (worker_thread+0x138/0x394) from [<c003cb74>] (kthread+0xa4/0xb0) [<c003cb74>] (kthread+0xa4/0xb0) from [<c000ee00>] (ret_from_fork+0x14/0x34) wlcore: loaded Cc: [email protected] Signed-off-by: Marek Vasut <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-27gpio: samsung: Add missing "break" statementAlexander Shiyan1-0/+1
Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-27gpio: twl4030: Remove redundant assignmentAlexander Shiyan1-3/+3
Variable "status" is never used, so remove it and add warning if any error happen. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-26gpio: iop: fix devm_ioremap_resource() return value checkingBartlomiej Zolnierkiewicz1-0/+2
devm_ioremap_resource() returns a pointer to the remapped memory or an ERR_PTR() encoded error code on failure. Fix the check inside iop3xx_gpio_probe() accordingly. Cc: Lennert Buytenhek <[email protected]> Cc: Mikael Pettersson <[email protected]> Cc: Aaro Koskinen <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-26gpio: pl061: convert driver to use gpiolib irqchipLinus Walleij2-62/+19
This converts the PL061 driver to register its chained irq handler and irqchip using the helpers in the gpiolib core. Signed-off-by: Linus Walleij <[email protected]>
2014-03-26gpio: add IRQ chip helpers in gpiolibLinus Walleij2-0/+191
This provides a function gpiochip_irqchip_add() to set up an irqchip for a GPIO controller, and a function gpiochip_set_chained_irqchip() to chain it to a parent irqchip. Most GPIOs are of the type where a number of lines form a cascaded interrupt controller chained onto the primary system interrupt controller (or further down the chain) so let's add this helper and factor the code to request the lines to be used as IRQs, the .to_irq() function and the irqdomain into the core as well. Acked-by: Thomas Gleixner <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-19gpio: ich: Add support for Intel AvotonVincent Donnefort1-1/+25
This patch adds support for Atom C2000 series (Avoton and Rangeley). And has the following options: - New addresses register. - Caching output levels (see Intel external design spec, table 48-29) - No hardware blink. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Vincent Donnefort <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-19gpio: ich: Add output levels cache supportVincent Donnefort1-2/+19
This patch allows GPIO driver to cache GPIO_LVL output registers. The aim is to support chipsets on which GPIO_LVL value can't be read for output pins. Caching output levels implies the first output values reading as 0. The driver so can't be aware of set values GPIOs by bootloader or BIOS. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Vincent Donnefort <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-19gpio: ich: Add support for multiple register addressesVincent Donnefort1-12/+31
This patch introduces regs and reglen pointers which allow a chipset to have register addresses differing from ICH ones. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Vincent Donnefort <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-19gpio: ich: Add blink capability optionVincent Donnefort1-1/+9
This patch allows gpio_ich driver to be aware of non blink capable chipsets. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Vincent Donnefort <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-18gpio: Driver for SYSCON-based GPIOsAlexander Shiyan3-0/+198
SYSCON driver was designed for using memory areas (registers) that are used in several subsystems. There are systems (CPUs) which use bits in one register for various purposes and thus should be handled by various kernel subsystems. This driver allows you to use the individual SYSCON bits as GPIOs. ARM CLPS711X SYSFLG1 input lines has been added as first user of this driver. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-18gpio: generic: Use platform_device_id->driver_data field for driver flagsAlexander Shiyan1-7/+9
Signed-off-by: Alexander Shiyan <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-18gpio: switch drivers to use new callbackLinus Walleij8-57/+56
This switches all GPIO and pin control drivers with irqchips that were using .startup() and .shutdown() callbacks to lock GPIO lines for IRQ usage over to using the .request_resources() and .release_resources() callbacks just introduced into the irqchip vtable. Cc: Thomas Gleixner <[email protected]> Cc: Jean-Jacques Hiblot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-14gpio / ACPI: Add support for ACPI GPIO operation regionsMika Westerberg1-0/+163
GPIO operation regions is a new feature introduced in ACPI 5.0 specification. This feature adds a way for platform ASL code to call back to OS GPIO driver and toggle GPIO pins. An example ASL code from Lenovo Miix 2 tablet with only relevant part listed: Device (\_SB.GPO0) { Name (AVBL, Zero) Method (_REG, 2, NotSerialized) { If (LEqual (Arg0, 0x08)) { // Marks the region available Store (Arg1, AVBL) } } OperationRegion (GPOP, GeneralPurposeIo, Zero, 0x0C) Field (GPOP, ByteAcc, NoLock, Preserve) { Connection ( GpioIo (Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly, "\\_SB.GPO0", 0x00, ResourceConsumer,,) { 0x003B } ), SHD3, 1, } } Device (SHUB) { Method (_PS0, 0, Serialized) { If (LEqual (\_SB.GPO0.AVBL, One)) { Store (One, \_SB.GPO0.SHD3) Sleep (0x32) } } Method (_PS3, 0, Serialized) { If (LEqual (\_SB.GPO0.AVBL, One)) { Store (Zero, \_SB.GPO0.SHD3) } } } How this works is that whenever _PS0 or _PS3 method is run (typically when SHUB device is transitioned to D0 or D3 respectively), ASL code checks if the GPIO operation region is available (\_SB.GPO0.AVBL). If it is we go and store either 0 or 1 to \_SB.GPO0.SHD3. Now, when ACPICA notices ACPI GPIO operation region access (the store above) it will call acpi_gpio_adr_space_handler() that then toggles the GPIO accordingly using standard gpiolib interfaces. Implement the support by registering GPIO operation region handlers for all GPIO devices that have an ACPI handle. First time the GPIO is used by the ASL code we make sure that the GPIO stays requested until the GPIO chip driver itself is unloaded. If we find out that the GPIO is already requested we just toggle it according to the value got from ASL code. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-14Merge tag 'v3.14-rc6' into develLinus Walleij5-4/+22
Linux 3.14-rc6
2014-03-14gpio: clamp returned values to the boolean rangeAlexandre Courbot1-6/+6
Nothing prevents GPIO drivers from returning values outside the boolean range, and as it turns out a few drivers are actually doing so. These values were passed as-is to unsuspecting consumers and created confusion. This patch makes the internal _gpiod_get_raw_value() function return a bool, effectively clamping the GPIO value to the boolean range no matter what the driver does. While we are at it, we also change the value parameter of _gpiod_set_raw_value() to bool type before drivers start doing funny things with it as well. Another way to fix this would be to change the prototypes of the driver interface to use bool directly, but this would require a huge cross-systems patch so this simpler solution is preferred. Changes since v1: - Change local variable type to bool as well, use boolean values in code - Also change prototype of open drain/open source setting functions since they are only called from _gpiod_set_raw_value() This probably calls for a larger booleanization of gpiolib, but let's keep that for a latter change - right now we need to address the issue of non-boolean values returned by drivers. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-13gpio / ACPI: Rework ACPI GPIO event handlingMika Westerberg2-86/+131
The current ACPI GPIO event handling code was never tested against real hardware with functioning GPIO triggered events (at the time such hardware wasn't available). Thus it misses certain things like requesting the GPIOs properly, passing correct flags to the interrupt handler and so on. This patch reworks ACPI GPIO event handling so that we: 1) Use struct acpi_gpio_event for all GPIO signaled events. 2) Switch to use GPIO descriptor API and request GPIOs by calling gpiochip_request_own_desc() that we added in a previous patch. 3) Pass proper flags from ACPI GPIO resource to request_threaded_irq(). Also instead of open-coding the _AEI iteration loop we can use acpi_walk_resources(). This simplifies the code a bit and fixes memory leak that was caused by missing kfree() for buffer returned by acpi_get_event_resources(). Since the remove path now calls gpiochip_free_own_desc() which takes GPIO spinlock we need to call acpi_gpiochip_remove() outside of that lock (analogous to acpi_gpiochip_add() path where the lock is released before those funtions are called). Signed-off-by: Mika Westerberg <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-13gpio / ACPI: Rename acpi_gpio_evt_pin to acpi_gpio_eventMika Westerberg1-20/+19
In order to consolidate _Exx, _Lxx and _EVT to use the same structure make the structure name to reflect that we are dealing with any event, not just _EVT. This is just rename, no functional changes. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-13gpio / ACPI: Allocate ACPI specific data directly in acpi_gpiochip_add()Mika Westerberg1-42/+64
We are going to add more ACPI specific data to accompany GPIO chip so instead of allocating it per each use-case we allocate it once when acpi_gpiochip_add() is called and release it when acpi_gpiochip_remove() is called. Doing this allows us to add more ACPI specific data by merely adding new fields to struct acpi_gpio_chip. In addition we embed evt_pins member directly to the structure instead of having it as a pointer. This simplifies the code a bit since we don't need to check against NULL. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-13gpiolib: Allow GPIO chips to request their own GPIOsMika Westerberg2-27/+76
Sometimes it is useful to allow GPIO chips themselves to request GPIOs they own through gpiolib API. One use case is ACPI ASL code that should be able to toggle GPIOs through GPIO operation regions. We can't use gpio_request() because it will pin the module to the kernel forever (it calls try_module_get()). To solve this we move module refcount manipulation to gpiod_request() and let __gpiod_request() handle the actual request. This changes the sequence a bit as now try_module_get() is called outside of gpio_lock (I think this is safe, try_module_get() handles serialization it needs already). Then we provide gpiolib internal functions gpiochip_request/free_own_desc() that do the same as gpio_request() but don't manipulate module refrence count. This allows the GPIO chip driver to request and free descriptors it owns without being pinned to the kernel forever. Signed-off-by: Mika Westerberg <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-12gpio: Spelling s/than/that/Geert Uytterhoeven1-1/+1
Signed-off-by: Geert Uytterhoeven <[email protected]> Cc: Linus Walleij <[email protected]> Cc: [email protected] Signed-off-by: Linus Walleij <[email protected]>
2014-03-12gpio: cs5535: Simplify dependenciesJean Delvare1-1/+1
The bus and architecture dependencies are already on MFD_CS5535, so there is no need to repeat them here. Signed-off-by: Jean Delvare <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-12gpio: mcp23s08: trivial: fixed coding style issuesGary Servin1-11/+11
This coding style issue was detected using the checkpatch.pl script Signed-off-by: Gary Servin <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-12gpio: max732x: Fix possible NULL pointer dereference on i2c_new_dummy errorKrzysztof Kozlowski1-0/+7
In max732x_probe() driver allocates dummy I2C device (if number of ports is greater than 8) with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later dereferenced by i2c_smbus_read_byte() (called from max732x_readb()). Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-12gpio: max732x: Fix I2C dummy device resource leak on probe failureKrzysztof Kozlowski1-0/+2
In max732x_probe() driver allocates dummy I2C device (if number of ports is greater than 8) however it is not unregistered if probe fails later. Fix the leak by unregistering dummy I2C device if it was allocated. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-11gpio: davinci: fix gpio selection for OFAlexander Holler1-0/+24
The driver missed an of_xlate function to translate gpio numbers as found in the DT to the correct chip and number. While there I've set #gpio_cells to a fixed value of 2. I've used gpio-pxa.c as template for those changes and tested my changes successfully on a da850 board using entries for gpio-leds in a DT. So I didn't reinvent the wheel but just copied and tested stuff. Thanks to Grygorii Strashko for the hint to the existing code in gpio-pxa. Signed-off-by: Alexander Holler <[email protected]> Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-07gpio-tz1090: Replace commas with semi-colonsJames Hogan1-14/+14
Replace commas with semicolons between irqchip callback initialisation statements in tz1090_gpio_bank_probe. The commas appear to be a subtle remnant of when the irqchips were statically initialised. Thanks to Thomas Gleixner for spotting it while whipping up a coccinelle script. Reported-by: Thomas Gleixner <[email protected]> Signed-off-by: James Hogan <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Linus Walleij <[email protected]>
2014-03-07gpio: remove misleading documentationLinus Walleij1-4/+1
It is currently debated where the functions to lock a certain GPIO line as used for IRQs should be called. Delete all misleading documentation. Reported-by: Thomas Gleixner <[email protected]> Cc: Jean-Jacques Hiblot <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-07gpio: gpio-pl061: Use %pa to print 'resource_size_t'Fabio Estevam1-2/+2
The following build warning is generated when building multi_v7_defconfig with LPAE option selected: drivers/gpio/gpio-pl061.c:358:2: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' [-Wformat=] Fix it by using %pa to print 'resource_size_t'. Reported-by: Olof's autobuilder <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-07fix build error in gpio-dwapb patchAlan Tull1-1/+1
fix build error with this message: kernel/irq/Kconfig:41:error: recursive dependency detected! kernel/irq/Kconfig:41: symbol GENERIC_IRQ_CHIP is selected by GPIO_DWAPB drivers/gpio/Kconfig:131: symbol GPIO_DWAPB depends on IRQ_DOMAIN kernel/irq/Kconfig:46: symbol IRQ_DOMAIN is selected by GENERIC_IRQ_CHIP Signed-off-by: Alan Tull <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-06gpio: zevio: depend on ARM and OF_GPIOLinus Walleij1-1/+1
Instead of just depending on OF and getting build failures, depend on ARM && OF_GPIO. Cc: Fabian Vogt <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-05gpio: remove obsolete tnetv107x driverArnd Bergmann2-207/+0
The tnetv107x platform is getting removed, so this driver won't be needed any more. Signed-off-by: Arnd Bergmann <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: [email protected] Acked-by: Sekhar Nori <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-05gpio: add a driver for the Synopsys DesignWare APB GPIO blockJamie Iles3-0/+448
The Synopsys DesignWare block is used in some ARM devices (picoxcell) and can be configured to provide multiple banks of GPIO pins. v12: - Add irq_startup/shutdown - do irq_create_mapping() in probe, irq_find_mapping() in to_irq() - Adjust mappings to show support for 1 gpio per port. - gpio-cells = <1> v11: - Use NULL when checking existence of 'interrupts' property - Bindings descriptions cleanup v10: - in documentation nr-gpio -> nr-gpios v9: - cleanup in dt bindings doc - use of_get_child_count() v8: - remove socfpga.dtsi changes - minor cleanup in devicetree documentation v7: - use irq_generic_chip - support one irq per gpio line or one irq for many - s/bank/port/ and other cleanup v6: - (atull) squash the set of patches - use linear irq domain - build fixes. Original driver was reviewed on v3.2. - Fix setting irq edge type for 'rising' and 'both'. - Support as a loadable module. - Use bgpio_chip's spinlock during register access. - Clean up register names to match spec - s/bank/port/ because register names use the word 'port' - s/nr-gpio/nr-gpios/ - don't get/put the of_node - remove signoffs/acked-by's because of changes - other cleanup v5: - handle sparse bank population correctly v3: - depend on rather than select IRQ_DOMAIN - split IRQ support into a separate patch v2: - use Rob Herring's irqdomain in generic irq chip patches - use reg property to indicate bank index - support irqs on both edges based on LinusW's u300 driver Signed-off-by: Jamie Iles <[email protected]> Signed-off-by: Alan Tull <[email protected]> Reviewed-by: Sebastian Hesselbarth <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-03-04gpio: davinci: reuse for keystone socGrygorii Strashko1-8/+40
The similar GPIO HW block is used by keystone SoCs as in Davinci SoCs. Hence, reuse Davinci GPIO driver for Keystone taking into account that Keystone contains ARM GIC IRQ controller which is implemented using IRQ Chip. Documentation: http://www.ti.com/lit/ug/sprugv1/sprugv1.pdf Acked-by: Santosh Shilimkar <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-27gpio: New driver for LSI ZEVIO SoCsFabian Vogt3-0/+227
This driver supports the GPIO controller found in LSI ZEVIO SoCs. It has been successfully tested on a TI nspire CX calculator. Signed-off-by: Fabian Vogt <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-27gpio-ts5500: Add dependencyJean Delvare1-0/+1
There is no point in displaying the TS5500-specific driver entries if TS5500 board support itself isn't enabled. Signed-off-by: Jean Delvare <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Vivien Didelot <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-25Merge tag 'qcom-drivers-for-3.15' of ↵Arnd Bergmann1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom into next/drivers Merge "qcom driver changes for v3.15" from Kumar Gala: We've split Qualcomm MSM support into legacy and multiplatform. These drivers are only relevant on the multiplatform supported SoCs so switch the Kconfig depends to ARCH_QCOM. * tag 'qcom-drivers-for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom: gpio: msm: switch Kconfig to ARCH_QCOM depends hwrng: msm: switch Kconfig to ARCH_QCOM depends power: reset: msm - switch Kconfig to ARCH_QCOM depends drm/msm: drop ARCH_MSM Kconfig depend tty: serial: msm: Enable building msm_serial for ARCH_QCOM
2014-02-25gpio: msm: switch Kconfig to ARCH_QCOM dependsKumar Gala1-1/+1
We've split Qualcomm MSM support into legacy and multiplatform. The gpio msm-v2 driver is only relevant on the multiplatform supported SoCs so switch the Kconfig depends to ARCH_QCOM. CC: Linus Walleij <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Signed-off-by: Kumar Gala <[email protected]>
2014-02-24gpio: rc5t583: Remove redundant checkAlexander Shiyan1-1/+1
Variable "offset" cannot be negative, so no need to check if it greater than zero or equal. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-24gpio: davinci: Use signed type for 'irq' variableAlexander Shiyan1-1/+2
Variable 'irq' is declared as unsigned and then used to store negative return values from irq_alloc_descs() such as -EINVAL. This patch fix this by declaring the variable as a signed. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-24gpio: omap: Use devm_ioremap_resource()Jingoo Han1-17/+3
Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because the value is checked by devm_ioremap_resource(). Signed-off-by: Jingoo Han <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Acked-by: Kevin Hilman <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-24gpio: pl061: Use devm_ioremap_resource()Jingoo Han1-12/+3
Use devm_ioremap_resource() in order to make the code simpler. Signed-off-by: Jingoo Han <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-13gpio: pca953x: Fix gpio_base may not default to -1Aaron Sierra1-1/+2
If no device tree node existed for a device when CONFIG_OF_GPIO was defined, then gpio_base would not default to -1. Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-13gpio: pca953x: Add Exar XRA1202Aaron Sierra2-1/+4
Add Exar XRA1202 8-bit GPIO expander to supported list. Signed-off-by: Aaron Sierra <[email protected]> Acked-by: Graeme Smecher <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2014-02-13gpio: pca953x: Add NXP PCA9698Aaron Sierra2-2/+4
Add the NXP PCA9698 40-bit GPIO expander to the supported list. Note: This only enables GPIO functionality. Tested-by: Bob Schmitz <[email protected]> Signed-off-by: Aaron Sierra <[email protected]> Acked-by: Graeme Smecher <[email protected]> Signed-off-by: Linus Walleij <[email protected]>