08 Apr, 2016

1 commit

  • In legacy pxa builds, ie. non device-tree and platform-data only builds,
    pinctrl is not yet available. As a consequence, the pinctrl gpio
    direction change function is a stub, returning always success.

    In the current state, the gpio driver direction function believes the
    pinctrl direction change was successful, and exits without actually
    changing the gpio direction.

    This patch changes the logic :
    - if the pinctrl direction function fails, gpio direction will report
    that failure
    - if the pinctrl direction function succeeds, gpio direction is changed
    by the gpio driver anyway.
    This is sub optimal in the pinctrl aware case, as the gpio direction
    will be changed twice: once by pinctrl function and another time by
    the gpio direction function.

    Yet it should be acceptable in this form, as this is functional for all
    pxa platforms (device-tree and platform-data), and moreover changing a
    gpio direction is very very seldom, usually in machine initialization,
    seldom in drivers probe, and an exception for ac97 reset bug.

    Fixes: a770d946371e ("gpio: pxa: add pin control gpio direction and request")
    Reported-by: Guenter Roeck
    Tested-by: Guenter Roeck
    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     

05 Jan, 2016

2 commits


22 Dec, 2015

1 commit

  • The commit "gpio: pxa: change the interrupt management" should have
    taken care of moving an ifdef to not englobe irqdomain related
    structures anymore, as they are used now for all builds.

    This repairs the broken builds where CONFIG_OF=n.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     

15 Dec, 2015

1 commit

  • If a pin control driver is available, use it to change the gpio
    direction. If not fallback to directly manipulating the gpio direction
    register.

    The reason to use the pin control driver first is that pin control in
    pxa2xx architecture implies changing the gpio direction, even for non
    gpio functions. In order to do it atomically, only one driver should
    control the gpio direction, and if a pin controller is available, it has
    to be him.

    There is a small catch : if CONFIG_PINCTRL is selected, then a pinctrl
    driver has to be probed. If not, gpio_request() will return
    -EPROBE_DEFER as pinctrl_request_gpio() returns it in that case.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     

10 Dec, 2015

3 commits

  • The interrupt management is changed by this patch to rely on chip data
    instead of chained interrupts.

    The main goal is to loosen the dependency on the global pxa chip
    structure in favor of the passed chip data. The secondary goal is to
    better show in /proc/interrupts the difference between interrupts for
    gpio0 and gpio1 (directly wired to interrupt controller), and the other
    gpios (wired onto a third line in the interrupt controller).

    The last advantage of this patch is that the interrupt is actually
    requested, so that another driver cannot steal this line, or overwrite
    the handler.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     
  • Use the device managed ioremap to simplify the probe function.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     
  • The pxa gpio IP is provided by one chip, which holds multiple banks.

    Another reason the driver should register only one gpiochip instead of
    multiple gpiochips (ie. 1 per each bank) is that for pincontrol and
    devicetree integration (think gpio-ranges), it's impossible to have the
    contiguous pin range 0..127 mapped to gpios 0..127.

    This patch, amongst other thinks, paves the path to loosen the bond with
    the global structure variable pxa_gpio_chip.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     

19 Nov, 2015

1 commit

  • This patch is a second attempt at what was previously in commit
    6c7e660a27da ("gpio: pxa: set initcall level to module init").

    The goal is the same : enable gpio & pinctrl driver to work
    together. As pinctrl driver will be initialized at device level, the
    gpio should be as well, so that the deferring mechanism is honored.

    Yet this patch should also respect the legacy platforms, so the set of
    constraints is :
    - in legacy platforms (ie. non dt), gpio_[gs]et_*() should be available
    for machine code => core initcall
    - in new platforms (ie. dt based), pinctrl will be available and no
    machine code => device initcall

    In order to fullfill all these constraints, the initcall level is either
    postcore for non devicetree platforms, and device for devicetree platforms.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Linus Walleij

    Robert Jarzmik
     

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
     

28 Jul, 2015

1 commit

  • set_irq_flags is ARM specific with custom flags which have genirq
    equivalents. Convert drivers to use the genirq interfaces directly, so we
    can kill off set_irq_flags. The translation of flags is as follows:

    IRQF_VALID -> !IRQ_NOREQUEST
    IRQF_PROBE -> !IRQ_NOPROBE
    IRQF_NOAUTOEN -> IRQ_NOAUTOEN

    For IRQs managed by an irqdomain, the irqdomain core code handles clearing
    and setting IRQ_NOREQUEST already, so there is no need to do this in
    .map() functions and we can simply remove the set_irq_flags calls. Some
    users also modify IRQ_NOPROBE and this has been maintained although it
    is not clear that is really needed as most platforms don't use probing.
    There appears to be a great deal of blind copy and paste of this code.

    Signed-off-by: Rob Herring
    Cc: Michael Hennerich
    Acked-by: Linus Walleij
    Cc: Alexandre Courbot
    Cc: Ray Jui
    Cc: Stephen Warren
    Cc: Thierry Reding
    Cc: linux-gpio@vger.kernel.org
    Cc: bcm-kernel-feedback-list@broadcom.com
    Cc: linux-tegra@vger.kernel.org
    Signed-off-by: Linus Walleij

    Rob Herring
     

09 Mar, 2015

1 commit


03 Feb, 2015

2 commits

  • Add support for PXA1928 GPIOs. The PXA1928 adds a 6th bank from previous
    generations.

    Signed-off-by: Jing Xiang
    Signed-off-by: Xiangzhan Meng
    [robh: ported to 3.19 from vendor kernel]
    Signed-off-by: Rob Herring
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Rob Herring
     
  • In preparation to enable ARCH_MMP on ARM64, the include of mach/irqs.h
    must be eliminated. mach/irqs.h was being included for IRQ_GPIO{0,1},
    but these IRQs are always passed in as resources now. We can use irq0
    and irq1 and get rid of IRQ_GPIOx. Get rid of the ifdef in the process
    as it is no longer needed.

    Signed-off-by: Rob Herring
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Rob Herring
     

07 Jul, 2014

1 commit

  • pxa_gpio_probe() has some issues supporting the gpio0 and gpio1
    interrupts under device-tree - it never actually sets up the chain
    handler to get interrupts on edge detect for GPIO0 and GPIO1.

    Signed-off-by: Andrew Ruder
    Acked-by: Haojian Zhuang
    Signed-off-by: Linus Walleij

    Andrew Ruder
     

19 Jun, 2014

1 commit


15 Jan, 2014

1 commit

  • It would be convenient to normalize the return value for gpio_get.

    I have checked mach-mmp / mach-pxa / plat-pxa / plat-orion / mach-orion5x.
    It's OK for all of them to change this function to return 0 and 1.

    Signed-off-by: Neil Zhang
    Signed-off-by: Linus Walleij

    Neil Zhang
     

22 Jul, 2013

1 commit

  • Commit f87311743 ("ARM: mmp: add more compatible names in gpio driver")
    changed the driver logic to determine the number of available GPIOs from
    the compatible string, and hence obsoleted the (undocumented) child
    nodes that were previously necessary. However, it left some remainder
    which can be safely removed now.

    Also, this patch makes pxa_gpio_probe_dt() return the correct value in
    case irq_alloc_descs() fails.

    Signed-off-by: Daniel Mack
    Cc: Haojian Zhuang
    Cc: Linus Walleij
    Cc: Arnd Bergmann
    Signed-off-by: Linus Walleij

    Daniel Mack
     

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
     

05 May, 2013

1 commit

  • Pull ARM SoC board specific changes (part 1) from Olof Johansson:
    "These changes are all for board specific files. These used to make up
    a large portion of the ARM changes in the past, but as we are
    generalizing the support and moving to device tree probing, this has
    gotten significantly smaller.

    The only platform actually adding new code here at the moment is
    Renesas shmobile, as they are still busy converting their code to
    device tree and have not come far enough to not need it."

    * tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
    ARM: msm: USB_MSM_OTG needs USB_PHY
    ARM: davinci: da850 evm: fix const qualifier placement
    ARM: davinci: da850 board: add remoteproc support
    ARM: pxa: move debug uart code
    ARM: pxa: select PXA935 on saar & tavorevb
    ARM: mmp: add more compatible names in gpio driver
    ARM: pxa: move PXA_GPIO_TO_IRQ macro
    ARM: pxa: remove cpu_is_xxx in gpio driver
    ARM: Kirkwood: update Network Space Mini v2 description
    ARM: Kirkwood: DT board setup for CloudBox
    ARM: Kirkwood: sort board entries by ASCII-code order
    ARM: OMAP: board-4430sdp: Provide regulator to pwm-backlight
    ARM: OMAP: zoom: Use pwm stack for lcd and keyboard backlight
    ARM: OMAP2+: omap2plus_defconfig: Add support for BMP085 pressure sensor
    omap2+: Remove useless Makefile line
    omap2+: Remove useless Makefile line
    ARM: OMAP: RX-51: add missing regulator supply definitions for lis3lv02d
    ARM: OMAP1: fix omap_udc registration
    ARM: davinci: use is IS_ENABLED macro
    ARM: kirkwood: add MACH_GURUPLUG_DT to defconfig
    ...

    Linus Torvalds
     

03 May, 2013

1 commit

  • Pull ARM SoC cleanup from Olof Johansson:
    "Here is a collection of cleanup patches. Among the pieces that stand
    out are:

    - The deletion of h720x platforms
    - Split of at91 non-dt platforms to their own Kconfig file to keep
    them separate
    - General cleanups and refactoring of i.MX and MXS platforms
    - Some restructuring of clock tables for OMAP
    - Convertion of PMC driver for Tegra to dt-only
    - Some renames of sunxi -> sun4i (Allwinner A10)
    - ... plus a bunch of other stuff that I haven't mentioned"

    * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (119 commits)
    ARM: i.MX: remove unused ARCH_* configs
    ARM i.MX53: remove platform ahci support
    ARM: sunxi: Rework the restart code
    irqchip: sunxi: Rename sunxi to sun4i
    irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro
    clocksource: sunxi: Rename sunxi to sun4i
    clocksource: sunxi: make use of CLKSRC_OF
    clocksource: sunxi: Cleanup the timer code
    ARM: at91: remove trailing semicolon from macros
    ARM: at91/setup: fix trivial typos
    ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
    ARM: EXYNOS: change the name of USB ohci header
    ARM: SAMSUNG: Remove unnecessary code for dma
    ARM: S3C24XX: Remove unused GPIO drive strength register definitions
    ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method
    ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412
    ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410
    ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards
    ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"
    ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
    ...

    Linus Torvalds
     

25 Apr, 2013

1 commit


11 Apr, 2013

3 commits


27 Mar, 2013

2 commits

  • Fix :
    gpio/gpio-pxa.c:605: ERROR: space required after that ',' (ctx:VxV)
    gpio/gpio-pxa.c:672: ERROR: space prohibited after that open parenthesis '('

    Signed-off-by: Laurent Navet
    Signed-off-by: Linus Walleij

    Laurent Navet
     
  • These functions have been introduced by commit 10a8c383 (irq: introduce
    entry and exit functions for chained handlers) in asm/mach/irq.h. This
    patch moves them to linux/irqchip/chained_irq.h so that generic irqchip
    drivers do not rely on architecture specific header files.

    Signed-off-by: Catalin Marinas
    Tested-by: Marc Zyngier
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Rob Herring

    Catalin Marinas
     

25 Jan, 2013

1 commit


13 Dec, 2012

1 commit

  • Pull ARM SoC cleanups on various subarchitectures from Olof Johansson:
    "Cleanup patches for various ARM platforms and some of their associated
    drivers. There's also a branch in here that enables Freescale i.MX to
    be part of the multiplatform support -- the first "big" SoC that is
    moved over (more multiplatform work comes in a separate branch later
    during the merge window)."

    Conflicts fixed as per Olof, including a silent semantic one in
    arch/arm/mach-omap2/board-generic.c (omap_prcm_restart() was renamed to
    omap3xxx_restart(), and a new user of the old name was added).

    * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (189 commits)
    ARM: omap: fix typo on timer cleanup
    ARM: EXYNOS: Remove unused regs-mem.h file
    ARM: EXYNOS: Remove unused non-dt support for dwmci controller
    ARM: Kirkwood: Use hw_pci.ops instead of hw_pci.scan
    ARM: OMAP3: cm-t3517: use GPTIMER for system clock
    ARM: OMAP2+: timer: remove CONFIG_OMAP_32K_TIMER
    ARM: SAMSUNG: use devm_ functions for ADC driver
    ARM: EXYNOS: no duplicate mask/unmask in eint0_15
    ARM: S3C24XX: SPI clock channel setup is fixed for S3C2443
    ARM: EXYNOS: Remove i2c0 resource information and setting of device names
    ARM: Kirkwood: checkpatch cleanups
    ARM: Kirkwood: Fix sparse warnings.
    ARM: Kirkwood: Remove unused includes
    ARM: kirkwood: cleanup lsxl board includes
    ARM: integrator: use BUG_ON where possible
    ARM: integrator: push down SC dependencies
    ARM: integrator: delete static UART1 mapping
    ARM: integrator: delete SC mapping on the CP
    ARM: integrator: remove static CP syscon mapping
    ARM: integrator: remove static AP syscon mapping
    ...

    Linus Torvalds
     

29 Nov, 2012

1 commit

  • 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
     

15 Nov, 2012

1 commit

  • PXA95x isn't widely used. And it adds the effort on supporting
    multiple platform. So remove it.

    The assumption is that nobody will miss this support. If you are
    reading this text because you actually require pxa95x support on
    a new kernel, we can work out a way to revert this patch or add
    support to the mmp platform.

    Signed-off-by: Haojian Zhuang
    Signed-off-by: Arnd Bergmann

    Haojian Zhuang
     

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
     

19 Sep, 2012

1 commit


06 Sep, 2012

1 commit


01 Sep, 2012

1 commit

  • Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and
    clk_enable, and clk_disable and clk_unprepare. They make the code more
    concise, and ensure that clk_unprepare is called when clk_enable fails.

    A simplified version of the semantic patch that introduces calls to these
    functions is as follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression e;
    @@

    - clk_prepare(e);
    - clk_enable(e);
    + clk_prepare_enable(e);

    @@
    expression e;
    @@

    - clk_disable(e);
    - clk_unprepare(e);
    + clk_disable_unprepare(e);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Linus Walleij

    Julia Lawall
     

16 Aug, 2012

2 commits


14 Aug, 2012

1 commit

  • Commit 7212157267 ("GPIO: gpio-pxa: fix devicetree functions") added an
    "xlate" function pointer to the irq_domain_ops, but this function is nor
    declared or defined anywhere when CONFIG_OF is disabled, causing the
    build error:

    drivers/gpio/gpio-pxa.c:532:11: error: 'irq_domain_xlate_twocell' undeclared here (not in a function)

    Extending the DT-only code section to cover the irq_domain_ops and the
    pxa_gpio_dt_ids solves this problem and makes it clearer which code is
    actually used without DT.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

05 Aug, 2012

1 commit


05 May, 2012

1 commit