16 Aug, 2013

1 commit


21 Jul, 2013

1 commit

  • Register the GPIO pin range, and request and free GPIO pins using the
    pinctrl API. The pctl_name platform data member should be used by
    platform devices to point out which pinctrl device to use.

    Follows same style as "dc3465a gpio-rcar: Add pinctrl support",
    by Laurent Pinchart, thanks to him.

    Signed-off-by: Magnus Damm
    Signed-off-by: Linus Walleij

    Magnus Damm
     

27 Mar, 2013

1 commit


06 Mar, 2013

1 commit

  • Update the Emma Mobile GPIO driver to add DT support.

    The patch simply adds a two-cell xlate function and
    updates the probe code to allow configuration via DT
    using the "ngpios" property plus OF id in the same
    style as gpio-mvebu.c. The code is also adjusted to
    use postcore_initcall() to force early setup.

    Signed-off-by: Magnus Damm
    Signed-off-by: Grant Likely

    Magnus Damm
     

15 Feb, 2013

1 commit

  • Adjust the gpio-em.c driver to reconsider the pdata->irq_base
    variable. Non-DT board code like for instance board-kzm9d.c
    needs to operate of a static IRQ range for platform devices.

    So this patch is updating the code to make use of the function
    irq_domain_add_simple() instead of irq_domain_add_linear().

    Fixes a EMEV2 / KZM9D runtime error caused by the following commit:
    7385500 gpio/em: convert to linear IRQ domain

    Cc: stable@kernel.org
    Signed-off-by: Magnus Damm
    Tested-by: Simon Horman
    Reported-by: Simon Horman
    Signed-off-by: Linus Walleij

    Magnus Damm
     

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

  • Fix below build errors:

    CC [M] drivers/gpio/gpio-em.o
    drivers/gpio/gpio-em.c: In function 'em_gio_probe':
    drivers/gpio/gpio-em.c:306: error: 'err' undeclared (first use in this function)
    drivers/gpio/gpio-em.c:306: error: (Each undeclared identifier is reported only once
    drivers/gpio/gpio-em.c:306: error: for each function it appears in.)
    drivers/gpio/gpio-em.c:308: error: label 'err3' used but not defined
    drivers/gpio/gpio-em.c:279: error: label 'err2' used but not defined
    drivers/gpio/gpio-em.c:265: error: label 'err1' used but not defined
    drivers/gpio/gpio-em.c:250: error: label 'err0' used but not defined
    drivers/gpio/gpio-em.c:309: warning: no return statement in function returning non-void
    drivers/gpio/gpio-em.c: At top level:
    drivers/gpio/gpio-em.c:311: error: expected identifier or '(' before 'if'
    drivers/gpio/gpio-em.c:317: error: expected identifier or '(' before 'if'
    drivers/gpio/gpio-em.c:323: warning: data definition has no type or storage class
    drivers/gpio/gpio-em.c:323: warning: type defaults to 'int' in declaration of 'ret'
    drivers/gpio/gpio-em.c:323: error: 'gpio_chip' undeclared here (not in a function)
    drivers/gpio/gpio-em.c:323: error: initializer element is not constant
    drivers/gpio/gpio-em.c:324: error: expected identifier or '(' before 'if'
    drivers/gpio/gpio-em.c:328: error: expected identifier or '(' before 'return'
    drivers/gpio/gpio-em.c:330: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    drivers/gpio/gpio-em.c:332: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    drivers/gpio/gpio-em.c:334: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    drivers/gpio/gpio-em.c:336: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    drivers/gpio/gpio-em.c:338: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    drivers/gpio/gpio-em.c:340: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    drivers/gpio/gpio-em.c:342: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    drivers/gpio/gpio-em.c:344: error: expected identifier or '(' before '}' token
    drivers/gpio/gpio-em.c: In function 'em_gio_remove':
    drivers/gpio/gpio-em.c:361: error: implicit declaration of function 'em_gio_irq_domain_cleanup'
    make[2]: *** [drivers/gpio/gpio-em.o] Error 1
    make[1]: *** [drivers/gpio] Error 2
    make: *** [drivers] Error 2

    Signed-off-by: Axel Lin
    Signed-off-by: Linus Walleij

    Axel Lin
     

26 Oct, 2012

1 commit

  • The code in the em driver seems to want to try to do the job of
    the linear IRQ domain (allocate descriptors and grab a virtual
    range). So why not just use the linear IRQ domain? The code is
    now cut down so we don't need isolated functions for this.

    Also note that we use irq_create_mapping() to make sure
    descriptors are allocated for these IRQs.

    Also fixed the FIXME to remove the domain after use.

    Cc: Grant Likely
    Cc: Magnus Damm
    Signed-off-by: Linus Walleij

    Linus Walleij
     

03 Oct, 2012

1 commit

  • Pull GPIO changes from Linus Walleij:
    "So this is the LW GPIO patch stack for v3.7:
    - refactoring from Thierry Redding at Arnd Bergmann's request to use
    the seq_file iterator interface in gpiolib.
    - A new driver for Avionic Design's N-bit GPIO expander.
    - Two instances of mutexes replaced by spinlocks from Axel Lin to
    code that is supposed to be fastpath compliant.
    - IRQ demuxer and gpio_to_irq() support for pcf857x by Kuninori
    Morimoto.
    - Dynamic GPIO numbers, device tree support, daisy chaining and some
    other fixes for the 74x164 driver by Maxime Ripard.
    - IRQ domain and device tree support for the tc3589x driver by Lee
    Jones.
    - Some conversion to use managed resources devm_* code.
    - Some instances of clk_prepare() or clk_prepare_enable() added to
    support the new, stricter common clock framework.
    - Some for_each_set_bit() simplifications.
    - Then a lot of fixes as we fixed up all of the above tripping over
    our own shoelaces and that kind of thing."

    * tag 'gpio-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (34 commits)
    gpio: pcf857x: select IRQ_DOMAIN
    gpio: Document device_node's det_debounce
    gpio-lpc32xx: Add GPI_28
    gpio: adnp: dt: Reference generic interrupt binding
    gpio: Add Avionic Design N-bit GPIO expander support
    gpio: pxa: using for_each_set_bit to simplify the code
    gpio_msm: using for_each_set_bit to simplify the code
    gpio: Enable the tc3298x GPIO expander driver for Device Tree
    gpio: Provide the tc3589x GPIO expander driver with an IRQ domain
    ARM: shmobile: kzm9g: use gpio-keys instead of gpio-keys-polled
    gpio: pcf857x: fixup smatch WARNING
    gpio: 74x164: Add support for the daisy-chaining
    gpio: 74x164: dts: Add documentation for the dt binding
    dt: Fix incorrect reference in gpio-led documentation
    gpio: 74x164: Add device tree support
    gpio: 74x164: Use dynamic gpio number assignment if no pdata is present
    gpio: 74x164: Use devm_kzalloc
    gpio: 74x164: Use module_spi_driver boiler plate function
    gpio: sx150x: Use irq_data_get_irq_chip_data() at appropriate places
    gpio: em: Use irq_data_get_irq_chip_data() at appropriate places
    ...

    Linus Torvalds
     

06 Sep, 2012

1 commit


01 Sep, 2012

1 commit


10 Aug, 2012

1 commit

  • The newly added gpio-em driver marks its em_gio_irq_domain_cleanup
    function as __devexit, which would lead to that function being
    discarded in case CONFIG_HOTPLUG is disabled. However, the function
    is also called by the error handling logic em_gio_probe, which
    would cause a jump into a NULL pointer if it was removed from the
    kernel or module.

    Without this patch, building kzm9d_defconfig results in:

    WARNING: drivers/gpio/built-in.o(.devinit.text+0x330): Section mismatch in reference from the function em_gio_probe() to the function .devexit.text:em_gio_irq_domain_cleanup()
    The function __devinit em_gio_probe() references
    a function __devexit em_gio_irq_domain_cleanup().
    This is often seen when error handling in the init function
    uses functionality in the exit path.
    The fix is often to remove the __devexit annotation of
    em_gio_irq_domain_cleanup() so it may be used outside an exit section.

    Signed-off-by: Arnd Bergmann
    Cc: Magnus Damm
    Cc: Linus Walleij
    Cc: Rafael J. Wysocki

    Arnd Bergmann
     

18 May, 2012

1 commit

  • This patch is V2 of the Emma Mobile GPIO driver. This
    driver is designed to be reusable between multiple SoCs
    that share the same basic building block, but so far it
    has only been used on Emma Mobile EV2.

    Each driver instance handles 32 GPIOs with individually
    maskable IRQs. The driver operates on two I/O memory
    ranges and the 32 GPIOs are hooked up to two interrupts.

    In the case of Emma Mobile EV2 this GPIO building block
    is used as main external interrupt controller hooking up
    159 GPIOS as 159 interrupts via 5 driver instances and
    10 interrupts to the GIC and the Cortex-A9 Dual.

    Signed-off-by: Magnus Damm
    Acked-by: Linus Walleij
    Signed-off-by: Rafael J. Wysocki

    Magnus Damm