16 Feb, 2016

1 commit

  • By the time request_region is called in the Intel ICH series GPIO
    driver, a corresponding device structure has already been allocated. The
    devm_request_region function should be used to help simplify the cleanup
    code and reduce the possible points of failure.

    Cc: Peter Tyser
    Signed-off-by: William Breathitt Gray
    Reviewed-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    William Breathitt Gray
     

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
     

08 Apr, 2015

1 commit


20 Oct, 2014

1 commit


22 Jul, 2014

1 commit


09 May, 2014

1 commit


19 Mar, 2014

4 commits


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


20 Jun, 2013

1 commit


07 May, 2013

1 commit

  • Pull GPIO changes from Grant Likely:
    "The usual selection of bug fixes and driver updates for GPIO. Nothing
    really stands out except the addition of the GRGPIO driver and some
    enhacements to ACPI support"

    I'm pulling this despite the earlier mess. Let's hope it compiles these
    days.

    * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux: (46 commits)
    gpio: grgpio: Add irq support
    gpio: grgpio: Add device driver for GRGPIO cores
    gpiolib-acpi: introduce acpi_get_gpio_by_index() helper
    GPIO: gpio-generic: remove kfree() from bgpio_remove call
    gpio / ACPI: Handle ACPI events in accordance with the spec
    gpio: lpc32xx: Fix off-by-one valid range checking for bank
    gpio: mcp23s08: convert driver to DT
    gpio/omap: force restore if context loss is not detectable
    gpio/omap: optimise interrupt service routine
    gpio/omap: remove extra context restores in *_runtime_resume()
    gpio/omap: free irq domain in probe() failure paths
    gpio: gpio-generic: Add 16 and 32 bit big endian byte order support
    gpio: samsung: Add terminating entry for exynos_pinctrl_ids
    gpio: mvebu: add dbg_show function
    MAX7301 GPIO: Do not force SPI speed when using OF Platform
    gpio: gpio-tps65910.c: fix checkpatch error
    gpio: gpio-timberdale.c: fix checkpatch error
    gpio: gpio-tc3589x.c: fix checkpatch errors
    gpio: gpio-stp-xway.c: fix checkpatch error
    gpio: gpio-sch.c: fix checkpatch error
    ...

    Linus Torvalds
     

27 Mar, 2013

3 commits


02 Mar, 2013

1 commit

  • ichx_gpio_check_available() returns either 0 or -ENXIO depending on whether
    the given GPIO is available or not. However, callers of this function treat
    the return value as boolean:

    ...
    if (!ichx_gpio_check_available(gpio, nr))
    return -ENXIO;

    which erroneusly fails when the GPIO is available and not vice versa.

    Fix this by making the function return boolean as expected by the callers.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Grant Likely

    Mika Westerberg
     

20 Dec, 2012

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
     

14 Sep, 2012

1 commit

  • The ICH chips have their GPIO pins organized in 2 or 3 independent
    groups of 32 GPIO pins. It can happen that the ACPI BIOS wants to make
    use of pins in one group, preventing the OS to access these. This does
    not prevent the OS from accessing the other group(s).

    This is the case for example on my Asus Z8NA-D6 board. The ACPI BIOS
    wants to control GPIO 18 (group 1), while I (the OS) need to control
    GPIO 52 and 53 (group 2) for SMBus multiplexing.

    So instead of checking for ACPI resource conflict on the whole I/O
    range, check on a per-group basis, and consider it a success if at
    least one of the groups is available for the OS to use.

    Signed-off-by: Jean Delvare
    Cc: Peter Tyser
    Cc: Aaron Sierra
    Cc: Grant Likely
    Acked-by: Linus Walleij
    Signed-off-by: Samuel Ortiz

    Jean Delvare
     

01 May, 2012

1 commit

  • This driver works on many Intel chipsets, including the ICH6, ICH7,
    ICH8, ICH9, ICH10, 3100, Series 5/3400 (Ibex Peak), Series 6/C200
    (Cougar Point), and NM10 (Tiger Point).

    Additional Intel chipsets should be easily supported if needed, eg the
    ICH1-5, EP80579, etc.

    Tested on QM67 (Cougar Point), QM57 (Ibex Peak), 3100 (Whitmore Lake),
    and NM10 (Tiger Point).

    Includes work from Jean Delvare:
    - Resource leak removal during module load/unload
    - GPIO API bit value enforcement

    Also includes code cleanup from Guenter Roeck and Grant Likely.

    Signed-off-by: Peter Tyser
    Signed-off-by: Aaron Sierra
    Acked-by: Grant Likely
    Signed-off-by: Samuel Ortiz

    Peter Tyser