26 Jan, 2017

1 commit

  • The only usage of function intel_gpio_runtime_idle() is here (in the
    same file):

    static const struct dev_pm_ops intel_gpio_pm_ops = {
    SET_RUNTIME_PM_OPS(NULL, NULL, intel_gpio_runtime_idle)
    };

    And when CONFIG_PM is not set, the macro SET_RUNTIME_PM_OPS expands to
    nothing, causing the following compiler warning:

    drivers/gpio/gpio-intel-mid.c:324:12: warning: ‘intel_gpio_runtime_idle’
    defined but not used [-Wunused-function]
    static int intel_gpio_runtime_idle(struct device *dev)

    Fix it by annotating the function with __maybe_unused.

    Signed-off-by: Augusto Mecking Caringi
    Acked-by: Andy Shevchenko
    Signed-off-by: Linus Walleij

    Augusto Mecking Caringi
     

15 Nov, 2016

1 commit


22 Jul, 2016

2 commits

  • Sort the header inclusion lines by alphabetical order.

    While here, update Intel Copyright.

    Signed-off-by: Andy Shevchenko
    Reviewed-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Andy Shevchenko
     
  • The commit d56d6b3d7d69 ("gpio: langwell: add Intel Merrifield support")
    doesn't look at all as a proper support for Intel Merrifield and I dare to say
    that it distorts the behaviour of the hardware.

    The register map is different on Intel Merrifield, i.e. only 6 out of 8
    register have the same purpose but none of them has same location in the
    address space. The current case potentially harmful to existing hardware since
    it's poking registers on wrong offsets and may set some pin to be GPIO output
    when connected hardware doesn't expect such.

    Besides the above GPIO and pinctrl on Intel Merrifield have been located in
    different IP blocks. The functionality has been extended as well, i.e. added
    support of level interrupts, special registers for wake capable sources and
    thus, in my opinion, requires a completele separate driver.

    If someone wondering the existing gpio-intel-mid.c would be converted to actual
    pinctrl (which by the fact it is now), though I wouldn't be a volunteer to do
    that.

    Fixes: d56d6b3d7d69 ("gpio: langwell: add Intel Merrifield support")
    Cc: stable@vger.kernel.org # v3.13+
    Signed-off-by: Andy Shevchenko
    Reviewed-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Andy Shevchenko
     

23 Jun, 2016

1 commit

  • The error handling is not correct since the commit 3f7dbfd8eea9 ("gpio:
    intel-mid: switch to using gpiolib irqchip helpers"). Switch to devres API to
    fix the potential resource leak.

    Fixes: commit 3f7dbfd8eea9 ("gpio: intel-mid: switch to using gpiolib irqchip helpers")
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Linus Walleij

    Andy Shevchenko
     

05 Jan, 2016

1 commit


27 Dec, 2015

1 commit

  • As we want gpio_chip .get() calls to be able to return negative
    error codes and propagate to drivers, we need to go over all
    drivers and make sure their return values are clamped to [0,1].
    We do this by using the ret = !!(val) design pattern.

    Acked-by: David Cohen
    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
     

16 Sep, 2015

1 commit

  • Most interrupt flow handlers do not use the irq argument. Those few
    which use it can retrieve the irq number from the irq descriptor.

    Remove the argument.

    Search and replace was done with coccinelle and some extra helper
    scripts around it. Thanks to Julia for her help!

    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Jiang Liu

    Thomas Gleixner
     

19 Jun, 2014

1 commit


18 Mar, 2014

1 commit

  • This switches all GPIO and pin control drivers with irqchips
    that were using .startup() and .shutdown() callbacks to lock
    GPIO lines for IRQ usage over to using the .request_resources()
    and .release_resources() callbacks just introduced into the
    irqchip vtable.

    Cc: Thomas Gleixner
    Cc: Jean-Jacques Hiblot
    Signed-off-by: Linus Walleij

    Linus Walleij
     

14 Mar, 2014

1 commit


05 Feb, 2014

1 commit


03 Feb, 2014

1 commit


04 Dec, 2013

3 commits

  • Conflicts:
    drivers/gpio/gpio-em.c

    Linus Walleij
     
  • This uses the new API for tagging GPIO lines as in use by
    IRQs. This enforces a few semantic checks on how the underlying
    GPIO line is used.

    ChangeLog v1->v2:
    - Explicitly call the - empty - mask/unmask functions from the
    startup/shutdown hooks. These are currently empty, but maybe
    they will not be that forever, so better be safe than sorry.

    Acked-by: David Cohen
    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • 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
     

03 Dec, 2013

2 commits

  • Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
    is not preferred.

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

    Jingoo Han
     
  • Switch all users of irq_set_chip_and_handler_name() to simply
    use irq_set_chip_and_handler(), all just provide a boilerplate
    name like "demux" or "mux" - a fact which is anyway obvious
    from the hwirq number from the irqdomain now present in e.g.
    /proc/interrupts.

    Cc: Mathias Nyman
    Cc: Dan Carpenter
    Acked-by: David Cohen
    Acked-by: Mika Westerberg
    Tested-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Linus Walleij
     

16 Oct, 2013

1 commit


11 Oct, 2013

2 commits