17 Dec, 2015

2 commits

  • commit e20538b82f1f
    ("gpio: Propagate errors from chip->get()")
    started to propagate errors from the .get() functions since
    we can get errors from the infrastructure of e.g. slowbus
    GPIO expanders.

    However it turns out a bunch of drivers relied on the core
    to clamp the value, so we need to revert to the old behaviour
    and go over all drivers and fix them to conform to the
    expectations of the core before we go back to propagating
    the error code.

    Cc: stable@vger.kernel.org # 4.3+
    Cc: Bjorn Andersson
    Cc: Vladimir Zapolskiy
    Fixes: e20538b82f1f ("gpio: Propagate errors from chip->get()")
    Reported-by: Michael Trimarchi
    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • The bgpio_get_set() call should return a value clamped to [0,1],
    the current code will return a negative value if reading
    bit 31, which turns the value negative as this is a signed value
    and thus gets interpreted as an error by the gpiolib core.
    Found on the gpio-mxc but applies to any MMIO driver.

    Cc: stable@vger.kernel.org # 4.3+
    Cc: kernel@pengutronix.de
    Cc: Vladimir Zapolskiy
    Fixes: e20538b82f1f ("gpio: Propagate errors from chip->get()")
    Reported-by: Clemens Gruber
    Signed-off-by: Linus Walleij

    Linus Walleij
     

12 Dec, 2015

1 commit


30 Nov, 2015

2 commits

  • Originally OMAP MPUIO GPIO irqchip was implemented using Generic irq
    chip, but after set of reworks Generic irq chip code was replaced by
    common OMAP GPIO implementation and finally removed by
    commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts").
    Unfortunately, above commit left .irq_mask/unmask callbacks assigned
    as below for MPUIO GPIO case:
    irqc->irq_mask = irq_gc_mask_set_bit;
    irqc->irq_unmask = irq_gc_mask_clr_bit;

    This now causes boot failure on OMAP1 platforms, after
    commit 450fa54cfd66 ("gpio: omap: convert to use generic irq handler")
    which forces these callbacks to be called during GPIO IRQs mapping
    from gpiochip_irq_map:

    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = c0004000
    [00000000] *pgd=00000000
    Internal error: Oops: 75 [#1] ARM
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0-rc1-e3-los_afe0c+-00002-g25379c0-dirty #1
    Hardware name: Amstrad E3 (Delta)
    task: c1836000 ti: c1838000 task.ti: c1838000
    PC is at irq_gc_mask_set_bit+0x1c/0x60
    LR is at __irq_do_set_handler+0x118/0x15c
    pc : [] lr : [] psr: 600000d3
    sp : c1839c90 ip : c1862c64 fp : c1839c9c
    r10: 00000000 r9 : c0411950 r8 : c0411bbc
    r7 : 00000000 r6 : c185c310 r5 : c00444e8 r4 : c185c300
    r3 : c1854b50 r2 : 00000000 r1 : 00000000 r0 : c185c310
    Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel
    Control: 0000317f Table: 10004000 DAC: 00000057
    Process swapper (pid: 1, stack limit = 0xc1838190)
    Stack: (0xc1839c90 to 0xc183a000)

    [...]

    Backtrace:
    [] (irq_gc_mask_set_bit) from [] (__irq_do_set_handler+0x118/0x15c)
    [] (__irq_do_set_handler) from [] (__irq_set_handler+0x44/0x5c)
    r6:00000000 r5:c00444e8 r4:c185c300
    [] (__irq_set_handler) from [] (irq_set_chip_and_handler_name+0x30/0x34)
    r7:00000050 r6:00000000 r5:c00444e8 r4:00000050
    [] (irq_set_chip_and_handler_name) from [] (gpiochip_irq_map+0x3c/0x8c)
    r7:00000050 r6:00000000 r5:00000050 r4:c1862c64
    [] (gpiochip_irq_map) from [] (irq_domain_associate+0x7c/0x1c4)
    r5:c185c310 r4:c185cb00
    [] (irq_domain_associate) from [] (irq_domain_add_simple+0x98/0xc0)
    r8:c0411bbc r7:c185cb00 r6:00000050 r5:00000010 r4:00000001
    [] (irq_domain_add_simple) from [] (_gpiochip_irqchip_add+0x64/0x10c)
    r7:c1862c64 r6:c0419280 r5:c1862c64 r4:c1854b50
    [] (_gpiochip_irqchip_add) from [] (omap_gpio_probe+0x2fc/0x63c)
    r5:c1854b50 r4:c1862c10
    [] (omap_gpio_probe) from [] (platform_drv_probe+0x2c/0x64)
    r10:00000000 r9:c03e45e8 r8:00000000 r7:c0419294 r6:c0411984 r5:c0419294
    r4:c0411950
    [] (platform_drv_probe) from [] (really_probe+0x160/0x29c)

    Hence, fix it by remove obsolete callbacks assignment. After this
    change omap_gpio_mask_irq()/omap_gpio_unmask_irq() will be used
    for MPUIO IRQs masking, but this now happens anyway from
    omap_gpio_irq_startup/shutdown().

    Cc: Tony Lindgren
    Fixes: commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts")
    Reported-by: Aaro Koskinen
    Signed-off-by: Grygorii Strashko
    Acked-by: Santosh Shilimkar
    Tested-by: Aaro Koskinen
    Signed-off-by: Linus Walleij

    Grygorii Strashko
     
  • Commit c0017ed71966 ("gpio: Introduce gpio descriptor 'name'") causes
    OOPS on boot on LPC32xx boards:

    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.3.0+ #707
    Hardware name: LPC32XX SoC (Flattened Device Tree)
    task: c381baa0 ti: c381e000 task.ti: c381e000
    PC is at strcmp+0x10/0x40
    LR is at gpiochip_add+0x3d0/0x4d4
    pc : [<>] lr : [<>] psr: a0000093
    sp : c381fd60 ip : c381fd70 fp : c381fd6c

    [snip]

    Backtrace:
    [<>] (strcmp) from [<>] (gpiochip_add+0x3d0/0x4d4)
    [<>] (gpiochip_add) from [<>] (lpc32xx_gpio_probe+0x44/0x60)
    [<>] (lpc32xx_gpio_probe) from [<>] (platform_drv_probe+0x40/0x8c)
    [<>] (platform_drv_probe) from [<>] (driver_probe_device+0x110/0x294)
    [<>] (driver_probe_device) from [<>] (__driver_attach+0x70/0x94)
    [<>] (__driver_attach) from [<>] (bus_for_each_dev+0x74/0x98)
    [<>] (bus_for_each_dev) from [<>] (driver_attach+0x20/0x28)
    [<>] (driver_attach) from [<>] (bus_add_driver+0xd4/0x1f0)
    [<>] (bus_add_driver) from [<>] (driver_register+0xa4/0xe8)
    [<>] (driver_register) from [<>] (__platform_driver_register+0x38/0x4c)
    [<>] (__platform_driver_register) from [<>] (lpc32xx_gpio_driver_init+0x18/0x20)
    [<>] (lpc32xx_gpio_driver_init) from [<>] (do_one_initcall+0x108/0x1c8)
    [<>] (do_one_initcall) from [<>] (kernel_init_freeable+0x10c/0x1d4)
    [<>] (kernel_init_freeable) from [<>] (kernel_init+0x10/0xec)
    [<>] (kernel_init) from [<>] (ret_from_fork+0x14/0x24)

    This is caused by the fact that at the moment some GPIO names are set
    to NULL, there is a hole in linear representation of one GPI bank, see
    drivers/gpio/gpio-lpc32xx.c / gpi_p3_names[] for details.

    The same problem most probably affects also gpio-cs5535.c, see
    cs5535_gpio_names[].

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Linus Walleij

    Vladimir Zapolskiy
     

17 Nov, 2015

4 commits


07 Nov, 2015

1 commit

  • Pull asm-generic cleanups from Arnd Bergmann:
    "The asm-generic changes for 4.4 are mostly a series from Christoph
    Hellwig to clean up various abuses of headers in there. The patch to
    rename the io-64-nonatomic-*.h headers caused some conflicts with new
    users, so I added a workaround that we can remove in the next merge
    window.

    The only other patch is a warning fix from Marek Vasut"

    * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    asm-generic: temporarily add back asm-generic/io-64-nonatomic*.h
    asm-generic: cmpxchg: avoid warnings from macro-ized cmpxchg() implementations
    gpio-mxc: stop including
    n_tracesink: stop including
    n_tracerouter: stop including
    mlx5: stop including
    hifn_795x: stop including
    drbd: stop including
    move count_zeroes.h out of asm-generic
    move io-64-nonatomic*.h out of asm-generic

    Linus Torvalds
     

06 Nov, 2015

1 commit

  • Pull spi updates from Mark Brown:
    "Quite a lot of activity in SPI this cycle, almost all of it in drivers
    with a few minor improvements and tweaks in the core.

    - Updates to pxa2xx to support Intel Broxton and multiple chip selects.
    - Support for big endian in the bcm63xx driver.
    - Multiple slave support for the mt8173
    - New driver for the auxiliary SPI controller in bcm2835 SoCs.
    - Support for Layerscale SoCs in the Freescale DSPI driver"

    * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits)
    spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI
    spi: pxa2xx: Add support for Intel Broxton
    spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals
    spi: pxa2xx: Add output control for multiple Intel LPSS chip selects
    spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific
    spi: Add DSPI support for layerscape family
    spi: ti-qspi: improve ->remove() callback
    spi/spi-xilinx: Fix race condition on last word read
    spi: Drop owner assignment from spi_drivers
    spi: Add THIS_MODULE to spi_driver in SPI core
    spi: Setup the master controller driver before setting the chipselect
    spi: dw: replace magic constant by DW_SPI_DR
    spi: mediatek: mt8173 spi multiple devices support
    spi: mediatek: handle controller_data in mtk_spi_setup
    spi: mediatek: remove mtk_spi_config
    spi: mediatek: Update document devicetree bindings to support multiple devices
    spi: fix kernel-doc warnings about missing return desc in spi.c
    spi: fix kernel-doc warnings about missing return desc in spi.h
    spi: pxa2xx: Align a few defines
    spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select
    ...

    Linus Torvalds
     

05 Nov, 2015

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "Quite a new features are included this time.

    First off, the Collaborative Processor Performance Control interface
    (version 2) defined by ACPI will now be supported on ARM64 along with
    a cpufreq frontend for CPU performance scaling.

    Second, ACPI gets a new infrastructure for the early probing of IRQ
    chips and clock sources (along the lines of the existing similar
    mechanism for DT).

    Next, the ACPI core and the generic device properties API will now
    support a recently introduced hierarchical properties extension of the
    _DSD (Device Specific Data) ACPI device configuration object. If the
    ACPI platform firmware uses that extension to organize device
    properties in a hierarchical way, the kernel will automatically handle
    it and make those properties available to device drivers via the
    generic device properties API.

    It also will be possible to build the ACPICA's AML interpreter
    debugger into the kernel now and use that to diagnose AML-related
    problems more efficiently. In the future, this should make it
    possible to single-step AML execution and do similar things.
    Interesting stuff, although somewhat experimental at this point.

    Finally, the PM core gets a new mechanism that can be used by device
    drivers to distinguish between suspend-to-RAM (based on platform
    firmware support) and suspend-to-idle (or other variants of system
    suspend the platform firmware is not involved in) and possibly
    optimize their device suspend/resume handling accordingly.

    In addition to that, some existing features are re-organized quite
    substantially.

    First, the ACPI-based handling of PCI host bridges on x86 and ia64 is
    unified and the common code goes into the ACPI core (so as to reduce
    code duplication and eliminate non-essential differences between the
    two architectures in that area).

    Second, the Operating Performance Points (OPP) framework is
    reorganized to make the code easier to find and follow.

    Next, the cpufreq core's sysfs interface is reorganized to get rid of
    the "primary CPU" concept for configurations in which the same
    performance scaling settings are shared between multiple CPUs.

    Finally, some interfaces that aren't necessary any more are dropped
    from the generic power domains framework.

    On top of the above we have some minor extensions, cleanups and bug
    fixes in multiple places, as usual.

    Specifics:

    - ACPICA update to upstream revision 20150930 (Bob Moore, Lv Zheng).

    The most significant change is to allow the AML debugger to be
    built into the kernel. On top of that there is an update related
    to the NFIT table (the ACPI persistent memory interface) and a few
    fixes and cleanups.

    - ACPI CPPC2 (Collaborative Processor Performance Control v2) support
    along with a cpufreq frontend (Ashwin Chaugule).

    This can only be enabled on ARM64 at this point.

    - New ACPI infrastructure for the early probing of IRQ chips and
    clock sources (Marc Zyngier).

    - Support for a new hierarchical properties extension of the ACPI
    _DSD (Device Specific Data) device configuration object allowing
    the kernel to handle hierarchical properties (provided by the
    platform firmware this way) automatically and make them available
    to device drivers via the generic device properties interface
    (Rafael Wysocki).

    - Generic device properties API extension to obtain an index of
    certain string value in an array of strings, along the lines of
    of_property_match_string(), but working for all of the supported
    firmware node types, and support for the "dma-names" device
    property based on it (Mika Westerberg).

    - ACPI core fix to parse the MADT (Multiple APIC Description Table)
    entries in the order expected by platform firmware (and mandated by
    the specification) to avoid confusion on systems with more than 255
    logical CPUs (Lukasz Anaczkowski).

    - Consolidation of the ACPI-based handling of PCI host bridges on x86
    and ia64 (Jiang Liu).

    - ACPI core fixes to ensure that the correct IRQ number is used to
    represent the SCI (System Control Interrupt) in the cases when it
    has been re-mapped (Chen Yu).

    - New ACPI backlight quirk for Lenovo IdeaPad S405 (Hans de Goede).

    - ACPI EC driver fixes (Lv Zheng).

    - Assorted ACPI fixes and cleanups (Dan Carpenter, Insu Yun, Jiri
    Kosina, Rami Rosen, Rasmus Villemoes).

    - New mechanism in the PM core allowing drivers to check if the
    platform firmware is going to be involved in the upcoming system
    suspend or if it has been involved in the suspend the system is
    resuming from at the moment (Rafael Wysocki).

    This should allow drivers to optimize their suspend/resume handling
    in some cases and the changes include a couple of users of it (the
    i8042 input driver, PCI PM).

    - PCI PM fix to prevent runtime-suspended devices with PME enabled
    from being resumed during system suspend even if they aren't
    configured to wake up the system from sleep (Rafael Wysocki).

    - New mechanism to report the number of a wakeup IRQ that woke up the
    system from sleep last time (Alexandra Yates).

    - Removal of unused interfaces from the generic power domains
    framework and fixes related to latency measurements in that code
    (Ulf Hansson, Daniel Lezcano).

    - cpufreq core sysfs interface rework to make it handle CPUs that
    share performance scaling settings (represented by a common cpufreq
    policy object) more symmetrically (Viresh Kumar).

    This should help to simplify the CPU offline/online handling among
    other things.

    - cpufreq core fixes and cleanups (Viresh Kumar).

    - intel_pstate fixes related to the Turbo Activation Ratio (TAR)
    mechanism on client platforms which causes the turbo P-states range
    to vary depending on platform firmware settings (Srinivas
    Pandruvada).

    - intel_pstate sysfs interface fix (Prarit Bhargava).

    - Assorted cpufreq driver (imx, tegra20, powernv, integrator) fixes
    and cleanups (Bai Ping, Bartlomiej Zolnierkiewicz, Shilpasri G
    Bhat, Luis de Bethencourt).

    - cpuidle mvebu driver cleanups (Russell King).

    - OPP (Operating Performance Points) framework code reorganization to
    make it more maintainable (Viresh Kumar).

    - Intel Broxton support for the RAPL (Running Average Power Limits)
    power capping driver (Amy Wiles).

    - Assorted power management code fixes and cleanups (Dan Carpenter,
    Geert Uytterhoeven, Geliang Tang, Luis de Bethencourt, Rasmus
    Villemoes)"

    * tag 'pm+acpi-4.4-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (108 commits)
    cpufreq: postfix policy directory with the first CPU in related_cpus
    cpufreq: create cpu/cpufreq/policyX directories
    cpufreq: remove cpufreq_sysfs_{create|remove}_file()
    cpufreq: create cpu/cpufreq at boot time
    cpufreq: Use cpumask_copy instead of cpumask_or to copy a mask
    cpufreq: ondemand: Drop unnecessary locks from update_sampling_rate()
    PM / Domains: Merge measurements for PM QoS device latencies
    PM / Domains: Don't measure ->start|stop() latency in system PM callbacks
    PM / clk: Fix broken build due to non-matching code and header #ifdefs
    ACPI / Documentation: add copy_dsdt to ACPI format options
    ACPI / sysfs: correctly check failing memory allocation
    ACPI / video: Add a quirk to force native backlight on Lenovo IdeaPad S405
    ACPI / CPPC: Fix potential memory leak
    ACPI / CPPC: signedness bug in register_pcc_channel()
    ACPI / PAD: power_saving_thread() is not freezable
    ACPI / PM: Fix incorrect wakeup IRQ setting during suspend-to-idle
    ACPI: Using correct irq when waiting for events
    ACPI: Use correct IRQ when uninstalling ACPI interrupt handler
    cpuidle: mvebu: disable the bind/unbind attributes and use builtin_platform_driver
    cpuidle: mvebu: clean up multiple platform drivers
    ...

    Linus Torvalds
     

04 Nov, 2015

2 commits

  • …pi/topic/owner', 'spi/topic/pxa' and 'spi/topic/pxa2xx' into spi-next

    Mark Brown
     
  • Pull irq updates from Thomas Gleixner:
    "The irq departement delivers:

    - Rework the irqdomain core infrastructure to accomodate ACPI based
    systems. This is required to support ARM64 without creating
    artificial device tree nodes.

    - Sanitize the ACPI based ARM GIC initialization by making use of the
    new firmware independent irqdomain core

    - Further improvements to the generic MSI management

    - Generalize the irq migration on CPU hotplug

    - Improvements to the threaded interrupt infrastructure

    - Allow the migration of "chained" low level interrupt handlers

    - Allow optional force masking of interrupts in disable_irq[_nosysnc]

    - Support for two new interrupt chips - Sigh!

    - A larger set of errata fixes for ARM gicv3

    - The usual pile of fixes, updates, improvements and cleanups all
    over the place"

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits)
    Document that IRQ_NONE should be returned when IRQ not actually handled
    PCI/MSI: Allow the MSI domain to be device-specific
    PCI: Add per-device MSI domain hook
    of/irq: Use the msi-map property to provide device-specific MSI domain
    of/irq: Split of_msi_map_rid to reuse msi-map lookup
    irqchip/gic-v3-its: Parse new version of msi-parent property
    PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing
    of/irq: Use of_msi_get_domain instead of open-coded "msi-parent" parsing
    of/irq: Add support code for multi-parent version of "msi-parent"
    irqchip/gic-v3-its: Add handling of PCI requester id.
    PCI/MSI: Add helper function pci_msi_domain_get_msi_rid().
    of/irq: Add new function of_msi_map_rid()
    Docs: dt: Add PCI MSI map bindings
    irqchip/gic-v2m: Add support for multiple MSI frames
    irqchip/gic-v3: Fix translation of LPIs after conversion to irq_fwspec
    irqchip/mxs: Add Alphascale ASM9260 support
    irqchip/mxs: Prepare driver for hardware with different offsets
    irqchip/mxs: Panic if ioremap or domain creation fails
    irqdomain: Documentation updates
    irqdomain/msi: Use fwnode instead of of_node
    ...

    Linus Torvalds
     

01 Nov, 2015

5 commits

  • - Relax dependencies on SPI_MASTER for drivers in the SPI menu
    that already has this dependency.
    - Move out the expander that would be hidden for I2C access if
    SPI_MASTER was not selected. Tentatively create a separate
    menu for this.
    - Move the ZX SoC driver to memory-mapped drivers, this must be
    a mistake and only worked because the system has an SPI master
    enabled at the same time.

    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • The I2C expander menu already depends on I2C, drop subdependecies
    on individual drivers. Keep the instances of depends on I2C=y
    though, so these are still restricted to the compiled-in case.

    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • Port-mapped I/O depends on X86 already, so individual drivers need
    not specify this dependency.

    Suggested-by: Vivien Didelot
    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • In Microsoft Surface3 the GPIO detecting lid state is shared between GPIO
    event and operation region. Below is simplied version of the DSDT from
    Surface3 including relevant parts:

    Scope (GPO0)
    {
    Name (_AEI, ResourceTemplate ()
    {
    GpioInt (Edge, ActiveBoth, Shared, PullNone, 0x0000,
    "\\_SB.GPO0", 0x00, ResourceConsumer, ,
    )
    { // Pin list
    0x004C
    }
    })

    OperationRegion (GPOR, GeneralPurposeIo, Zero, One)
    Field (GPOR, ByteAcc, NoLock, Preserve)
    {
    Connection (
    GpioIo (Shared, PullNone, 0x0000, 0x0000,
    IoRestrictionNone, "\\_SB.GPO0", 0x00,
    ResourceConsumer,,)
    { // Pin list
    0x004C
    }
    ),
    HELD, 1
    }

    Method (_E4C, 0, Serialized) // _Exx: Edge-Triggered GPE
    {
    If ((HELD == One))
    {
    ^^LID.LIDB = One
    }
    Else
    {
    ^^LID.LIDB = Zero
    Notify (LID, 0x80) // Status Change
    }

    Notify (^^PCI0.SPI1.NTRG, One) // Device Check
    }
    }

    When GPIO 0x4c changes we call ASL method _E4C which tries to read HELD
    field (the same GPIO). This triggers following error on the console:

    ACPI Error: Method parse/execution failed [\_SB.GPO0._E4C]
    (Node ffff88013f4b4438), AE_ERROR (20150930/psparse-542)

    The error happens because ACPI GPIO operation region handler
    (acpi_gpio_adr_space_handler()) tries to acquire the very same GPIO which
    returns an error (-EBUSY) because the GPIO is already reserved for the GPIO
    event.

    Fix this so that we "borrow" the event GPIO if we find the GPIO belongs to
    an event. Allow this only for GPIOs that are read.

    To be able to go through acpi_gpio->events list for operation region access
    we need to make sure the list is properly initialized whenever GPIO chip is
    registered.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=106571
    Signed-off-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Mika Westerberg
     
  • Create a Kconfig submenu for drivers using X86 port-mapped I/O
    and depend on X86 for this.

    Suggested-by: Mika Westerberg
    Cc: William Breathitt Gray
    Cc: Andreas Bofjall
    Cc: Diego Elio Pettenò
    Cc: Daniel Krueger
    Cc: Bruno Randolf
    Cc: Vivien Didelot
    Acked-by: Simon Guinot
    Signed-off-by: Linus Walleij

    Linus Walleij
     

28 Oct, 2015

1 commit


27 Oct, 2015

3 commits

  • The driver does not have any real architecture dependencies. To avoid
    listing each architecture that might use this driver on some
    FPGA-enabled platform, drop these dependencies.

    Signed-off-by: Soren Brinkmann
    Acked-by: Moritz Fischer
    Signed-off-by: Linus Walleij

    Soren Brinkmann
     
  • Returning an error instead of NULL in bgpio_map if
    platform_get_resource_byname does not find a resource was introduced with
    commit cf3f2a2c8bae ("gpio: generic: improve error handling in bgpio_map").
    This results in several qemu runtime failures with default and non-default
    configurations, if attempts are made to boot from mmcblk0. Examples for
    failures with multi_v7_defconfig are

    Machine: vexpress-a9 dtb: vexpress-v2p-ca9
    Machine: vexpress-a15 dtb: vexpress-v2p-ca15-tc1

    Crash:

    VFS: Cannot open root device "mmcblk0" or unknown-block(0,0): error -6
    Please append a correct "root=" boot option; here are the available partitions:
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

    Looking into the code, always returning an error if bgpio_map fails
    does not appear to make much sense, since the code in bgpio_setup_io
    specifically supports some of the resources to be NULL.

    Fixes: cf3f2a2c8bae ("gpio: generic: improve error handling in bgpio_map")
    Cc: Heiner Kallweit
    Signed-off-by: Guenter Roeck
    Signed-off-by: Linus Walleij

    Guenter Roeck
     
  • The ACCES 104-IDIO-16 family of PC/104 utility boards feature 16
    optically isolated inputs and 16 optically isolated FET solid state
    outputs. This driver provides GPIO support for these 32 channels of
    digital I/O. Change-of-State detection interrupts are not supported.

    GPIO 0-15 correspond to digital outputs 0-15, while GPIO 16-31
    correspond to digital inputs 0-15. The base port address for the device
    may be set via the idio_16_base module parameter.

    Signed-off-by: William Breathitt Gray
    Signed-off-by: Linus Walleij

    William Breathitt Gray
     

26 Oct, 2015

2 commits

  • This patch adds a new GPIO driver for AMD Promontory chip.

    This GPIO controller is enumerated by ACPI and the ACPI compliant
    hardware ID is AMDF030.

    Change history:

    v2: 1. fix coding style
    2. registers renaming
    v3: 1. change include file
    2. fix coding style
    3. remove module_init/exit, add module_platform_driver
    4. remove MODULE_ALIAS
    v4: 1. change TOTAL_GPIO_PINS to PT_TOTAL_GPIO
    2. remove PCI dependency in Kconfig
    3. fix subject line

    Signed-off-by: YD Tseng
    Signed-off-by: Linus Walleij

    YD Tseng
     
  • * device-properties:
    ACPI / property: Fix subnode lookup scope for data-only subnodes
    acpi-dma: Add support for "dma-names" device property
    device property: Add fwnode_property_match_string()
    ACPI / property: Extend device_get_next_child_node() to data-only nodes
    ACPI / gpio: Split acpi_get_gpiod_by_index()
    ACPI / property: Extend fwnode_property_* to data-only subnodes
    ACPI / property: Expose data-only subnodes via sysfs
    ACPI / property: Add support for data-only subnodes
    ACPI / property: Add routine for extraction of _DSD properties

    Rafael J. Wysocki
     

22 Oct, 2015

1 commit

  • commit "325f0a (MIPS: Netlogic: Use chip_data for irq_chip methods)"
    Updates "mips/netlogic/common/irq.c" to use chip_data to store interrupt
    controller data pointer. Before this commit handler_data was used to
    store interrupt controller data which caused errors while using
    gpiochip_set_chained_irqchip.

    Update XLP GPIO driver to use the gpiolib irqchip helpers.
    And add missing depends on OF_GPIO in Kconfig.

    Signed-off-by: Kamlakant Patel
    Signed-off-by: Linus Walleij

    Kamlakant Patel
     

19 Oct, 2015

1 commit


17 Oct, 2015

6 commits


16 Oct, 2015

2 commits

  • This patch fixes below static checker warning by changing
    type of irq field in struct gpio_bank from u16 to int.

    drivers/gpio/gpio-omap.c:1191 omap_gpio_probe()
    warn: assigning (-6) to unsigned variable 'bank->irq'

    drivers/gpio/gpio-omap.c
    1188 bank->irq = platform_get_irq(pdev, 0);
    1189 if (bank->irq irq is u16.

    1190 if (!bank->irq)
    1191 bank->irq = -ENXIO;

    Does not work.

    1192 if (bank->irq != -EPROBE_DEFER)

    Does not work.

    1193 dev_err(dev,
    1194 "can't get irq resource ret=%d\n", bank->irq);
    1195 return bank->irq;
    1196 }

    Fixes: commit 89d18e3af8b9: "gpio: omap: switch to use platform_get_irq"
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Linus Walleij

    Grygorii Strashko
     
  • The PL061 can handle level IRQs and edge IRQs, however it is
    just utilizing handle_simple_irq() for all IRQs. Inspired by
    Stefan Agners patch to vf610, this assigns the right handler
    depending on what type is set up, and after this
    handle_bad_irq() is only used as default and if the type is
    not specified, as is done in the OMAP driver: defining the
    IRQ type is really not optional for this driver.

    The interrupt handler was just writing the interrupt clearing
    register for all lines that were high when entering the handling
    loop, this is wrong: that register is only supposed to be
    written (on a per-line basis) for edge IRQs, so this ACK
    was moved to the .irq_ack() callback as is proper.

    Tested with PL061 on the ARM RealView PB11MPCore and the
    MMC/SC card detect GPIO.

    Cc: Jonas Gorski
    Cc: Stefan Agner
    Signed-off-by: Linus Walleij

    Linus Walleij
     

15 Oct, 2015

2 commits


14 Oct, 2015

1 commit

  • The struct irq_domain contains a "struct device_node *" field
    (of_node) that is almost the only link between the irqdomain
    and the device tree infrastructure.

    In order to prepare for the removal of that field, convert all
    users to use irq_domain_get_of_node() instead.

    Signed-off-by: Marc Zyngier
    Reviewed-and-tested-by: Hanjun Guo
    Tested-by: Lorenzo Pieralisi
    Cc:
    Cc: Tomasz Nowicki
    Cc: Suravee Suthikulpanit
    Cc: Graeme Gregory
    Cc: Jake Oshins
    Cc: Jiang Liu
    Cc: Jason Cooper
    Cc: Rafael J. Wysocki
    Link: http://lkml.kernel.org/r/1444737105-31573-2-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     

05 Oct, 2015

2 commits