14 Jul, 2015

1 commit


24 Jun, 2015

1 commit

  • Pull gpio updates from Linus Walleij:
    "This is the big bulk of GPIO changes queued for the v4.2 kernel
    series:

    - a big set of cleanups to the aged sysfs interface from Johan
    Hovold. To get these in, v4.1-rc3 was merged into the tree as the
    first patch in that series had to go into stable. This makes the
    locking much more fine-grained (get rid of the "big GPIO lock(s)"
    and store states in the GPIO descriptors.

    - rename gpiod_[g|s]et_array() to gpiod_[g|s]et_array_value() to
    avoid confusions.

    - New drivers for:
    * NXP LPC18xx (currently LPC1850)
    * NetLogic XLP
    * Broadcom STB SoC's
    * Axis ETRAXFS
    * Zynq Ultrascale+ (subdriver)

    - ACPI:
    * make it possible to retrieve GpioInt resources from a GPIO
    device using acpi_dev_gpio_irq_get()
    * merge some dependent I2C changes exploiting this.
    * support the ARM X-Gene GPIO standby driver.

    - make it possible for the generic GPIO driver to read back the value
    set registers to reflect current status.

    - loads of OMAP IRQ handling fixes.

    - incremental improvements to Kona, max732x, OMAP, MXC, RCAR,
    PCA953x, STP-XWAY, PCF857x, Crystalcove, TB10x.

    - janitorial (constification, checkpatch cleanups)"

    * tag 'gpio-v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (71 commits)
    gpio: Fix checkpatch.pl issues
    gpio: pcf857x: handle only enabled irqs
    gpio / ACPI: Return -EPROBE_DEFER if the gpiochip was not found
    GPIO / ACPI: export acpi_gpiochip_request(free)_interrupts for module use
    gpio: improve error reporting on own descriptors
    gpio: promote own request failure to pr_err()
    gpio: Added support to Zynq Ultrascale+ MPSoC
    gpio: add ETRAXFS GPIO driver
    fix documentation after renaming gpiod_set_array to gpiod_set_array_value
    gpio: Add GPIO support for Broadcom STB SoCs
    gpio: xgene: add ACPI support for APM X-Gene GPIO standby driver
    gpio: tb10x: Drop unneeded free_irq() call
    gpio: crystalcove: set IRQCHIP_SKIP_SET_WAKE for the irqchip
    gpio: stp-xway: Use the of_property_read_u32 helper
    gpio: pcf857x: Check for irq_set_irq_wake() failures
    gpio-stp-xway: Fix enabling the highest bit of the PHY LEDs
    gpio: Prevent an integer overflow in the pca953x driver
    gpio: omap: rework omap_gpio_irq_startup to handle current pin state properly
    gpio: omap: rework omap_gpio_request to touch only gpio specific registers
    gpio: omap: rework omap_x_irq_shutdown to touch only irqs specific registers
    ...

    Linus Torvalds
     

18 Jun, 2015

1 commit

  • Fix a race where a pending interrupt could be received and the handler
    called before the handler's data has been setup, by converting to
    irq_set_chained_handler_and_data().

    Signed-off-by: Russell King
    Cc: Alexandre Courbot
    Cc: Hans Ulli Kroll
    Cc: Jason Cooper
    Cc: Lee Jones
    Cc: Linus Walleij
    Cc: Thierry Reding
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/E1Z4z0H-0002Sf-P9@rmk-PC.arm.linux.org.uk
    Signed-off-by: Thomas Gleixner

    Russell King
     

12 May, 2015

1 commit


15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

28 Nov, 2014

1 commit

  • gpiolib's gpiod_get_direction() function returns the EINVAL error
    if .get_direction callback is not defined.
    The patch implements the callback for mxs chip which is useful
    for debugging.

    Inspired by arch/arm/mach-at91/gpio.c

    On the moment the patch is required to get the patch
    "serial: mxs-auart: enable PPS support" working.
    It is planned to introduce new mctrl_gpio helpers to avoid
    gpiod_get_direction() function.

    Signed-off-by: Janusz Uzycki
    Acked-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Janusz Uzycki
     

20 Oct, 2014

1 commit


27 Mar, 2014

1 commit

  • The scenario here is that someone calls enable_irq_wake() from somewhere
    in the code. This will result in the lockdep producing a backtrace as can
    be seen below. In my case, this problem is triggered when using the wl1271
    (TI WlCore) driver found in drivers/net/wireless/ti/ .

    The problem cause is rather obvious from the backtrace, but let's outline
    the dependency. enable_irq_wake() grabs the IRQ buslock in irq_set_irq_wake(),
    which in turns calls mxs_gpio_set_wake_irq() . But mxs_gpio_set_wake_irq()
    calls enable_irq_wake() again on the one-level-higher IRQ , thus it tries to
    grab the IRQ buslock again in irq_set_irq_wake() . Because the spinlock in
    irq_set_irq_wake()->irq_get_desc_buslock()->__irq_get_desc_lock() is not
    marked as recursive, lockdep will spew the stuff below.

    We know we can safely re-enter the lock, so use IRQ_GC_INIT_NESTED_LOCK to
    fix the spew.

    =============================================
    [ INFO: possible recursive locking detected ]
    3.10.33-00012-gf06b763-dirty #61 Not tainted
    ---------------------------------------------
    kworker/0:1/18 is trying to acquire lock:
    (&irq_desc_lock_class){-.-...}, at: [] __irq_get_desc_lock+0x48/0x88

    but task is already holding lock:
    (&irq_desc_lock_class){-.-...}, at: [] __irq_get_desc_lock+0x48/0x88

    other info that might help us debug this:
    Possible unsafe locking scenario:

    CPU0
    ----
    lock(&irq_desc_lock_class);
    lock(&irq_desc_lock_class);

    *** DEADLOCK ***

    May be due to missing lock nesting notation

    3 locks held by kworker/0:1/18:
    #0: (events){.+.+.+}, at: [] process_one_work+0x134/0x4a4
    #1: ((&fw_work->work)){+.+.+.}, at: [] process_one_work+0x134/0x4a4
    #2: (&irq_desc_lock_class){-.-...}, at: [] __irq_get_desc_lock+0x48/0x88

    stack backtrace:
    CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 3.10.33-00012-gf06b763-dirty #61
    Workqueue: events request_firmware_work_func
    [] (unwind_backtrace+0x0/0xf0) from [] (show_stack+0x10/0x14)
    [] (show_stack+0x10/0x14) from [] (__lock_acquire+0x140c/0x1a64)
    [] (__lock_acquire+0x140c/0x1a64) from [] (lock_acquire+0x9c/0x104)
    [] (lock_acquire+0x9c/0x104) from [] (_raw_spin_lock_irqsave+0x44/0x58)
    [] (_raw_spin_lock_irqsave+0x44/0x58) from [] (__irq_get_desc_lock+0x48/0x88)
    [] (__irq_get_desc_lock+0x48/0x88) from [] (irq_set_irq_wake+0x20/0xf4)
    [] (irq_set_irq_wake+0x20/0xf4) from [] (mxs_gpio_set_wake_irq+0x1c/0x24)
    [] (mxs_gpio_set_wake_irq+0x1c/0x24) from [] (set_irq_wake_real+0x30/0x44)
    [] (set_irq_wake_real+0x30/0x44) from [] (irq_set_irq_wake+0x8c/0xf4)
    [] (irq_set_irq_wake+0x8c/0xf4) from [] (wlcore_nvs_cb+0x10c/0x97c)
    [] (wlcore_nvs_cb+0x10c/0x97c) from [] (request_firmware_work_func+0x38/0x58)
    [] (request_firmware_work_func+0x38/0x58) from [] (process_one_work+0x1c0/0x4a4)
    [] (process_one_work+0x1c0/0x4a4) from [] (worker_thread+0x138/0x394)
    [] (worker_thread+0x138/0x394) from [] (kthread+0xa4/0xb0)
    [] (kthread+0xa4/0xb0) from [] (ret_from_fork+0x14/0x34)
    wlcore: loaded

    Cc: stable@vger.kernel.org
    Signed-off-by: Marek Vasut
    Acked-by: Shawn Guo
    Signed-off-by: Linus Walleij

    Marek Vasut
     

06 Nov, 2013

1 commit


21 May, 2013

1 commit

  • The current driver doesn't use the set and clear registers found on the
    mxs gpio controller.

    This leads the generic gpio controller to be using some internal value
    to avoid looking up the value stored in the registers, making it behave
    pretty much like a cache.

    This raises some coherency problem when a gpio is not modified by the
    gpio controller, while it can easily be fixed by using the set and clear
    registers.

    Signed-off-by: Maxime Ripard
    Acked-by: Shawn Guo
    Signed-off-by: Linus Walleij

    Maxime Ripard
     

27 Feb, 2013

1 commit

  • Pull GPIO changes from Grant Likely:
    "This branch contains the usual set of individual driver improvements
    and bug fixes, as well as updates to the core code. The more notable
    changes include:

    - Internally add new API for referencing GPIOs by gpio_desc instead
    of number. Eventually this will become a public API

    - ACPI GPIO binding support"

    * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux: (33 commits)
    arm64: select ARCH_WANT_OPTIONAL_GPIOLIB
    gpio: em: Use irq_domain_add_simple() to fix runtime error
    gpio: using common order: let 'static const' instead of 'const static'
    gpio/vt8500: memory cleanup missing
    gpiolib: Fix locking on gpio debugfs files
    gpiolib: let gpio_chip reference its descriptors
    gpiolib: use descriptors internally
    gpiolib: use gpio_chips list in gpiochip_find_base
    gpiolib: use gpio_chips list in sysfs ops
    gpiolib: use gpio_chips list in gpiochip_find
    gpiolib: use gpio_chips list in gpiolib_sysfs_init
    gpiolib: link all gpio_chips using a list
    gpio/langwell: cleanup driver
    gpio/langwell: Add Cloverview ids to pci device table
    gpio/lynxpoint: add chipset gpio driver.
    gpiolib: add missing braces in gpio_direction_show
    gpiolib-acpi: Fix error checks in interrupt requesting
    gpio: mpc8xxx: don't set IRQ_TYPE_NONE when creating irq mapping
    gpiolib: remove gpiochip_reserve()
    arm: pxa: tosa: do not use gpiochip_reserve()
    ...

    Linus Torvalds
     

29 Jan, 2013

1 commit


23 Jan, 2013

1 commit

  • Convert all uses of devm_request_and_ioremap() to the newly introduced
    devm_ioremap_resource() which provides more consistent error handling.

    devm_ioremap_resource() provides its own error messages so all explicit
    error messages can be removed from the failure code paths.

    Signed-off-by: Thierry Reding
    Cc: Grant Likely
    Cc: Linus Walleij
    Acked-by: Viresh Kumar
    Tested-by: Gregory CLEMENT
    Acked-by: Gregory CLEMENT
    Signed-off-by: Greg Kroah-Hartman

    Thierry Reding
     

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
     

03 Sep, 2012

1 commit


27 May, 2012

1 commit

  • Pull arm-soc device tree conversions (part 2) from Olof Johansson:
    "These continue the device tree work from part 1, this set is for the
    tegra, mxs and imx platforms, all of which have dependencies on clock
    or pinctrl changes submitted earlier."

    Fix up trivial conflicts due to nearby changes in
    drivers/{gpio/gpio,i2c/busses/i2c}-mxs.c

    * tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (73 commits)
    ARM: dt: tegra: invert status=disable vs status=okay
    ARM: dt: tegra: consistent basic property ordering
    ARM: dt: tegra: sort nodes based on bus order
    ARM: dt: tegra: remove duplicate device_type property
    ARM: dt: tegra: consistenly use lower-case for hex constants
    ARM: dt: tegra: format regs properties consistently
    ARM: dt: tegra: gpio comment cleanup
    ARM: dt: tegra: remove unnecessary unit addresses
    ARM: dt: tegra: whitespace cleanup
    ARM: dt: tegra cardhu: fix typo in SDHCI node name
    ARM: dt: tegra: cardhu: register core regulator tps62361
    ARM: dt: tegra30.dtsi: Add SMMU node
    ARM: dt: tegra20.dtsi: Add GART node
    ARM: dt: tegra30.dtsi: Add Memory Controller(MC) nodes
    ARM: dt: tegra20.dtsi: Add Memory Controller(MC) nodes
    ARM: dt: tegra: Add device tree support for AHB
    ARM: dts: enable audio support for imx28-evk
    ARM: dts: enable i2c device for imx28-evk
    i2c: mxs: add device tree probe support
    ARM: dts: enable mmc for imx28-evk
    ...

    Linus Torvalds
     

20 May, 2012

1 commit

  • It fixes the issue in gpio-generic that commit fb14921 (gpio/mxc: add
    missing initialization of basic_mmio_gpio shadow variables) manged to
    fix in gpio-mxc driver, so that other platform specific drivers do not
    suffer from the same problem over and over again.

    Changes since v1:
    * Turn the last parameter of bgpio_init() "bool big_endian" into
    "unsigned long flags" and give those really quirky hardwares a
    chance to tell that reg_set and reg_dir are unreadable.

    Signed-off-by: Shawn Guo
    [grant.likely: Fix big-endian usage to explicitly set BBGPIOF_BIG_ENDIAN]
    Signed-off-by: Grant Likely

    Shawn Guo
     

12 May, 2012

3 commits


07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

01 Nov, 2011

1 commit


17 Aug, 2011

1 commit


20 Jul, 2011

1 commit


07 Jun, 2011

4 commits


06 Jun, 2011

1 commit

  • GPIO drivers are getting moved to drivers/gpio for cleanup and
    consolidation. This patch moves the mxs driver. Follow up patches
    will clean it up and make it a fine upstanding example of a gpio
    driver.

    v2: Removed header file entirely and put struct definition directly
    into driver. The struct isn't used anywhere else in the kernel.

    Signed-off-by: Grant Likely
    Tested-by: Shawn Guo
    Acked-by: Sascha Hauer

    Grant Likely