13 Sep, 2016

1 commit

  • These structures are only used to copy into other structures, so declare
    them as const.

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

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct gpio_chip i@p = { ... };

    @ok@
    identifier r.i;
    expression e;
    position p;
    @@
    e = i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct gpio_chip e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct gpio_chip i = { ... };
    //

    Signed-off-by: Julia Lawall
    Acked-by: Joachim Eastwood
    Signed-off-by: Linus Walleij

    Julia Lawall
     

07 Jun, 2016

1 commit


14 Apr, 2016

1 commit

  • The WM8994 GPIOs clearly have a dedicated open drain control
    register. Implement support for controlling this from GPIO
    descriptor tables or other hardware descriptions such as
    device tree by implementing the .set_single_ended() callback.

    Before this patch, lines requesting open drain will just be
    switched to input mode by the framework, thus emulating open
    drain. But the hardware can do the real thing, so let's
    support that.

    As part of this, rename the debugfs string for output mode
    from "CMOS" to "push-pull" because it is the term used in
    the framework to signify a tomem-pole CMOS output.

    Cc: patches@opensource.wolfsonmicro.com
    Cc: Mark Brown
    Acked-by: Charles Keepax
    Signed-off-by: Linus Walleij

    Linus Walleij
     

23 Feb, 2016

1 commit


05 Jan, 2016

1 commit

  • This makes the driver use the data pointer added to the gpio_chip
    to store a pointer to the state container instead of relying on
    container_of().

    Cc: patches@opensource.wolfsonmicro.com
    Cc: Mark Brown
    Acked-by: Charles Keepax
    Signed-off-by: Linus Walleij

    Linus Walleij
     

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
     

22 Jul, 2014

1 commit


04 Dec, 2013

1 commit

  • This switches the two members of struct gpio_chip that were
    defined as unsigned foo:1 to bool, because that is indeed what
    they are. Switch all users in the gpio and pinctrl subsystems
    to assign these values with true/false instead of 0/1. The
    users outside these subsystems will survive since true/false
    is 1/0, atleast we set some kind of more strict typing example.

    Signed-off-by: Linus Walleij

    Linus Walleij
     

16 Aug, 2013

1 commit


29 Nov, 2012

3 commits

  • CONFIG_HOTPLUG is going away as an option so __devexit is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: Grant Likely
    Acked-by: Linus Walleij
    Cc: Peter Tyser
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Grant Likely
    Cc: Peter Tyser
    Cc: Santosh Shilimkar
    Cc: Kevin Hilman
    Acked-by: Linus Walleij
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Grant Likely
    Cc: Peter Tyser
    Acked-by: Linus Walleij
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

27 Jul, 2012

1 commit

  • Pull GPIO changes from Linus Walleij:
    - New driver for AMD-8111 southbridge GPIOs
    - New driver for Wolfson Micro Arizona devices
    - Propagate device tree parse errors
    - Probe deferral finalizations - all expected calls to GPIO will now
    hopefully request deferral where apropriate
    - Misc updates to TCA6424, WM8994, LPC32xx, PCF857x, Samsung MXC, OMAP
    and PCA953X drivers.

    Fix up gpio_idx conflicts in drivers/gpio/gpio-mxc.c

    * tag 'gpio-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpio: of_get_named_gpio_flags() return -EPROBE_DEFER if GPIO not yet available
    gpiolib: Defer failed gpio requests by default
    MAINTAINERS: add entry OMAP GPIO driver
    gpio/pca953x: increase variables size to support 24 bit of data
    GPIO: PCA953X: Increase size of invert variable to support 24 bit
    gpio/omap: move bank->dbck initialization to omap_gpio_mod_init()
    gpio/mxc: use the edge_sel feature if available
    gpio: propagate of_parse_phandle_with_args errors
    gpio: samsung: add flags specifier to device-tree binding
    gpiolib: Add support for Wolfson Microelectronics Arizona class devices
    gpio: gpio-lpc32xx: Add gpio_to_irq mapping
    gpio: pcf857x: share 8/16 bit access functions
    gpio: LPC32xx: Driver cleanup
    MAINTAINERS: Add Wolfson gpiolib drivers to the Wolfson entry
    gpiolib: wm8994: Convert to devm_kzalloc()
    gpiolib: wm8994: Use irq_domain mappings for gpios
    gpio: add a driver for GPIO pins found on AMD-8111 south bridge chips
    gpio/tca6424: merge I2C transactions, remove cast
    gpio/of: fix a typo of comment message

    Linus Torvalds
     

12 Jul, 2012

2 commits


05 Jul, 2012

1 commit


02 Jan, 2012

1 commit


07 Jun, 2011

1 commit

  • Sort the gpio makefile and enforce the naming convention gpio-*.c for
    gpio drivers.

    v2: cleaned up filenames in Kconfig and comment blocks
    v3: fixup use of BASIC_MMIO to GENERIC_GPIO for mxc

    Signed-off-by: Grant Likely

    Grant Likely