aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)AuthorFilesLines
2013-09-20ARM: plat-iop: instantiate GPIO from platform deviceLinus Walleij1-2/+34
This converts the IOP32x and IOP33x platforms to pass their base address offset by a resource attached to a platform device instead of using static offset macros implicitly passed through <linux/gpio.h> including <mach/gpio.h>. Delete the local <mach/gpio.h> and <asm/hardware/iop3xx-gpio.h> headers and remove the selection of NEED_MACH_GPIO_H. Pass the virtual address as a resource in the platform device at this point for bisectability, next patch will pass the physical address as is custom. Cc: Lennert Buytenhek <[email protected]> Cc: Dan Williams <[email protected]> Cc: Mikael Pettersson <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-20ARM: plat-iop: remove custom complex GPIO implementationLinus Walleij1-6/+3
The kernel will now only use gpiolib to access GPIOs, so remove the complex GPIO flag and the custom implementation. Cc: Lennert Buytenhek <[email protected]> Cc: Dan Williams <[email protected]> Cc: Mikael Pettersson <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-20gpio: decouple the IOP GPIO driver from platformLinus Walleij1-2/+2
This removes the only dependence between the IOP GPIO driver and the GENERIC_GPIO header in <mach/gpio.h> and its common implementation in the <asm/*> namespace by copying the one constant it is using into the driver file. Cc: Lennert Buytenhek <[email protected]> Cc: Dan Williams <[email protected]> Cc: Mikael Pettersson <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-20ARM: plat-iop: move the GPIO driver to drivers/gpioLinus Walleij3-0/+103
Move the IOP GPIO driver to live with its siblings in the GPIO subsystem. Cc: Lennert Buytenhek <[email protected]> Cc: Dan Williams <[email protected]> Cc: Mikael Pettersson <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-20gpio: ucb1400: Can be built as a moduleJean Delvare1-1/+1
With the recent code cleanup from Marek Vasut, driver gpio-ucb1400 can be built as a module, so change symbol GPIO_UCB1400 from bool to tristate. Signed-off-by: Jean Delvare <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Cc: Linus Walleij <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-20gpio: bt8xx: remove unnecessary pci_set_drvdata()Jingoo Han1-2/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-20gpio: arizona: Add wm8997 support to probeCharles Keepax1-0/+1
Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-20gpio: bcm281xx: Add GPIO driverMarkus Mayer3-0/+639
Add the GPIO driver for the Broadcom bcm281xx family of mobile SoCs. These GPIO controllers may contain up to 8 banks where each bank includes 32 pins that can be driven high or low and act as an edge sensitive interrupt. Signed-off-by: Markus Mayer <[email protected]> Reviewed-by: Christian Daudt <[email protected]> Reviewed-by: Tim Kryger <[email protected]> Reviewed-by: Matt Porter <[email protected]> Reviewed-by: Stephen Warren <[email protected]> [Added depends on OF_GPIO] Signed-off-by: Linus Walleij <[email protected]>
2013-09-20gpiolib: factorize gpiod_get/set functionsAlexandre Courbot1-39/+33
gpiod_get/set functions share common code between their regular and cansleep variants. The exporting of the gpiod interface will make the situation worse. This patch factorizes the common code to avoid code redundancy. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-19emev2: GPIOLIB: Enable support for OFIan Molton2-1/+2
EMEV2 is now a DT platform, however the GPIO driver cannot be used from a DT file since it does not fill out the of_node field in its gpio_chip structure. Signed-off-by: Ian Molton <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-19gpio: palmas: add support for TPS80036Laxman Dewangan1-35/+69
TI Palmas series device TPS80036 supports 16 GPIOs. Register its all 16 gpios when this device is selected. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-19gpiolib: Include GPIO label in log messages for GPIOsMark Brown1-0/+21
Provide the human readable label for the GPIO as well as the number when we are recording it in order to improve the readability of log messages. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-19gpiolib: Provide helper macros for logging of GPIO eventsMark Brown1-20/+32
Currently many but not all GPIO log messages log the GPIO number and the formats vary. Ensure that this is done consistently by defining logging helpers which take the GPIO descriptor. The will help people pattern matching on logs and providing the number makes the log messages that omitted it more useful. Signed-off-by: Mark Brown <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-18gpio: pcf857x: only use set_irq_flags() on ARMLinus Walleij1-3/+7
As per the pattern from other GPIO drivers, use set_irq_flags() on ARM only, use irq_set_noprobe() on other archs. Also rename the argument "virq" to just "irq", this IRQ isn't any more "virtual" than any other Linux IRQ number, we use "hwirq" for the actual hw-numbers, "virq" is just bogus. Cc: George Cherian <[email protected]> Cc: Kuninori Morimoto <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-17gpiolib-acpi: convert acpi_evaluate_object() to acpi_execute_simple_method()Zhang Rui1-8/+1
acpi_execute_simple_method() is a new ACPI API introduced to invoke an ACPI control method that has single integer parameter and no return value. Convert acpi_evaluate_object() to acpi_execute_simple_method() in drivers/gpio/gpiolib-acpi.c Signed-off-by: Zhang Rui <[email protected]> Acked-by: Mika Westerberg <[email protected]> Acked-by: Mathias Nyman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-17gpio: pcf857x: call the gpio user handler iff gpio_to_irq is doneGeorge Cherian1-3/+19
For pcf857x driver if the initial state is not set properly (proper n_latch is not passed), we get bad irq prints on console. We get this only for the first interrupt and doesnot repeat for further interrupts unles and until there are other gpio pins which are not flipping continously. following prints are seen on console. [ 40.983924] irq 0, desc: ce004080, depth: 1, count: 0, unhandled: 0 [ 40.990511] ->handle_irq(): c00aa538, handle_bad_irq+0x0/0x260 [ 40.996768] ->irq_data.chip(): c080b6ec, no_irq_chip+0x0/0x60 [ 41.002842] ->action(): (null) [ 41.006242] IRQ_NOPROBE set [ 41.009465] IRQ_NOREQUEST set Signed-off-by: George Cherian <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-17gpio: pcf857x: remove the irq_demux_work and gpio->irqGeorge Cherian1-37/+0
Now that we are using devm_request_threaded_irq no need for irq_demux_work and gpio->irq. Remove all its references. Signed-off-by: George Cherian <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-17gpio: pcf857x: change to devm_request_threaded_irqGeorge Cherian1-4/+24
Remove the request_irq and use devm_request_threaded_irq also cleanup free_irq. devm_* takes care of that. Signed-off-by: George Cherian <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-09-17gpio: samsung: Skip initialization if device tree is presentTomasz Figa1-27/+7
Since this driver does not handle GPIO on device tree enabled platforms any more, it should be bypassed whenever device tree is available, to not conflict with the new pinctrl-samsung driver. Signed-off-by: Tomasz Figa <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2013-09-13Remove GENERIC_HARDIRQ config optionMartin Schwidefsky1-3/+3
After the last architecture switched to generic hard irqs the config options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code for !CONFIG_GENERIC_HARDIRQS can be removed. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-09-12Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds3-0/+166
Pull MIPS updates from Ralf Baechle: "This has been sitting in -next for a while with no objections and all MIPS defconfigs except one are building fine; that one platform got broken by another patch in your tree and I'm going to submit a patch separately. - a handful of fixes that didn't make 3.11 - a few bits of Octeon 3 support with more to come for a later release - platform enhancements for Octeon, ath79, Lantiq, Netlogic and Ralink SOCs - a GPIO driver for the Octeon - some dusting off of the DECstation code - the usual dose of cleanups" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (65 commits) MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code MIPS: kexec: Fix random crashes while loading crashkernel MIPS: kdump: Skip walking indirection page for crashkernels MIPS: DECstation HRT calibration bug fixes MIPS: Export copy_from_user_page() (needed by lustre) MIPS: Add driver for the built-in PCI controller of the RT3883 SoC MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000 MIPS: ralink: Add support for reset-controller API MIPS: ralink: mt7620: Add cpu-feature-override header MIPS: ralink: mt7620: Add spi clock definition MIPS: ralink: mt7620: Add wdt clock definition MIPS: ralink: mt7620: Improve clock frequency detection MIPS: ralink: mt7620: This SoC has EHCI and OHCI hosts MIPS: ralink: mt7620: Add verbose ram info MIPS: ralink: Probe clocksources from OF MIPS: ralink: Add support for systick timer found on newer ralink SoC MIPS: ralink: Add support for periodic timer irq MIPS: Netlogic: Built-in DTB for XLP2xx SoC boards MIPS: Netlogic: Add support for USB on XLP2xx MIPS: Netlogic: XLP2xx update for I2C controller ...
2013-09-10Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds1-2/+2
Pull device tree core updates from Grant Likely: "Generally minor changes. A bunch of bug fixes, particularly for initialization and some refactoring. Most notable change if feeding the entire flattened tree into the random pool at boot. May not be significant, but shouldn't hurt either" Tim Bird questions whether the boot time cost of the random feeding may be noticeable. And "add_device_randomness()" is definitely not some speed deamon of a function. * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux: of/platform: add error reporting to of_amba_device_create() irq/of: Fix comment typo for irq_of_parse_and_map of: Feed entire flattened device tree into the random pool of/fdt: Clean up casting in unflattening path of/fdt: Remove duplicate memory clearing on FDT unflattening gpio: implement gpio-ranges binding document fix of: call __of_parse_phandle_with_args from of_parse_phandle of: introduce of_parse_phandle_with_fixed_args of: move of_parse_phandle() of: move documentation of of_parse_phandle_with_args of: Fix missing memory initialization on FDT unflattening of: consolidate definition of early_init_dt_alloc_memory_arch() of: Make of_get_phy_mode() return int i.s.o. const int include: dt-binding: input: create a DT header defining key codes. of/platform: Staticize of_platform_device_create_pdata() of: Specify initrd location using 64-bit dt: Typo fix OF: make of_property_for_each_{u32|string}() use parameters if OF is not enabled
2013-09-07Merge tag 'gpio-v3.12-1' of ↵Linus Torvalds49-1019/+1775
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v3.12 series: - A new driver for the TZ1090 PDC which is used on the metag architecture. - A new driver for the Kontron ETX or COMexpress GPIO block. This is found on some ETX x86 devices. - A new driver for the Fintek Super-I/O chips, used on some x86 boards. - Added device tree probing on a few select GPIO blocks. - Drop the Exynos support from the Samsung GPIO driver. The Samsung maintainers have moved over to use the modernized pin control driver to provide GPIO for the modern platforms instead. - The usual bunch of non-critical fixes and cleanups" * tag 'gpio-v3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (36 commits) gpio: return -ENOTSUPP if debounce cannot be set gpio: improve error path in gpiolib gpio: add GPIO support for F71882FG and F71889F of: add vendor prefix for Microchip Technology Inc gpio: mcp23s08: rename the device tree property gpio: samsung: Drop support for Exynos SoCs gpio: pcf857x: Remove pdata argument to pcf857x_irq_domain_init() gpio: pcf857x: Sort headers alphabetically gpio: max7301: Reverting "Do not force SPI speed when using OF Platform" gpio: Fix bit masking in Kontron PLD GPIO driver gpio: pca953x: fix gpio input on gpio offsets >= 8 drivers/gpio: simplify use of devm_ioremap_resource drivers/gpio/gpio-omap.c: convert comma to semicolon gpio-lynxpoint: Fix warning about unbalanced pm_runtime_enable gpio: Fix platform driver name in Kontron PLD GPIO driver gpio: adnp: Fix segfault if request_threaded_irq fails gpio: msm: Staticize local variable 'msm_gpio' gpio: gpiolib-of.c: make error message more meaningful by adding the node name and index gpio: use dev_get_platdata() gpio/mxc: add chained_irq_enter/exit() to mx2_gpio_irq_handler ...
2013-09-04gpio: return -ENOTSUPP if debounce cannot be setLinus Walleij1-2/+5
It appears some drivers are using gpio_set_debounce() opportunistically, i.e. without knowing whether it works or not. (Example: input/keyboard/gpio_keys.c) to account for this use case, return -ENOTSUPP and do not print any warnings in this case. Took a round over the other gpio_set_debounce() consumers to make sure that none of them are relying on the returned error code to be something specific. Signed-off-by: Linus Walleij <[email protected]>
2013-09-03gpio: improve error path in gpiolibLinus Walleij1-16/+25
At several places the gpiolib will proceed to handle a GPIO descriptor even if it's ->chip member is NULL and no gpiochip is associated. Fix this by checking that both the descriptor cookie *and* the chip pointer are valid. Also bail out earlier with more specific diagnostic messages on missing operations for setting as input/output or debounce. ChangeLog v1->v2: - Also return -EIO on gpiod_set_debounce() with missing operations in the vtable - Fix indentations. Suggested-by: Alexandre Courbot <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Reviewed-by: Frank Rowand <[email protected]> Cc: Tim Bird <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-30gpio: add GPIO support for F71882FG and F71889FSimon Guinot3-0/+480
This patch adds support for the GPIOs found on the Fintek super-I/O chips F71882FG and F71889F. A super-I/O is a legacy I/O controller embedded on x86 motherboards. It is used to connect the low-bandwidth devices. Among others functions the F71882FG/F71889F provides: a parallel port, two serial ports, a keyboard controller, an hardware monitoring controller and some GPIO pins. Note that this super-I/Os are embedded on some Atom-based LaCie NASes. The GPIOs are used to control the LEDs and the hard drive power. Changes since v3: - Use request_muxed_region to protect the I/O ports against concurrent accesses. Changes since v2: - Remove useless NULL setters for driver data. Changes since v1: - Enhance the commit message by describing what is a Super-I/O. - Use self-explanatory names for the GPIO register macros. - Add a comment to explain the platform device and driver registration. - Fix gpio_get when GPIO is configured in input mode. I only had the hardware to check this mode recently... Signed-off-by: Simon Guinot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-30gpio: mcp23s08: rename the device tree propertyLars Poeschel1-7/+34
The device tree property should be more descriptive. microchip seems more reasonable than mcp. The old mcp prefix is still supported but marked as deprecated. Users of mcp have to switch to the microchip prefix. Acked-by: Mark Rutland <[email protected]> Signed-off-by: Lars Poeschel <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-29gpio: implement gpio-ranges binding document fixStephen Warren1-2/+2
Use the new of_parse_phandle_with_fixed_args() to implement the corrected gpio-ranges DT property definition. Signed-off-by: Stephen Warren <[email protected]> Acked-by: Mark Rutland <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2013-08-29gpio: (gpio-pca953x) move header to linux/platform_data/Vivien Didelot1-1/+1
This patch moves the pca953x.h header from include/linux/i2c to include/linux/platform_data and updates existing support accordingly. Acked-by: Linus Walleij <[email protected]> Acked-by: H Hartley Sweeten <[email protected]> Signed-off-by: Vivien Didelot <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
2013-08-29gpio: samsung: Drop support for Exynos SoCsTomasz Figa1-871/+0
GPIO support on Exynos SoCs is provided by pinctrl-samsung driver, leaving all the support code in gpio-samsung driver unused. This dead code can be safely removed and so it is done by this patch. Signed-off-by: Tomasz Figa <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-26gpio MIPS/OCTEON: Add a driver for OCTEON's on-chip GPIO pins.David Daney3-0/+166
The SOCs in the OCTEON family have 16 (or in some cases 20) on-chip GPIO pins, this driver handles them all. Configuring the pins as interrupt sources is handled elsewhere (OCTEON's irq handling code). Signed-off-by: David Daney <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/5633/ Signed-off-by: Ralf Baechle <[email protected]>
2013-08-23gpio: pcf857x: Remove pdata argument to pcf857x_irq_domain_init()Laurent Pinchart1-5/+4
The argument is not used, remove it. No board registers a pcf857x device with an IRQ without specifying platform data, IRQ domain registration behaviour is thus not affected by this change. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-23gpio: pcf857x: Sort headers alphabeticallyLaurent Pinchart1-2/+2
This makes checking for duplicates when adding a new #include easier. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-23gpio: max7301: Reverting "Do not force SPI speed when using OF Platform"Christophe Leroy1-2/+1
This patch reverts commit 047b93a35961f7a6561e6f5dcb040738f822b892 which breaks MAX7301 GPIO driver because that commit was dependant on a rejected patch that was implementing selection of SPI speed from the Device Tree. Signed-off-by: Christophe Leroy <[email protected]> Acked-by: Roland Stigge <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio: Fix bit masking in Kontron PLD GPIO driverBrunner Michael1-15/+9
This patch fixes the bit masking within the GPIO driver. The masking is basically done twice which causes the wrong GPIOs to be addressed. Signed-off-by: Michael Brunner <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio: pca953x: fix gpio input on gpio offsets >= 8Andrew Ruder1-1/+1
This change fixes a regression introduced by commit f5f0b7aa8 (gpio: pca953x: make the register access by GPIO bank) When the pca953x driver was converted to using 8-bit reads/writes the bitmask in pca953x_gpio_get_value wasn't adjusted with a modulus BANK_SZ and consequently looks at the wrong bits in the input register. Signed-off-by: Andrew Ruder <[email protected]> Reviewed-by: Gregory CLEMENT <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16drivers/gpio: simplify use of devm_ioremap_resourceJulia Lawall2-12/+2
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16drivers/gpio/gpio-omap.c: convert comma to semicolonJulia Lawall1-1/+1
Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended. A simplified version of the semantic patch that performs this transformation is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ expression e1,e2,e; type T; identifier i; @@ e1 -, +; e2; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio-lynxpoint: Fix warning about unbalanced pm_runtime_enableMathias Nyman1-0/+1
Missing pm_runtime_disable call in driver remove path caused an unbalanaced pm_runtime_enable warning when driver was reloaded Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio: Fix platform driver name in Kontron PLD GPIO driverMichael Brunner1-1/+1
This patch changes the driver name to be consistent with the name that is registered as cell name in the MFD driver. Otherwise the driver won't load. Reviewed-by: Guenter Roeck <[email protected]> Acked-by: Kevin Strasser <[email protected]> Signed-off-by: Michael Brunner <[email protected]>
2013-08-16gpio: adnp: Fix segfault if request_threaded_irq failsLars Poeschel1-5/+1
In case request_threaded_irq inside adnp_irq_setup fails, the driver segfaults. This is because irq_domain_remove is called twice with the same pointer. First time in adnp_irq_setup and then a second time after leaving adnp_irq_setup in the error path of adnp_i2c_probe inside adnp_teardown. This fixes this by removing the call to irq_domain_remove from adnp_irq_setup. Signed-off-by: Lars Poeschel <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio: msm: Staticize local variable 'msm_gpio'Jingoo Han1-1/+1
The local variable 'msm_gpio' is used only in this file. Fix the following sparse warning: drivers/gpio/gpio-msm-v2.c:109:21: warning: symbol 'msm_gpio' was not declared. Should it be static? Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio: gpiolib-of.c: make error message more meaningful by adding the node ↵Lothar Waßmann1-1/+2
name and index Signed-off-by: Lothar Waßmann <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio: use dev_get_platdata()Jingoo Han31-42/+45
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio/mxc: add chained_irq_enter/exit() to mx2_gpio_irq_handlerUwe Kleine-König1-0/+4
Similar to commit 0e44b6e (gpio/mxc: add chained_irq_enter/exit() to mx3_gpio_irq_handler()) . It doesn't seem to be critical to make the irqs work, but still it is more correct. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio-mcp23s08: i2c: auto-select base if no DT match or platform dataDaniel M. Weeks1-5/+4
The call to gpiochip_add made by this driver is capable of auto-selecting a base if one is not provided. However, it was not called unless there was already a DT entry or platform data. This patch calls it even if the base is not already known so that gpiochip_add can attempt to find a usable base. Signed-off-by: Daniel M. Weeks <[email protected]> Acked-by: Lars Poeschel <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-08-16gpio: palmas: Fix misreported GPIO out valueAndrew Chew1-2/+15
It seems that the value read back from the PALMAS_GPIO_DATA_IN register isn't valid if the GPIO direction is out. When that's the case, we can read back the PALMAS_GPIO_DATA_OUT register to get the proper output value. Signed-off-by: Andrew Chew <[email protected]> Acked-by: Laxman Dewangan <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-07-31gpio_msm: Fix build error due to missing err.hStephen Boyd1-0/+1
drivers/gpio/gpio-msm-v1.c: In function 'gpio_msm_v1_probe': drivers/gpio/gpio-msm-v1.c:656:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration] drivers/gpio/gpio-msm-v1.c:657:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration] This driver failed to compile after commit 68515bb (gpio_msm: Convert to use devm_ioremap_resource, 2013-06-10). Acked-by: Tushar Behera <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-07-31Revert "gpio/omap: don't create an IRQ mapping for every GPIO on DT"Linus Walleij1-40/+14
This reverts commit 0e970cec05635adbe7b686063e2548a8e4afb8f4. Signed-off-by: Linus Walleij <[email protected]>
2013-07-31Revert "gpio/omap: auto request GPIO as input if used as IRQ via DT"Linus Walleij1-18/+0
This reverts commit b4419e1a15905191661ffe75ba2f9e649f5d565e. Signed-off-by: Linus Walleij <[email protected]>