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
     

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

2 commits


09 Jul, 2014

1 commit

  • Following is the debug output (only a few examples) before and after
    the patch.

    $ dmesg | grep of_get_named_gpiod_flags

    Before:
    of_get_named_gpiod_flags: can't parse gpios property
    of node '/mmc@12220000[0]'
    of_get_named_gpiod_flags exited with status 0

    After:
    of_get_named_gpiod_flags: can't parse 'wp-gpios' property
    of node '/mmc@12220000[0]'
    of_get_named_gpiod_flags: parsed 'gpios' property of node
    '/gpio-keys/power[0]' - status (0)

    Signed-off-by: Tushar Behera
    Reviewed-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Tushar Behera
     

21 May, 2014

1 commit

  • of_get_named_gpiod_flags() is visible and directly usable by GPIO
    consumers, but it really should not as the gpiod interface relies
    on the simpler gpiod_get() to provide properly-configured GPIOs.

    of_get_named_gpiod_flags() is just used internally by gpiolib to
    implement gpiod_get(), and by the old of_get_named_gpio_flags()
    function, therefore it makes sense to make it gpiolib-private.

    As a side-effect, the unused (and unneeded) of_get_gpiod_flags()
    inline function is also removed, and of_get_named_gpio_flags() is moved
    from a static inline function to a regular one in gpiolib-of.c

    This results in all references to gpiod_* functions in of_gpio.h being
    gone, which is the way it should be since this file is part of the old
    integer GPIO interface.

    Changes since v1:
    - Fixed compilation error when CONFIG_OF_GPIO is not defined
    - Fixed warning due to of_gpio_flags enum not being declared
    in private gpiolib.h header

    Signed-off-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Alexandre Courbot
     

29 Apr, 2014

1 commit

  • As demonstrated by commit
    390d82e312c56b75407a3606cbcde8c4bc7f10ae
    "gpiolib: ACPI: remove gpio_to_desc() usage"

    gpio_to_desc() must die. Replace one of its usage by the
    newly-introduced gpiochip_get_desc() function.

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

    Linus Walleij
     

06 Feb, 2014

1 commit


12 Nov, 2013

1 commit

  • Pull GPIO changes from Linus Walleij:
    "Here is the bulk of GPIO changes for the v3.13 development cycle.

    I've got ACKs for the things that affect other subsystems (or it's my
    own subsystem, like pinctrl). Most of that pertain to an attempt from
    my side to consolidate and get rid of custom GPIO implementations in
    the ARM tree. I will continue doing this.

    The main change this time is the new GPIO descriptor API, background
    for this can be found in Corbet's summary from this january in LWN:

    http://lwn.net/Articles/533632/

    Summary:

    - Merged the GPIO descriptor API from Alexandre Courbot. This is a
    first step toward trying to get rid of the global GPIO numberspace
    for the future.

    - Add an API so that driver can flag that a certain GPIO line is
    being used by a irqchip backend for generating IRQs, so that we can
    enforce checks, like not allowing users to switch that line to an
    output at runtime, since this makes no sense. Implemented
    corresponding calls in a few select drivers.

    - ACPI GPIO cleanups, refactorings and switch to using the
    descriptor-based interface.

    - Support for the TPS80036 Palmas GPIO variant.

    - A new driver for the Broadcom Kona GPIO SoC IP block.

    - Device tree support for the PCF857x driver.

    - A set of ARM GPIO refactorings with the goal of getting rid of a
    bunch of custom GPIO implementations from the arch/arm/* tree:

    * Move the IOP GPIO driver to the GPIO subsystem and fix all users
    to use the gpiolib API for accessing GPIOs. Delete the old
    custom GPIO implementation.

    * Delete the unused custom PXA GPIO implemention.

    * Convert all users of the IXP4 custom GPIO implementation to use
    gpiolib and delete the custom implementation.

    * Delete the custom Gemini GPIO implementation, also completely
    unused.

    - Various cleanups and renamings"

    * tag 'gpio-v3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (85 commits)
    gpio: gpio-mxs: Remove unneeded dt checks
    gpio: pl061: don't depend on CONFIG_ARM
    gpio: bcm-kona: add missing .owner to struct gpio_chip
    gpiolib: provide a declaration of seq_file in gpio/driver.h
    gpiolib: include gpio/consumer.h in of_gpio.h for desc_to_gpio()
    gpio: provide stubs for devres gpio functions
    gpiolib: devres: add missing headers
    gpiolib: make GPIO_DEVRES depend on GPIOLIB
    gpiolib: devres: fix devm_gpiod_get_index()
    gpiolib / ACPI: document the GPIO descriptor based interface
    gpiolib / ACPI: allow passing GPIOF_ACTIVE_LOW for GpioInt resources
    gpiolib / ACPI: add ACPI support for gpiod_get_index()
    gpiolib / ACPI: convert to gpiod interfaces
    gpiolib: add gpiod_get() and gpiod_put() functions
    gpiolib: port of_ functions to use gpiod
    gpiolib: export descriptor-based GPIO interface
    Fixup "MAINTAINERS: GPIO-INTEL-MID: add maintainer"
    gpio: bcm281xx: Don't print addresses of GPIO area in probe()
    gpio: tegra: use new gpio_lock_as_irq() API
    gpio: rcar: Include linux/of.h header
    ...

    Linus Torvalds
     

20 Oct, 2013

1 commit


16 Oct, 2013

1 commit


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
     

30 Aug, 2013

1 commit