23 Jul, 2019

1 commit


02 Feb, 2019

1 commit


07 Dec, 2018

5 commits


03 Dec, 2018

1 commit

  • Convert the legacy system PM callbacks to new ones. Meanwhile, remove the
    redundant calls to the PCI for changing a power state since it's done by bus
    code.

    While here, remove weird indentation with backslash in use.

    Signed-off-by: Andy Shevchenko

    Andy Shevchenko
     

02 Dec, 2018

1 commit


24 May, 2018

1 commit


21 Aug, 2017

1 commit


29 May, 2017

1 commit


15 Mar, 2017

1 commit


05 Jan, 2016

2 commits


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.

    Cc: Thierry Reding
    Cc: Daniel Krueger
    Cc: Jean Delvare
    Signed-off-by: Linus Walleij

    Linus Walleij
     

15 Dec, 2015

1 commit

  • commit 1cfadea8f395e3fb6a15ea548e3e86c8b6d64f98
    "gpio: pch: allow use from device tree"
    makes the driver not compile unless CONFIG_OF_GPIO is set.
    Fix it.

    Cc: Paul Burton
    Signed-off-by: Linus Walleij

    Linus Walleij
     

11 Dec, 2015

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
     

14 Jul, 2015

1 commit

  • Use irq_set_handler_locked() as it avoids a redundant lookup of the
    irq descriptor.

    Search and replacement was done with coccinelle:

    Signed-off-by: Thomas Gleixner
    Cc: Jiang Liu
    Cc: Julia Lawall
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org

    Thomas Gleixner
     

02 Oct, 2014

1 commit

  • The pch_gpio_save_reg_conf() and pch_gpio_restore_reg_conf() functions
    are only used in pch_gpio_suspend() and pch_gpio_resume(), respectively.
    Since the latter are only built if PM is enabled, make the former build
    under the same conditions.

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

    Thierry Reding
     

22 Jul, 2014

1 commit


27 May, 2014

1 commit

  • After change 3ff35cbcfa4bc7d7dbdd0279e32ea677567ded02
    "gpio-pch: Fix Kconfig dependencies"
    which enabled COMPILE_TEST as an alternative for the PCH
    driver, we get build failures like this:

    drivers/gpio/gpio-pch.c: In function 'pch_gpio_probe':
    drivers/gpio/gpio-pch.c:359:2: error: implicit declaration
    of function 'kzalloc' [-Werror=implicit-function-declaration]
    drivers/gpio/gpio-pch.c:359:7: warning: assignment makes
    pointer from integer without a cast [enabled by default]
    drivers/gpio/gpio-pch.c:442:2: error: implicit declaration
    of function 'kfree' [-Werror=implicit-function-declaration]

    Fix this by including explicitly.

    Cc: Jean Delvare
    Signed-off-by: Linus Walleij

    Linus Walleij
     

27 Mar, 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
     

03 Dec, 2013

1 commit


21 May, 2013

1 commit


12 Dec, 2012

1 commit

  • Pull driver core updates from Greg Kroah-Hartman:
    "Here's the large driver core updates for 3.8-rc1.

    The biggest thing here is the various __dev* marking removals. This
    is going to be a pain for the merge with different subsystem trees, I
    know, but all of the patches included here have been ACKed by their
    various subsystem maintainers, as they wanted them to go through here.

    If this is too much of a pain, I can pull all of them out of this tree
    and just send you one with the other fixes/updates and then, after
    3.8-rc1 is out, do the rest of the removals to ensure we catch them
    all, it's up to you. The merges should all be trivial, and Stephen
    has been doing them all in linux-next for a few weeks now quite
    easily.

    Other than the __dev* marking removals, there's nothing major here,
    some firmware loading updates and other minor things in the driver
    core.

    All of these have (much to Stephen's annoyance), been in linux-next
    for a while.

    Signed-off-by: Greg Kroah-Hartman "

    Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio
    update.

    * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits)
    modpost.c: Stop checking __dev* section mismatches
    init.h: Remove __dev* sections from the kernel
    acpi: remove use of __devinit
    PCI: Remove __dev* markings
    PCI: Always build setup-bus when PCI is enabled
    PCI: Move pci_uevent into pci-driver.c
    PCI: Remove CONFIG_HOTPLUG ifdefs
    unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs
    sh/PCI: Remove CONFIG_HOTPLUG ifdefs
    powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs
    mips/PCI: Remove CONFIG_HOTPLUG ifdefs
    microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs
    dma: remove use of __devinit
    dma: remove use of __devexit_p
    firewire: remove use of __devinitdata
    firewire: remove use of __devinit
    leds: remove use of __devexit
    leds: remove use of __devinit
    leds: remove use of __devexit_p
    mmc: remove use of __devexit
    ...

    Linus Torvalds
     

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
     

05 Nov, 2012

1 commit


17 Aug, 2012

1 commit


25 May, 2012

1 commit

  • Pull GPIO driver changes from Grant Likely:
    "Lots of gpio changes, both to core code and drivers.

    Changes do touch architecture code to remove the need for separate
    arm/gpio.h includes in most architectures.

    Some new drivers are added, and a number of gpio drivers are converted
    to use irq_domains for gpio inputs used as interrupts. Device tree
    support has been amended to allow multiple gpio_chips to use the same
    device tree node.

    Remaining changes are primarily bug fixes."

    * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: (33 commits)
    gpio/generic: initialize basic_mmio_gpio shadow variables properly
    gpiolib: Remove 'const' from data argument of gpiochip_find()
    gpio/rc5t583: add gpio driver for RICOH PMIC RC5T583
    gpiolib: quiet gpiochip_add boot message noise
    gpio: mpc8xxx: Prevent NULL pointer deref in demux handler
    gpio/lpc32xx: Add device tree support
    gpio: Adjust of_xlate API to support multiple GPIO chips
    gpiolib: Implement devm_gpio_request_one()
    gpio-mcp23s08: dbg_show: fix pullup configuration display
    Add support for TCA6424A
    gpio/omap: (re)fix wakeups on level-triggered GPIOs
    gpio/omap: fix broken context restore for non-OFF mode transitions
    gpio/omap: fix missing check in *_runtime_suspend()
    gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume()
    gpio/omap: remove suspend/resume callbacks
    gpio/omap: remove retrigger variable in gpio_irq_handler
    gpio/omap: remove saved_wakeup field from struct gpio_bank
    gpio/omap: remove suspend_wakeup field from struct gpio_bank
    gpio/omap: remove saved_fallingdetect, saved_risingdetect
    gpio/omap: remove virtual_irq_start variable
    ...

    Conflicts:
    drivers/gpio/gpio-samsung.c

    Linus Torvalds
     

12 May, 2012

1 commit

  • Jean-Francois Dagenais reported:

    Configuring a gpio pin with the gpio-pch driver with
    "IRQF_TRIGGER_LOW | IRQF_ONESHOT" generates an interrupt storm for
    threaded ISR until the ISR thread actually gets to physically clear
    the interrupt on the triggering chip!! The immediate observable
    symptom is the high CPU usage for my ISR thread task and the
    interrupt count in /proc/interrupts incrementing radically.

    The driver is wrong in several ways:

    1) Using handle_simple_irq() does not provide proper flow control
    handling. In the case of oneshot threaded handlers for the
    demultiplexed interrupts this results in an interrupt storm because
    the simple handler does not deal with masking/unmasking. Even
    without threaded oneshot handlers an interrupt storm for level type
    interrupts can easily be triggered when the interrupt is disabled
    and the interrupt line is activated from the device.

    2) Acknowlegding the demultiplexed interrupt before calling the
    handler is wrong for level type interrupts.

    3) The set_type function unconditionally enables the interrupt. It's
    supposed to set the type and nothing else. The unmasking is done by
    the core code.

    Move the acknowledge code into a separate function and add it to the
    demux irqchip callbacks.

    Remove the unconditional enabling from the set_type() callback and set
    the proper flow handlers depending on the selected type (level/edge).

    Reported-and-tested-by: Jean-Francois Dagenais
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Grant Likely

    Thomas Gleixner
     

08 Apr, 2012

1 commit


02 Feb, 2012

1 commit

  • This bug was introduced by commit d568a681
    "gpio-pch: add spinlock in suspend/resume processing"
    which adds a spinlock to struct pch_gpio but never init the spinlock.

    Reported-by: Tomoya MORINAGA
    Signed-off-by: Axel Lin
    Acked-by: Linus Walleij
    Signed-off-by: Grant Likely

    Axel Lin
     

17 Jan, 2012

2 commits

  • The __iomem annotation is to be used together with pointers used
    as iowrite32() parameter. For more details see [1] and [2].

    This patch will remove the following sparse warnings ("make C=1"):
    * warning: incorrect type in assignment (different address spaces)
    * warning: incorrect type in argument 1 (different address spaces)
    * warning: incorrect type in argument 2 (different address spaces)

    References:
    [1] A new I/O memory access mechanism (Sep 15, 2004)
    http://lwn.net/Articles/102232/

    [2] Being more anal about iospace accesses (Sep 15, 2004)
    http://lwn.net/Articles/102240/

    Signed-off-by: Márton Németh
    Signed-off-by: Grant Likely

    Márton Németh
     
  • This patch will remove the following sparse warning ("make C=1"):
    * warning: Using plain integer as NULL pointer

    Signed-off-by: Márton Németh
    Signed-off-by: Grant Likely

    Márton Németh
     

13 Dec, 2011

1 commit