06 Oct, 2013

1 commit


01 Oct, 2013

2 commits

  • The OMAP GPIO controller HW requires a pin to be configured in GPIO
    input mode in order to operate as an interrupt input. Since drivers
    should not be aware of whether an interrupt pin is also a GPIO or not,
    the HW should be fully configured/enabled as an IRQ if a driver solely
    uses IRQ APIs such as request_irq(), and never calls any GPIO-related
    APIs. As such, add the missing HW setup to the OMAP GPIO controller's
    irq_chip driver.

    Since this bypasses the GPIO subsystem we have to ensure that another
    driver won't be able to request the same GPIO pin that is used as an
    IRQ and set its direction as output. Requesting the GPIO and setting
    its direction as input is allowed though.

    This fixes smsc911x ethernet support for tobi and igep OMAP3 boards
    and OMAP4 SDP SPI based ethernet that use a GPIO as an interrupt line.

    Cc: stable@vger.kernel.org
    Acked-by: Stephen Warren
    Tested-by: George Cherian
    Tested-by: Aaro Koskinen
    Tested-by: Lars Poeschel
    Reviewed-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Acked-by: Santosh Shilimkar
    Acked-by: Tony Lindgren
    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Linus Walleij

    Javier Martinez Canillas
     
  • The GPIO OMAP controller pins can be used as IRQ and GPIO
    independently so is necessary to keep track GPIO pins and
    IRQ lines usage separately to make sure that the bank will
    always be enabled while being used.

    Also move gpio_is_input() definition in preparation for the
    next patch that setups the controller's irq_chip driver when
    a caller requests an interrupt line.

    Cc: stable@vger.kernel.org
    Acked-by: Stephen Warren
    Tested-by: George Cherian
    Tested-by: Aaro Koskinen
    Tested-by: Lars Poeschel
    Reviewed-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Acked-by: Santosh Shilimkar
    Acked-by: Tony Lindgren
    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Linus Walleij

    Javier Martinez Canillas
     

22 Sep, 2013

1 commit


13 Sep, 2013

2 commits

  • 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

    Martin Schwidefsky
     
  • 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
    ...

    Linus Torvalds
     

11 Sep, 2013

1 commit

  • 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

    Linus Torvalds
     

08 Sep, 2013

1 commit

  • 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
    ...

    Linus Torvalds
     

04 Sep, 2013

1 commit

  • 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

    Linus Walleij
     

03 Sep, 2013

1 commit

  • 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
    Acked-by: Alexandre Courbot
    Reviewed-by: Frank Rowand
    Cc: Tim Bird
    Signed-off-by: Linus Walleij

    Linus Walleij
     

30 Aug, 2013

4 commits

  • 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
    Signed-off-by: Linus Walleij

    Simon Guinot
     
  • 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
    Signed-off-by: Lars Poeschel
    Signed-off-by: Linus Walleij

    Lars Poeschel
     
  • Use the new of_parse_phandle_with_fixed_args() to implement the
    corrected gpio-ranges DT property definition.

    Signed-off-by: Stephen Warren
    Acked-by: Mark Rutland
    Acked-by: Linus Walleij
    Signed-off-by: Grant Likely

    Stephen Warren
     
  • 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
    Acked-by: H Hartley Sweeten
    Signed-off-by: Vivien Didelot
    Signed-off-by: Olof Johansson

    Vivien Didelot
     

29 Aug, 2013

1 commit

  • 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
    Signed-off-by: Kyungmin Park
    Signed-off-by: Linus Walleij

    Tomasz Figa
     

26 Aug, 2013

1 commit

  • 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
    Reviewed-by: Linus Walleij
    Cc: linux-gpio@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/5633/
    Signed-off-by: Ralf Baechle

    David Daney
     

24 Aug, 2013

3 commits


16 Aug, 2013

13 commits

  • 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
    Signed-off-by: Guenter Roeck
    Signed-off-by: Linus Walleij

    Brunner Michael
     
  • 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
    Reviewed-by: Gregory CLEMENT
    Signed-off-by: Linus Walleij

    Andrew Ruder
     
  • 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/)

    //
    @@
    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);
    //

    Signed-off-by: Julia Lawall
    Acked-by: Viresh Kumar
    Signed-off-by: Linus Walleij

    Julia Lawall
     
  • 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/)

    //
    @r@
    expression e1,e2,e;
    type T;
    identifier i;
    @@

    e1
    -,
    +;
    e2;
    //

    Signed-off-by: Julia Lawall
    Acked-by: Kevin Hilman
    Signed-off-by: Linus Walleij

    Julia Lawall
     
  • 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
    Signed-off-by: Linus Walleij

    Mathias Nyman
     
  • 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
    Acked-by: Kevin Strasser
    Signed-off-by: Michael Brunner

    Michael Brunner
     
  • 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
    Signed-off-by: Linus Walleij

    Lars Poeschel
     
  • 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
    Signed-off-by: Linus Walleij

    Jingoo Han
     
  • Signed-off-by: Lothar Waßmann
    Signed-off-by: Linus Walleij

    Lothar Waßmann
     
  • Use the wrapper function for retrieving the platform data instead of
    accessing dev->platform_data directly.

    Signed-off-by: Jingoo Han
    Signed-off-by: Linus Walleij

    Jingoo Han
     
  • 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
    Acked-by: Shawn Guo
    Signed-off-by: Linus Walleij

    Uwe Kleine-König
     
  • 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
    Acked-by: Lars Poeschel
    Signed-off-by: Linus Walleij

    Daniel M. Weeks
     
  • 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
    Acked-by: Laxman Dewangan
    Signed-off-by: Linus Walleij

    Andrew Chew
     

31 Jul, 2013

4 commits


30 Jul, 2013

1 commit

  • Add of_device_id table for Palma GPIO to be enable the
    driver from DT file.

    The driver can be registered from DT file as:
    palmas: tps65913@58 {
    :::::::::::
    palmas_gpio: palmas_gpio {
    compatible = "ti,palmas-gpio";
    gpio-controller;
    #gpio-cells = ;
    };
    };

    Signed-off-by: Laxman Dewangan
    Acked-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     

23 Jul, 2013

1 commit

  • Commit 8cd73e4e (gpio: gpio-mxc: Use devm functions) causes the following build
    error on imx_v4_v7_defconfig:

    drivers/gpio/gpio-mxc.c:414:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
    drivers/gpio/gpio-mxc.c:415:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]

    Note: imx_v6_v7_defconfig does not give this build error, probably due to some
    indirect header file inclusion.

    Reported-by: Olof Johansson
    Signed-off-by: Fabio Estevam
    Signed-off-by: Linus Walleij

    Fabio Estevam
     

22 Jul, 2013

1 commit

  • Commit f87311743 ("ARM: mmp: add more compatible names in gpio driver")
    changed the driver logic to determine the number of available GPIOs from
    the compatible string, and hence obsoleted the (undocumented) child
    nodes that were previously necessary. However, it left some remainder
    which can be safely removed now.

    Also, this patch makes pxa_gpio_probe_dt() return the correct value in
    case irq_alloc_descs() fails.

    Signed-off-by: Daniel Mack
    Cc: Haojian Zhuang
    Cc: Linus Walleij
    Cc: Arnd Bergmann
    Signed-off-by: Linus Walleij

    Daniel Mack
     

21 Jul, 2013

1 commit

  • Register the GPIO pin range, and request and free GPIO pins using the
    pinctrl API. The pctl_name platform data member should be used by
    platform devices to point out which pinctrl device to use.

    Follows same style as "dc3465a gpio-rcar: Add pinctrl support",
    by Laurent Pinchart, thanks to him.

    Signed-off-by: Magnus Damm
    Signed-off-by: Linus Walleij

    Magnus Damm