07 Jun, 2016

2 commits


11 May, 2016

1 commit

  • The Kconfig currently controlling compilation of this code is:

    drivers/gpio/Kconfig:config GPIO_STMPE
    drivers/gpio/Kconfig: bool "STMPE GPIOs"

    ...meaning that it currently is not being built as a module by anyone.

    Lets remove the modular code that is essentially orphaned, so that
    when reading the driver there is no doubt it is builtin-only.

    We explicitly disallow a driver unbind, since that doesn't have a
    sensible use case anyway, and it allows us to drop the ".remove"
    code for non-modular drivers.

    Curiously, this driver was using subsys_initcall since day one, so
    we don't have the "normal" module_init replacement in this change
    like we've done in other similar driver updates.

    We also delete the MODULE_LICENSE tag etc. since all that information
    is already contained at the top of the file in the comments.

    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: Rabin Vincent
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     

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
     

20 Jan, 2015

1 commit


02 Oct, 2014

2 commits

  • To troubleshoot the STMPE GPIO driver, some more detailed
    debug information giving the exact info on how each pin is
    used will be helpful.

    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • The STMPE driver assumes that the passed in IRQ type is
    for rising or falling IRQs, not both, even though the
    hardware actually supports this perfectly well. Likewise
    the check for level IRQs is done against just high or low
    level types, not for the case where it is combined with
    other IRQs.

    Signed-off-by: Linus Walleij

    Linus Walleij
     

26 Sep, 2014

1 commit

  • To unify how we connect cascaded IRQ chips to parent IRQs, if
    NULL us passed as handler to the gpiochip_set_chained_irqchip()
    function, assume the chips is nested rather than chained, and
    we still get the parent set up correctly by way of this function
    call.

    Alter the drivers for tc3589x and stmpe to use this to set up
    their chained handlers as a demonstration of the usage.

    Signed-off-by: Linus Walleij

    Linus Walleij
     

22 Jul, 2014

1 commit


19 Jun, 2014

1 commit


23 May, 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 Oct, 2013

1 commit

  • Rename the argument "virq" to just "irq", this IRQ isn't any
    more "virtual" than any other Linux IRQ number, we use "hwirq"
    for the actual hw-numbers, "virq" is just bogus.

    When doing this I see that the hwirq argument is used
    for mapping rather than the Linux IRQ in the map function.
    This doesn't look right. Use the Linux IRQ instead.

    I cannot test this patch so I don't know if the mapping change
    is correct, however since absolutely every other driver does
    it the other way around this doesn't look sound at all. Please
    help out with review.

    Cc: Vipul Kumar Samar
    Cc: Lee Jones
    Cc: Gabriel Fernandez
    Cc: Jean-Nicolas Graux
    Signed-off-by: Linus Walleij

    Linus Walleij
     

31 May, 2013

2 commits


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

10 Dec, 2012

1 commit

  • The STMPE GPIO driver can be used as an IRQ controller by some
    related devices. Here we provide it with its very own IRQ Domain
    so that IRQs can be issued dynamically. This will stand the
    driver in good stead when it is enabled for Device Tree, as this
    it a prerequisite.

    Cc: Grant Likely
    Reviewed-by: Viresh Kumar
    Signed-off-by: Lee Jones
    Signed-off-by: Linus Walleij

    Lee Jones
     

02 Dec, 2012

1 commit

  • This patch allows the STMPE GPIO driver to be successfully probed and
    initialised when Device Tree support is enabled. Bindings are mentioned in
    Documentation too.

    Acked-by: Lee Jones
    Signed-off-by: Vipul Kumar Samar
    Signed-off-by: Viresh Kumar
    Signed-off-by: Linus Walleij

    Vipul Kumar Samar
     

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
     

29 Mar, 2012

1 commit

  • Pull GPIO changes for v3.4 from Grant Likely:
    "Primarily gpio device driver changes with some minor side effects
    under arch/arm and arch/x86. Also includes a few core changes such as
    explicitly supporting (electrical) open source and open drain outputs
    and some help for parsing gpio devicetree properties."

    Fix up context conflict due to Laxman Dewangan adding sleep control for
    the tps65910 driver separately for gpio's and regulators.

    * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
    gpio/ep93xx: Remove unused inline function and useless pr_err message
    gpio/sodaville: Mark broken due to core irqdomain migration
    gpio/omap: fix redundant decoding of gpio offset
    gpio/omap: fix incorrect update to context.irqenable1
    gpio/omap: fix incorrect context restore logic in omap_gpio_runtime_*
    gpio/omap: fix missing dataout context save in _set_gpio_dataout_reg
    gpio/omap: fix _set_gpio_irqenable implementation
    gpio/omap: fix trigger type to unsigned
    gpio/omap: fix wakeup_en register update in _set_gpio_wakeup()
    gpio: tegra: tegra_gpio_config shouldn't be __init
    gpio/davinci: fix enabling unbanked GPIO IRQs
    gpio/davinci: fix oops on unbanked gpio irq request
    gpio/omap: Fix section warning for omap_mpuio_alloc_gc()
    ARM: tegra: export tegra_gpio_{en,dis}able
    gpio/gpio-stmpe: Fix the value returned by _get_value routine
    Documentation/gpio.txt: Explain expected pinctrl interaction
    GPIO: LPC32xx: Add output reading to GPO P3
    GPIO: LPC32xx: Fix missing bit selection mask
    gpio/omap: fix wakeups on level-triggered GPIOs
    gpio/omap: Fix IRQ handling for SPARSE_IRQ
    ...

    Linus Torvalds
     

13 Mar, 2012

1 commit

  • The present _get_value routine returns the contents of the GPIO Monitor Pin
    Status Register(GPMR) starting from the bit whose value is requested to BIT 0
    (irrelevant bits are replace by 0).

    For e.g. if we request the value of GPIO 6 in the earlier implementation the
    value returned is:

    BIT6 followed by 6 0's

    whereas it should just return BIT6.

    This patch addresses the same.

    Signed-off-by: Bhupesh Sharma
    Reviewed-by: Viresh Kumar
    Signed-off-by: Grant Likely

    Bhupesh Sharma
     

07 Mar, 2012

1 commit

  • Adds support for boards which have an STMPE GPIO device without the
    interrupt pin connected. This means that no interrupt can be received
    but the GPIO pins can still be driven and read.

    Cc: Grant Likely
    Acked-by: Viresh Kumar
    Tested-by: Michel Jaouen
    Signed-off-by: Chris Blair
    Acked-by: Viresh Kumar
    Signed-off-by: Samuel Ortiz

    Chris Blair
     

09 Jan, 2012

1 commit

  • STMPE801 is a GPIO expander. GPIO registers for 801 are slightly different from other
    variants. This patch adds support for STMPE801 in stmpe gpio driver.

    Signed-off-by: Bhupesh Sharma
    Signed-off-by: Pratyush Anand
    Signed-off-by: Viresh Kumar
    Signed-off-by: Samuel Ortiz

    Viresh Kumar
     

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