03 Jan, 2018

1 commit

  • commit 822703354774ec935169cbbc8d503236bcb54fda upstream.

    Following commit 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names()
    to use device property accessors"), "gpio-line-names" DT property is
    not retrieved anymore when chip->parent is not set by the driver.
    This is due to OF based property reads having been replaced by device
    based property reads.

    This patch fixes that by making use of
    fwnode_property_read_string_array() instead of
    device_property_read_string_array() and handing over either
    of_fwnode_handle(chip->of_node) or dev_fwnode(chip->parent)
    to that function.

    Fixes: 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names() to use device property accessors")
    Signed-off-by: Christophe Leroy
    Acked-by: Mika Westerberg
    Signed-off-by: Linus Walleij
    Signed-off-by: Greg Kroah-Hartman

    Christophe Leroy
     

14 Aug, 2017

2 commits

  • Add descriptions for missing fields and fix up some parameter references
    to match the code.

    Signed-off-by: Thierry Reding
    Signed-off-by: Linus Walleij

    Thierry Reding
     
  • Now that we have a custom printf format specifier, convert users of
    full_name to use %pOF instead. This is preparation to remove storing
    of the full path string for each node.

    Signed-off-by: Rob Herring
    Cc: Tien Hock Loh
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: Brian Norris
    Cc: Florian Fainelli
    Cc: bcm-kernel-feedback-list@broadcom.com
    Cc: Michal Simek
    Cc: "Sören Brinkmann"
    Cc: linux-gpio@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Acked-by: Gregory Fong
    Signed-off-by: Linus Walleij

    Rob Herring
     

16 Jun, 2017

1 commit


29 May, 2017

1 commit


07 Apr, 2017

1 commit

  • Currently, the GPIO interface is said to Open Drain if it is Single
    Ended and active LOW. Similarly, it is said as Open Source if it is
    Single Ended and active HIGH.

    The active HIGH/LOW is used in the interface for setting the pin
    state to HIGH or LOW when enabling/disabling the interface.

    In Open Drain interface, pin is set to HIGH by putting pin in
    high impedance and LOW by driving to the LOW.

    In Open Source interface, pin is set to HIGH by driving pin to
    HIGH and set to LOW by putting pin in high impedance.

    With above, the Open Drain/Source is unrelated to the active LOW/HIGH
    in interface. There is interface where the enable/disable of interface
    is ether active LOW or HIGH but it is Open Drain type.

    Hence decouple the Open Drain with Single Ended + Active LOW and
    Open Source with Single Ended + Active HIGH.

    Adding different flag for the Open Drain/Open Source which is valid
    only when Single ended flag is enabled.

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     

30 Dec, 2016

1 commit

  • When listing multiple GPIOs in the "gpios" property of a GPIO hog, only
    the first GPIO is affected. The user is left clueless about the
    dysfunctioning of the other GPIOs specified.

    Fix this by adding and documenting support for specifying multiple
    GPIOs in a single GPIO hog.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Rob Herring
    Signed-off-by: Linus Walleij

    Geert Uytterhoeven
     

13 Dec, 2016

1 commit

  • Pull GPIO updates from Luinus Walleij:
    "Bulk GPIO changes for the v4.10 kernel cycle:

    Core changes:

    - Simplify threaded interrupt handling: instead of passing numbed
    parameters to gpiochip_irqchip_add_chained() we create a new call:
    gpiochip_irqchip_add_nested() so the two types are clearly
    semantically different. Also make sure that all nested chips call
    gpiochip_set_nested_irqchip() which is necessary for IRQ resend to
    work properly if it happens.

    - Return error on seek operations for the chardev.

    - Clamp values set as part of gpio[d]_direction_output() so that
    anything != 0 will be send down to the driver as "1" not the value
    passed in.

    - ACPI can now support naming of GPIO lines, hogs and holes in the
    GPIO lists.

    New drivers:

    - The SX150x driver was deemed unfit for the GPIO subsystem and was
    moved over to a combined GPIO+pinctrl driver in the pinctrl
    subsystem.

    New features:

    - Various cleanups to various drivers"

    * tag 'gpio-v4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (49 commits)
    gpio: merrifield: Implement gpio_get_direction callback
    gpio: merrifield: Add support for hardware debouncer
    gpio: chardev: Return error for seek operations
    gpio: arizona: Tidy up probe error path
    gpio: arizona: Remove pointless set of platform drvdata
    gpio: pl061: delete platform data handling
    gpio: pl061: move platform data into driver
    gpio: pl061: rename variable from chip to pl061
    gpio: pl061: rename state container struct
    gpio: pl061: use local state for parent IRQ storage
    gpio: set explicit nesting on drivers
    gpio: simplify adding threaded interrupts
    gpio: vf610: use builtin_platform_driver
    gpio: axp209: use correct register for GPIO input status
    gpio: stmpe: fix interrupt handling bug
    gpio: em: depnd on ARCH_SHMOBILE
    gpio: zx: depend on ARCH_ZX
    gpio: x86: update config dependencies for x86 specific hardware
    gpio: mb86s7x: use builtin_platform_driver
    gpio: etraxfs: use builtin_platform_driver
    ...

    Linus Torvalds
     

01 Nov, 2016

1 commit

  • Sylvain Lemieux reports the LPC32xx GPIO driver is broken since
    commit 762c2e46c059 ("gpio: of: remove of_gpiochip_and_xlate() and
    struct gg_data"). Probably, gpio-etraxfs.c and gpio-davinci.c are
    broken too.

    Those drivers register multiple gpio_chip that are associated to a
    single OF node, and their own .of_xlate() checks if the passed
    gpio_chip is valid.

    Now, the problem is of_find_gpiochip_by_node() returns the first
    gpio_chip found to match the given node. So, .of_xlate() fails,
    except for the first GPIO bank.

    Reverting the commit could be a solution, but I do not want to go
    back to the mess of struct gg_data. Another solution here is to
    take the match by a node pointer and the success of .of_xlate().
    It is a bit clumsy to call .of_xlate twice; for gpio_chip matching
    and for really getting the gpio_desc index. Perhaps, our long-term
    goal might be to convert the drivers to single chip registration,
    but this commit will solve the problem until then.

    Fixes: 762c2e46c059 ("gpio: of: remove of_gpiochip_and_xlate() and struct gg_data")
    Signed-off-by: Masahiro Yamada
    Reported-by: Sylvain Lemieux
    Tested-by: David Lechner
    Signed-off-by: Linus Walleij

    Masahiro Yamada
     

31 Oct, 2016

1 commit


24 Oct, 2016

1 commit


06 Oct, 2016

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.9 series:

    Subsystem improvements:

    - do away with the last users of the obsolete Kconfig options
    ARCH_REQUIRE_GPIOLIB and ARCH_WANT_OPTIONAL_GPIOLIB (the latter
    always sounded like an item on a wishlist to Santa Claus to me). We
    can now select GPIOLIB and be done with it, for all archs. After
    some struggle it even work on UM. Not that it has GPIO, but if it
    wants to, it can select the library.

    - continued efforts to make drivers properly either tristate or bool.

    - introduce a warning for drivers assigning default triggers to their
    irqchip lines when probed from device tree, so we find and fix
    these ambigous drivers. It is agreed that in the OF config path,
    the device tree defines trigger characteristics.

    - the same warning, mutatis mutandis, for ACPI-probed GPIO irqchips.

    - we introduce the ability to mark certain IRQ lines as "unusable" as
    they can be taken by BIOS/firmware, unrouted in silicon and
    generally nasty if you use them, and such things. This is put to
    good use in the STMPE driver and also in the Cherryview pin control
    driver.

    - a new "mockup" virtual GPIO device that can be used for testing.
    The plan is to add unit tests under tools/* for exercising this
    device and verify that the kernel code paths are working as they
    should.

    - make memory-mapped I/O-drivers depend on HAS_IOMEM. This was
    implicit all the time, but when people started building UM with
    allyesconfig or allmodconfig it exploded in their face.

    - move some stray bits of device tree and ACPI HW description
    callbacks down into their respective implementation silo. These
    were causing issues when compiling on !HAS_IOMEM as well, so now
    eventually UM compiles the GPIOLIB library if it wants to.

    New drivers:

    - new driver for the Aspeed GPIO front-end companion to the pin
    controller merged through the pin control tree.

    - new driver for the LP873x PMIC GPIO portions.

    - new driver for Technologic Systems' I2C FPGA GPIO such as TS4900,
    TS-7970, TS-7990 and TS-4100.

    - new driver for the Broadcom BCM63xx series including BCM6338 and
    BCM6345.

    - new driver for the Intel WhiskeyCove PMIC GPIO.

    - new driver for the Allwinner AXP209 PMIC GPIO portions.

    - new driver for Diamond Systems 48 line GPIO-MM, another of these
    port-mapped I/O expansion cards.

    - support the STMicroelectronics STMPE1600 variant in the STMPE
    driver.

    Driver improvements:

    - the STMPE driver now supports rising/falling edge detection
    properly for IRQs.

    - the PCA954x will now fetch and enable its VCC regulator properly.

    - major rework of the PCA953x driver with the goal of eventually
    switching it over to use regmap and thus modernize it even more.

    - switch the IOP driver to use the generic MMIO GPIO library.

    - move the ages old HTC EGPIO (extended GPIO) GPIO expander driver
    over to this subsystem from MFD, achieveing some separation of
    concerns"

    * tag 'gpio-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (81 commits)
    gpio: add missing static inline
    gpio: OF: localize some gpiochip init functions
    gpio: acpi: separation of concerns
    gpio: OF: separation of concerns
    gpio: make memory-mapped drivers depend on HAS_IOMEM
    gpio: stmpe: use BIT() macro
    gpio: stmpe: forbid unused lines to be mapped as IRQs
    mfd/gpio: Move HTC GPIO driver to GPIO subsystem
    gpio: MAINTAINERS: Add an entry for GPIO mockup driver
    gpio/mockup: add virtual gpio device
    gpio: Added zynq specific check for special pins on bank zero
    gpio: axp209: Implement get_direction
    gpio: aspeed: remove redundant return value check
    gpio: loongson1: remove redundant return value check
    ARM: omap2: fix missing include
    gpio: tc3589x: fix up complaints on unsigned
    gpio: tc3589x: add .get_direction() and small cleanup
    gpio: f7188x: use gpiochip_get_data instead of container_of
    gpio: tps65218: use devm_gpiochip_add_data() for gpio registration
    gpio: aspeed: fix return value check in aspeed_gpio_probe()
    ...

    Linus Torvalds
     

03 Oct, 2016

1 commit

  • The generic GPIO library directly implement code for of_find_gpio()
    which is only used with CONFIG_OF and causes compilation problems
    on archs that do not even have stubs for OF functions, especially
    on UM that does not implement any IO remap functions.

    Move the function to gpiolib-of.c, implement a static inline stub
    in gpiolib.h returning PTR_ERR(-ENOENT) if CONFIG_OF_GPIO is not
    set and be done with it.

    Signed-off-by: Linus Walleij

    Linus Walleij
     

08 Sep, 2016

1 commit

  • This reverts commit 7d4defe21c682c934a19fce1ba8b54b7bde61b08.

    The commit was pointless, manically trembling in the dark for
    a solution. The real fixes are:

    commit 048c28c91e56
    ("gpio: make any OF dependent driver depend on OF_GPIO")
    commit 2527ecc9195e
    ("gpio: Fix OF build problem on UM")

    Reported-by: Chris Wilson
    Signed-off-by: Linus Walleij

    Linus Walleij
     

27 Jul, 2016

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.8 kernel cycle. The big
    news is the completion of the chardev ABI which I'm very happy about
    and apart from that it's an ordinary, quite busy cycle. The details
    are below.

    The patches are tested in linux-next for some time, patches to other
    subsystem mostly have ACKs.

    I got overly ambitious with configureing lines as input for IRQ lines
    but it turns out that some controllers have their interrupt-enable and
    input-enabling in orthogonal settings so the assumption that all IRQ
    lines are input lines does not hold. Oh well, revert and back to the
    drawing board with that.

    Core changes:

    - The big item is of course the completion of the character device
    ABI. It has now replaced and surpassed the former unmaintainable
    sysfs ABI: we can now hammer (bitbang) individual lines or sets of
    lines and read individual lines or sets of lines from userspace,
    and we can also register to listen to GPIO events from userspace.

    As a tie-in we have two new tools in tools/gpio: gpio-hammer and
    gpio-event-mon that illustrate the proper use of the new ABI. As
    someone said: the wild west days of GPIO are now over.

    - Continued to remove the pointless ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB
    Kconfig symbols. I'm patching hexagon, openrisc, powerpc, sh,
    unicore, ia64 and microblaze. These are either ACKed by their
    maintainers or patched anyways after a grace period and no response
    from maintainers.

    Some archs (ARM) come in from their trees, and others (x86) are
    still not fixed, so I might send a second pull request to root it
    out later in this merge window, or just defer to v4.9.

    - The GPIO tools are moved to the tools build system.

    New drivers:

    - New driver for the MAX77620/MAX20024.

    - New driver for the Intel Merrifield.

    - Enabled PCA953x for the TI PCA9536.

    - Enabled PCA953x for the Intel Edison.

    - Enabled R8A7792 in the RCAR driver.

    Driver improvements:

    - The STMPE and F7188x now supports the .get_direction() callback.

    - The Xilinx driver supports setting multiple lines at once.

    - ACPI support for the Vulcan GPIO controller.

    - The MMIO GPIO driver supports device tree probing.

    - The Acer One 10 is supported through the _DEP ACPI attribute.

    Cleanups:

    - A major cleanup of the OF/DT support code. It is way easier to
    read and understand now, probably this improves performance too.

    - Drop a few redundant .owner assignments.

    - Remove CLPS711x boardfile support: we are 100% DT"

    * tag 'gpio-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (67 commits)
    MAINTAINERS: Add INTEL MERRIFIELD GPIO entry
    gpio: dwapb: add missing fwnode_handle_put() in dwapb_gpio_get_pdata()
    gpio: merrifield: Protect irq_ack() and gpio_set() by lock
    gpio: merrifield: Introduce GPIO driver to support Merrifield
    gpio: intel-mid: Make it depend to X86_INTEL_MID
    gpio: intel-mid: Sort header block alphabetically
    gpio: intel-mid: Remove potentially harmful code
    gpio: rcar: add R8A7792 support
    gpiolib: remove duplicated include from gpiolib.c
    Revert "gpio: convince line to become input in irq helper"
    gpiolib: of_find_gpio(): Don't discard errors
    gpio: of: Allow overriding the device node
    gpio: free handles in fringe cases
    gpio: tps65218: Add platform_device_id table
    gpio: max77620: get gpio value based on direction
    gpio: lynxpoint: avoid potential warning on error path
    tools/gpio: add install section
    tools/gpio: move to tools buildsystem
    gpio: intel-mid: switch to devm_gpiochip_add_data()
    gpio: 74x164: Use spi_write() helper instead of open coding
    ...

    Linus Torvalds
     

23 Jun, 2016

5 commits


08 Jun, 2016

1 commit

  • When enabling the gpiolib for all archs a build robot came
    up with this:

    All errors (new ones prefixed by >>):

    drivers/gpio/gpiolib-of.c: In function 'of_mm_gpiochip_add_data':
    >> drivers/gpio/gpiolib-of.c:317:2: error: implicit declaration of
    function 'iounmap' [-Werror=implicit-function-declaration]
    iounmap(mm_gc->regs);
    ^~~~~~~
    cc1: some warnings being treated as errors

    Fix this by including explicitly.

    Fixes: 296ad4acb8ef ("gpio: remove deps on ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB")
    Reported-by: kbuild test robot
    Signed-off-by: Linus Walleij

    Linus Walleij
     

07 Jun, 2016

1 commit


10 May, 2016

1 commit

  • Make it possible to name the producer side of a GPIO line using
    a "gpio-line-names" property array, modeled on the
    "clock-output-names" property from the clock bindings.

    This naming is especially useful for:

    - Debugging: lines are named after function, not just opaque
    offset numbers.

    - Exploration: systems where some or all GPIO lines are available
    to end users, such as prototyping, one-off's "makerspace usecases"
    users are helped by the names of the GPIO lines when tinkering.
    This usecase has been surfacing recently.

    The gpio-line-names attribute is completely optional.

    Example output from lsgpio on a patched Snowball tree:

    GPIO chip: gpiochip6, "8000e180.gpio", 32 GPIO lines
    line 0: unnamed unused
    line 1: "AP_GPIO161" "extkb3" [kernel]
    line 2: "AP_GPIO162" "extkb4" [kernel]
    line 3: "ACCELEROMETER_INT1_RDY" unused [kernel]
    line 4: "ACCELEROMETER_INT2" unused
    line 5: "MAG_DRDY" unused [kernel]
    line 6: "GYRO_DRDY" unused [kernel]
    line 7: "RSTn_MLC" unused
    line 8: "RSTn_SLC" unused
    line 9: "GYRO_INT" unused
    line 10: "UART_WAKE" unused
    line 11: "GBF_RESET" unused
    line 12: unnamed unused

    Cc: Grant Likely
    Cc: Amit Kucheria
    Cc: David Mandala
    Cc: Lee Campbell
    Cc: devicetree@vger.kernel.org
    Acked-by: Rob Herring
    Reviewed-by: Michael Welling
    Signed-off-by: Linus Walleij

    Linus Walleij
     

14 Apr, 2016

1 commit

  • Look for child node which are available when iterating for
    gpio hog node for request/set GPIO initial configuration
    during OF gpio chip registration.

    All it really does is make it possible to set
    status = "disabled"; in the hog nodes, and then they will
    not be applied.

    Signed-off-by: Laxman Dewangan
    Reviewed-by: Thierry Reding
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     

13 Apr, 2016

1 commit

  • If GPIO hog configuration failed while adding OF based
    gpiochip() then return the error instead of ignoring it.

    This helps of properly handling the gpio driver dependency.

    When adding the gpio hog nodes for NVIDIA's Tegra210 platforms,
    the gpio_hogd() fails with EPROBE_DEFER because pinctrl is not
    ready at this time and gpio_request() for Tegra GPIO driver
    returns error. The error was not causing the Tegra GPIO driver
    to fail as the error was getting ignored.

    Signed-off-by: Laxman Dewangan
    Cc: Benoit Parrot
    Cc: Alexandre Courbot
    Reviewed-by: Thierry Reding
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     

05 Jan, 2016

1 commit


19 Nov, 2015

1 commit

  • The name .dev in a struct is normally reserved for a struct device
    that is let us say a superclass to the thing described by the struct.
    struct gpio_chip stands out by confusingly using a struct device *dev
    to point to the parent device (such as a platform_device) that
    represents the hardware. As we want to give gpio_chip:s real devices,
    this is not working. We need to rename this member to parent.

    This was done by two coccinelle scripts, I guess it is possible to
    combine them into one, but I don't know such stuff. They look like
    this:

    @@
    struct gpio_chip *var;
    @@
    -var->dev
    +var->parent

    and:

    @@
    struct gpio_chip var;
    @@
    -var.dev
    +var.parent

    and:

    @@
    struct bgpio_chip *var;
    @@
    -var->gc.dev
    +var->gc.parent

    Plus a few instances of bgpio that I couldn't figure out how
    to teach Coccinelle to rewrite.

    This patch hits all over the place, but I *strongly* prefer this
    solution to any piecemal approaches that just exercise patch
    mechanics all over the place. It mainly hits drivers/gpio and
    drivers/pinctrl which is my own backyard anyway.

    Cc: Haavard Skinnemoen
    Cc: Rafał Miłecki
    Cc: Richard Purdie
    Cc: Mauro Carvalho Chehab
    Cc: Alek Du
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Acked-by: Dmitry Torokhov
    Acked-by: Greg Kroah-Hartman
    Acked-by: Lee Jones
    Acked-by: Jiri Kosina
    Acked-by: Hans-Christian Egtvedt
    Acked-by: Jacek Anaszewski
    Signed-off-by: Linus Walleij

    Linus Walleij
     

25 Sep, 2015

1 commit


28 Jul, 2015

1 commit

  • When an OF node has a pin range for its GPIOs, return -EPROBE_DEFER if
    the pin controller isn't available.

    Otherwise, the GPIO range wouldn't be set at all unless the pin
    controller probed always before the GPIO chip.

    With this change, the probe of the GPIO chip will be deferred and will
    be retried at a later point, hopefully once the pin controller has been
    registered and probed already.

    Signed-off-by: Tomeu Vizoso
    Signed-off-by: Linus Walleij

    Tomeu Vizoso
     

16 Jul, 2015

2 commits


19 May, 2015

1 commit


18 Apr, 2015

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.1 development cycle:

    - A new GPIO hogging mechanism has been added. This can be used on
    boards that want to drive some GPIO line high, low, or set it as
    input on boot and then never touch it again. For some embedded
    systems this is bliss and simplifies things to a great extent.

    - Some API cleanup and closure: gpiod_get_array() and
    gpiod_put_array() has been added to get and put GPIOs in bulk as
    was possible with the non-descriptor API.

    - Encapsulate cross-calls to the pin control subsystem in
    . Now this should be the only header any GPIO
    driver needs to include or something is wrong. Cleanups
    restricting drivers to this include are welcomed if tested.

    - Sort the GPIO Kconfig and split it into submenus, as it was
    becoming and unstructured, illogical and unnavigatable mess. I
    hope this is easier to follow. Menus that require a certain
    subsystem like I2C can now be hidden nicely for example, still
    working on others.

    - New drivers:

    - New driver for the Altera Soft GPIO.

    - The F7188x driver now handles the F71869 and F71869A variants.

    - The MIPS Loongson driver has been moved to drivers/gpio for
    consolidation and cleanup.

    - Cleanups:

    - The MAX732x is converted to use the GPIOLIB_IRQCHIP
    infrastructure.

    - The PCF857x is converted to use the GPIOLIB_IRQCHIP
    infrastructure.

    - Radical cleanup of the OMAP driver.

    - Misc:

    - Enable the DWAPB GPIO for all architectures. This is a "hard
    IP" block from Synopsys which has started to turn up in so
    diverse architectures as X86 Quark, ARC and a slew of ARM
    systems. So even though it's not an expander, it's generic
    enough to be available for all.

    - We add a mock GPIO on Crystalcove PMIC after a long discussion
    with Daniel Vetter et al, tracing back to the shootout at the
    kernel summit where DRM drivers and sub-componentization was
    discussed. In this case a mock GPIO is assumed to be the best
    compromise gaining some reuse of infrastructure without making
    DRM drivers overly complex at the same time. Let's see"

    * tag 'gpio-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (62 commits)
    Revert "gpio: sch: use uapi/linux/pci_ids.h directly"
    gpio: dwapb: remove dependencies
    gpio: dwapb: enable for ARC
    gpio: removing kfree remove functionality
    gpio: mvebu: Fix mask/unmask managment per irq chip type
    gpio: split GPIO drivers in submenus
    gpio: move MFD GPIO drivers under their own comment
    gpio: move BCM Kona Kconfig option
    gpio: arrange SPI Kconfig symbols alphabetically
    gpio: arrange PCI GPIO controllers alphabetically
    gpio: arrange I2C Kconfig symbols alphabetically
    gpio: arrange Kconfig symbols alphabetically
    gpio: ich: Implement get_direction function
    gpio: use (!foo) instead of (foo == NULL)
    gpio: arizona: drop owner assignment from platform_drivers
    gpio: max7300: remove 'ret' variable
    gpio: use devm_kzalloc
    gpio: sch: use uapi/linux/pci_ids.h directly
    gpio: x-gene: fix devm_ioremap_resource() check
    gpio: loongson: Add Loongson-3A/3B GPIO driver support
    ...

    Linus Torvalds
     

04 Mar, 2015

1 commit

  • Based on Boris Brezillion's work this is a reworked patch
    of his initial GPIO hogging mechanism.
    This patch provides a way to initially configure specific GPIO
    when the GPIO controller is probed.

    The actual DT scanning to collect the GPIO specific data is performed
    as part of gpiochip_add().

    The purpose of this is to allow specific GPIOs to be configured
    without any driver specific code.
    This is particularly useful because board design are getting
    increasingly complex and given SoC pins can now have more
    than 10 mux values, a lot of connections are now dependent on
    external IO muxes to switch various modes.

    Specific drivers should not necessarily need to be aware of
    what accounts to a specific board implementation. This board level
    "description" should be best kept as part of the dts file.

    Signed-off-by: Benoit Parrot
    Reviewed-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Benoit Parrot
     

23 Feb, 2015

1 commit

  • The change:

    7b8792bbdffdff3abda704f89c6a45ea97afdc62
    gpiolib: of: Correct error handling in of_get_named_gpiod_flags

    assumed that only one gpio-chip is registred per of-node.
    Some drivers register more than one chip per of-node, so
    adjust the matching function of_gpiochip_find_and_xlate to
    not stop looking for chips if a node-match is found and
    the translation fails.

    Cc: Stable
    Fixes: 7b8792bbdffd ("gpiolib: of: Correct error handling in of_get_named_gpiod_flags")
    Signed-off-by: Hans Holmberg
    Acked-by: Alexandre Courbot
    Tested-by: Robert Jarzmik
    Tested-by: Tyler Hall
    Signed-off-by: Linus Walleij

    Hans Holmberg
     

12 Feb, 2015

1 commit

  • Pull GPIO changes from Linus Walleij:
    "This is the GPIO bulk changes for the v3.20 series:

    GPIOLIB core changes:
    - Create and use of_mm_gpiochip_remove() for removing memory-mapped
    OF GPIO chips
    - GPIO MMIO library suppports bgpio_set_multiple for switching
    several lines at once, a feature merged in the last cycle.

    New drivers:
    - New driver for the APM X-gene standby GPIO controller
    - New driver for the Fujitsu MB86S7x GPIO controller

    Cleanups:
    - Moved rcar driver to use gpiolib irqchip
    - Moxart converted to the GPIO MMIO library
    - GE driver converted to GPIO MMIO library
    - Move sx150x to irqdomain
    - Move max732x to irqdomain
    - Move vx855 to use managed resources
    - Move dwapb to use managed resources
    - Clean tc3589x from platform data
    - Clean stmpe driver to use device tree only probe

    New subtypes:
    - sx1506 support in the sx150x driver
    - Quark 1000 SoC support in the SCH driver
    - Support X86 in the Xilinx driver
    - Support PXA1928 in the PXA driver

    Extended drivers:
    - max732x supports device tree probe
    - sx150x supports device tree probe

    Various minor cleanups and bug fixes"

    * tag 'gpio-v3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (61 commits)
    gpio: kconfig: replace PPC_OF with PPC
    gpio: pxa: add PXA1928 gpio type support
    dt/bindings: gpio: add compatible string for marvell,pxa1928-gpio
    gpio: pxa: remove mach IRQ includes
    gpio: max732x: use an inline function for container cast
    gpio: use sizeof() instead of hardcoded values
    gpio: max732x: add set_multiple function
    gpio: sch: Consolidate similar algorithms
    gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation
    gpio: ge: Convert to use devm_kstrdup
    gpio: correctly use const char * const
    gpio: sx150x: fixup OF support
    gpio: mpc8xxx: Use of_mm_gpiochip_remove
    gpio: Add Fujitsu MB86S7x GPIO driver
    gpio: mpc8xxx: Convert to platform device interface.
    gpio: zevio: Use of_mm_gpiochip_remove
    gpio: gpio-mm-lantiq: Use of_mm_gpiochip_remove
    gpio: gpio-mm-lantiq: Use of_property_read_u32
    gpio: gpio-mm-lantiq: Do not replicate code
    gpio :gpio-mm-lantiq: Use devm_kzalloc
    ...

    Linus Torvalds
     

16 Jan, 2015

2 commits


17 Aug, 2014

1 commit

  • Of_node_put supports NULL as its argument, so the initial test is not
    necessary.

    Suggested by Uwe Kleine-König.

    The semantic patch that fixes this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression e;
    @@

    -if (e)
    of_node_put(e);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Linus Walleij

    Julia Lawall
     

23 Jul, 2014

1 commit