15 Jan, 2016

2 commits

  • For some platform such as imx7D SDB, one pin of 74x164 to
    control all peripheral power supply(PERI_3V_EN).
    The pin should keep in high voltage level when 74x164 loading,
    otherwise the module depend on PERI_3V3 will lose power.
    So add new property registers-default into 74x164 driver.

    Signed-off-by: Sandor Yu
    Signed-off-by: Fugang Duan
    (cherry picked from commit: 61fe7af7e47dd8bf6acc91ceabd9e660d28de28a)

    Sandor Yu
     
  • The pca953x type of devices, e.g. max7310, may have a reset which needs
    to be handled to get the device start working. Add a device_reset()
    call for that, and defer the probe if the reset controller for that is
    not ready yet.

    Signed-off-by: Shawn Guo
    Signed-off-by: Fugang Duan
    (cherry picked from commit: d3264091b30b777d94a18efda9823a06668d5b10)

    Shawn Guo
     

22 Jul, 2015

2 commits

  • commit 501ef0f95a57e7c32138733c468394a52244c85b upstream.

    If an interrupt controller doesn't support wake-up configuration,
    irq_set_irq_wake() returns an error code. Then any subsequent call
    trying to deconfigure wake-up will cause an imbalance, and a warning
    will be printed:

    WARNING: CPU: 1 PID: 1341 at kernel/irq/manage.c:540 irq_set_irq_wake+0x9c/0xf8()
    Unbalanced IRQ 26 wake disable

    To fix this, refrain from any further parent interrupt controller
    (de)configuration if irq_set_irq_wake() failed.

    Alternative fixes would be:
    - calling "gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE)" from the
    platform code,
    - setting "gic_chip.flags = IRQCHIP_SKIP_SET_WAKE" in the GIC driver
    code,
    but these were withheld as the GIC hardware doesn't really support
    wake-up interrupts.

    Fixes: ab82fa7da4dce5c7 ("gpio: rcar: Prevent module clock disable when wake-up is enabled")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Walleij
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     
  • commit 61e749d7e1627d375156553ea0ae83c4f6bb5a9b upstream.

    The CrystalCove GPIO irqchip doesn't have irq_set_wake callback defined
    so we should set IRQCHIP_SKIP_SET_WAKE for it or it would cause an irq
    desc's wake_depth unbalanced warning during system resume phase from the
    gpio_keys driver, which is the driver for the power button of the ASUS
    T100 laptop.

    Signed-off-by: Aaron Lu
    Signed-off-by: Linus Walleij
    Signed-off-by: Greg Kroah-Hartman

    Aaron Lu
     

12 May, 2015

2 commits

  • This patch fixes an inverted return value of the gpio get_direction
    function.

    The wrong value causes the direction sysfs entry and GPIO debugfs file
    to indicate incorrect GPIO direction settings. In some cases it also
    prevents setting GPIO output values.

    The problem is also present in all other stable kernel versions since
    linux-3.12.

    Cc: Stable # v3.12+
    Reported-by: Jochen Henneberg
    Signed-off-by: Michael Brunner
    Reviewed-by: Guenter Roeck
    Signed-off-by: Linus Walleij

    Michael Brunner
     
  • Make sure to free any hogged gpios on errors in gpiochip_add.

    Also move all forward declarations to the top of the file.

    Fixes: f625d4601759 ("gpio: add GPIO hogging mechanism")
    Signed-off-by: Johan Hovold
    Reviewed-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Johan Hovold
     

06 May, 2015

1 commit

  • At some point with all the GPIO clean-up we've broken the
    MPUIO interrupts. Those are just a little bit different from
    the GPIO interrupts, so we can fix it up just by setting
    different irqchip functions for it. And then we can just
    remove all old code trying to do the same.

    Cc: Aaro Koskinen
    Cc: Javier Martinez Canillas
    Cc: Kevin Hilman
    Cc: Nishanth Menon
    Signed-off-by: Tony Lindgren
    Reviewed-by: Grygorii Strashko
    Acked-by: Santosh Shilimkar
    Reviewed-by: Felipe Balbi
    Signed-off-by: Linus Walleij

    Tony Lindgren
     

30 Apr, 2015

1 commit

  • Unregister GPIOs requested through sysfs at chip remove to avoid leaking
    the associated memory and sysfs entries.

    The stale sysfs entries prevented the gpio numbers from being exported
    when the gpio range was later reused (e.g. at device reconnect).

    This also fixes the related module-reference leak.

    Note that kernfs makes sure that any on-going sysfs operations finish
    before the class devices are unregistered and that further accesses
    fail.

    The chip exported flag is used to prevent gpiod exports during removal.
    This also makes it harder to trigger, but does not fix, the related race
    between gpiochip_remove and export_store, which is really a race with
    gpiod_request that needs to be addressed separately.

    Also note that this would prevent the crashes (e.g. NULL-dereferences)
    at reconnect that affects pre-3.18 kernels, as well as use-after-free on
    operations on open attribute files on pre-3.14 kernels (prior to
    kernfs).

    Fixes: d8f388d8dc8d ("gpio: sysfs interface")
    Cc: stable # v2.6.27: 01cca93a9491
    Signed-off-by: Johan Hovold
    Signed-off-by: Linus Walleij

    Johan Hovold
     

27 Apr, 2015

1 commit


23 Apr, 2015

1 commit

  • Pull ARM SoC cleanups from Olof Johansson:
    "We've got a fairly large cleanup branch this time. The bulk of this
    is removal of non-DT platforms of several flavors:

    - Atmel at91 platforms go full-DT, with removal of remaining
    board-file based support

    - OMAP removes legacy board files for three more platforms

    - removal of non-DT mach-msm, newer Qualcomm platforms now live in
    mach-qcom

    - Freescale i.MX25 also removes non-DT platform support"

    Most of the rest of the changes here are fallout from the above, i.e. for
    example removal of drivers that now lack platforms, etc.

    * tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (58 commits)
    mmc: Remove msm_sdcc driver
    gpio: Remove gpio-msm-v1 driver
    ARM: Remove mach-msm and associated ARM architecture code
    ARM: shmobile: cpuidle: Remove the pointless default driver
    ARM: davinci: dm646x: Add interrupt resource for McASPs
    ARM: davinci: irqs: Correct McASP1 TX interrupt definition for DM646x
    ARM: davinci: dm646x: Clean up the McASP DMA resources
    ARM: davinci: devices-da8xx: Add support for McASP2 on da830
    ARM: davinci: devices-da8xx: Clean up and correct the McASP device creation
    ARM: davinci: devices-da8xx: Add interrupt resource to McASP structs
    ARM: davinci: devices-da8xx: Add resource name for the McASP DMA request
    ARM: OMAP2+: Remove legacy support for omap3 TouchBook
    ARM: OMAP3: Remove legacy support for devkit8000
    ARM: OMAP3: Remove legacy support for EMA-Tech Stalker board
    ARM: shmobile: Consolidate the pm code for R-Car Gen2
    ARM: shmobile: r8a7791: Correct SYSCIER value
    ARM: shmobile: r8a7790: Correct SYSCIER value
    ARM: at91: remove old setup
    ARM: at91: sama5d4: remove useless map_io
    ARM: at91: sama5 use SoC detection infrastructure
    ...

    Linus Torvalds
     

18 Apr, 2015

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.1 development cycle:

    - A new GPIO hogging mechanism has been added. This can be used on
    boards that want to drive some GPIO line high, low, or set it as
    input on boot and then never touch it again. For some embedded
    systems this is bliss and simplifies things to a great extent.

    - Some API cleanup and closure: gpiod_get_array() and
    gpiod_put_array() has been added to get and put GPIOs in bulk as
    was possible with the non-descriptor API.

    - Encapsulate cross-calls to the pin control subsystem in
    . Now this should be the only header any GPIO
    driver needs to include or something is wrong. Cleanups
    restricting drivers to this include are welcomed if tested.

    - Sort the GPIO Kconfig and split it into submenus, as it was
    becoming and unstructured, illogical and unnavigatable mess. I
    hope this is easier to follow. Menus that require a certain
    subsystem like I2C can now be hidden nicely for example, still
    working on others.

    - New drivers:

    - New driver for the Altera Soft GPIO.

    - The F7188x driver now handles the F71869 and F71869A variants.

    - The MIPS Loongson driver has been moved to drivers/gpio for
    consolidation and cleanup.

    - Cleanups:

    - The MAX732x is converted to use the GPIOLIB_IRQCHIP
    infrastructure.

    - The PCF857x is converted to use the GPIOLIB_IRQCHIP
    infrastructure.

    - Radical cleanup of the OMAP driver.

    - Misc:

    - Enable the DWAPB GPIO for all architectures. This is a "hard
    IP" block from Synopsys which has started to turn up in so
    diverse architectures as X86 Quark, ARC and a slew of ARM
    systems. So even though it's not an expander, it's generic
    enough to be available for all.

    - We add a mock GPIO on Crystalcove PMIC after a long discussion
    with Daniel Vetter et al, tracing back to the shootout at the
    kernel summit where DRM drivers and sub-componentization was
    discussed. In this case a mock GPIO is assumed to be the best
    compromise gaining some reuse of infrastructure without making
    DRM drivers overly complex at the same time. Let's see"

    * tag 'gpio-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (62 commits)
    Revert "gpio: sch: use uapi/linux/pci_ids.h directly"
    gpio: dwapb: remove dependencies
    gpio: dwapb: enable for ARC
    gpio: removing kfree remove functionality
    gpio: mvebu: Fix mask/unmask managment per irq chip type
    gpio: split GPIO drivers in submenus
    gpio: move MFD GPIO drivers under their own comment
    gpio: move BCM Kona Kconfig option
    gpio: arrange SPI Kconfig symbols alphabetically
    gpio: arrange PCI GPIO controllers alphabetically
    gpio: arrange I2C Kconfig symbols alphabetically
    gpio: arrange Kconfig symbols alphabetically
    gpio: ich: Implement get_direction function
    gpio: use (!foo) instead of (foo == NULL)
    gpio: arizona: drop owner assignment from platform_drivers
    gpio: max7300: remove 'ret' variable
    gpio: use devm_kzalloc
    gpio: sch: use uapi/linux/pci_ids.h directly
    gpio: x-gene: fix devm_ioremap_resource() check
    gpio: loongson: Add Loongson-3A/3B GPIO driver support
    ...

    Linus Torvalds
     

15 Apr, 2015

2 commits

  • Pull power management and ACPI updates from Rafael Wysocki:
    "These are mostly fixes and cleanups all over, although there are a few
    items that sort of fall into the new feature category.

    First off, we have new callbacks for PM domains that should help us to
    handle some issues related to device initialization in a better way.

    There also is some consolidation in the unified device properties API
    area allowing us to use that inferface for accessing data coming from
    platform initialization code in addition to firmware-provided data.

    We have some new device/CPU IDs in a few drivers, support for new
    chips and a new cpufreq driver too.

    Specifics:

    - Generic PM domains support update including new PM domain callbacks
    to handle device initialization better (Russell King, Rafael J
    Wysocki, Kevin Hilman)

    - Unified device properties API update including a new mechanism for
    accessing data provided by platform initialization code (Rafael J
    Wysocki, Adrian Hunter)

    - ARM cpuidle update including ARM32/ARM64 handling consolidation
    (Daniel Lezcano)

    - intel_idle update including support for the Silvermont Core in the
    Baytrail SOC and for the Airmont Core in the Cherrytrail and
    Braswell SOCs (Len Brown, Mathias Krause)

    - New cpufreq driver for Hisilicon ACPU (Leo Yan)

    - intel_pstate update including support for the Knights Landing chip
    (Dasaratharaman Chandramouli, Kristen Carlson Accardi)

    - QorIQ cpufreq driver update (Tang Yuantian, Arnd Bergmann)

    - powernv cpufreq driver update (Shilpasri G Bhat)

    - devfreq update including Tegra support changes (Tomeu Vizoso,
    MyungJoo Ham, Chanwoo Choi)

    - powercap RAPL (Running-Average Power Limit) driver update including
    support for Intel Broadwell server chips (Jacob Pan, Mathias Krause)

    - ACPI device enumeration update related to the handling of the
    special PRP0001 device ID allowing DT-style 'compatible' property
    to be used for ACPI device identification (Rafael J Wysocki)

    - ACPI EC driver update including limited _DEP support (Lan Tianyu,
    Lv Zheng)

    - ACPI backlight driver update including a new mechanism to allow
    native backlight handling to be forced on non-Windows 8 systems and
    a new quirk for Lenovo Ideapad Z570 (Aaron Lu, Hans de Goede)

    - New Windows Vista compatibility quirk for Sony VGN-SR19XN (Chen Yu)

    - Assorted ACPI fixes and cleanups (Aaron Lu, Martin Kepplinger,
    Masanari Iida, Mika Westerberg, Nan Li, Rafael J Wysocki)

    - Fixes related to suspend-to-idle for the iTCO watchdog driver and
    the ACPI core system suspend/resume code (Rafael J Wysocki, Chen Yu)

    - PM tracing support for the suspend phase of system suspend/resume
    transitions (Zhonghui Fu)

    - Configurable delay for the system suspend/resume testing facility
    (Brian Norris)

    - PNP subsystem cleanups (Peter Huewe, Rafael J Wysocki)"

    * tag 'pm+acpi-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (74 commits)
    ACPI / scan: Fix NULL pointer dereference in acpi_companion_match()
    ACPI / scan: Rework modalias creation when "compatible" is present
    intel_idle: mark cpu id array as __initconst
    powercap / RAPL: mark rapl_ids array as __initconst
    powercap / RAPL: add ID for Broadwell server
    intel_pstate: Knights Landing support
    intel_pstate: remove MSR test
    cpufreq: fix qoriq uniprocessor build
    ACPI / scan: Take the PRP0001 position in the list of IDs into account
    ACPI / scan: Simplify acpi_match_device()
    ACPI / scan: Generalize of_compatible matching
    device property: Introduce firmware node type for platform data
    device property: Make it possible to use secondary firmware nodes
    PM / watchdog: iTCO: stop watchdog during system suspend
    cpufreq: hisilicon: add acpu driver
    ACPI / EC: Call acpi_walk_dep_device_list() after installing EC opregion handler
    cpufreq: powernv: Report cpu frequency throttling
    intel_idle: Add support for the Airmont Core in the Cherrytrail and Braswell SOCs
    intel_idle: Update support for Silvermont Core in Baytrail SOC
    PM / devfreq: tegra: Register governor on module init
    ...

    Linus Torvalds
     
  • Pull MFD updates from Lee Jones:
    "Changes to existing drivers:

    - Rename child driver [axp288_battery => axp288_fuel_gauge]; axp20x
    - Rename child driver [max77693-flash => max77693-led]; max77693
    - Error handling fixes; intel_soc_pmic
    - GPIO tweaking; intel_soc_pmic
    - Remove non-DT code; vexpress-sysreg, tc3589x
    - Remove unused/legacy code; ti_am335x_tscadc, rts5249, rtsx_gops, rtsx_pcr,
    rtc-s5m, sec-core, max77693, menelaus,
    wm5102-tables
    - Trivial fixups; rtsx_pci, da9150-core, sec-core, max7769, max77693,
    mc13xxx-core, dln2, hi6421-pmic-core, rk808, twl4030-power,
    lpc_ich, menelaus, twl6040
    - Update register/address values; rts5227, rts5249
    - DT and/or binding document fixups; arizona, da9150, mt6397, axp20x,
    qcom-rpm, qcom-spmi-pmic
    - Couple of trivial core Kconfig fixups
    - Remove use of seq_printf return value; ab8500-debugfs
    - Remove __exit markups; menelaus, tps65010
    - Fix platform-device name collisions; mfd-core

    New drivers/supported devices:

    - Add support for wm8280/wm8281 into arizona
    - Add support for COMe-cBL6 into kempld-core
    - Add support for rts524a and rts525a into rts5249
    - Add support for ipq8064 into qcom_rpm
    - Add support for extcon into axp20x
    - New MediaTek MT6397 PMIC driver
    - New Maxim MAX77843 PMIC dirver
    - New Intel Quark X1000 I2C-GPIO driver
    - New Skyworks SKY81452 driver"

    * tag 'mfd-for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (76 commits)
    mfd: sec: Fix RTC alarm interrupt number on S2MPS11
    mfd: wm5102: Remove registers for output 3R from readable list
    mfd: tps65010: Remove incorrect __exit markups
    mfd: devicetree: bindings: Add Qualcomm RPM regulator subnodes
    mfd: axp20x: Add support for extcon cell
    mfd: lpc_ich: Sort IDs
    mfd: twl6040: Remove wrong and unneeded "platform:twl6040" modalias
    mfd: qcom-spmi-pmic: Add specific compatible strings for Qualcomm's SPMI PMIC's
    mfd: axp20x: Fix duplicate const for model names
    mfd: menelaus: Use macro for magic number
    mfd: menelaus: Drop support for SW controller VCORE
    mfd: menelaus: Delete omap_has_menelaus
    mfd: arizona: Correct type of gpio_defaults
    mfd: lpc_ich: Sort IDs
    mfd: Fix a typo in Kconfig
    mfd: qcom_rpm: Add support for IPQ8064
    mfd: devicetree: qcom_rpm: Document IPQ8064 resources
    mfd: core: Fix platform-device name collisions
    mfd: intel_quark_i2c_gpio: Don't crash if !DMI
    dt-bindings: Add vendor-prefix for X-Powers
    ...

    Linus Torvalds
     

13 Apr, 2015

1 commit

  • * device-properties:
    device property: Introduce firmware node type for platform data
    device property: Make it possible to use secondary firmware nodes
    driver core: Implement device property accessors through fwnode ones
    driver core: property: Update fwnode_property_read_string_array()
    driver core: Add comments about returning array counts
    ACPI: Introduce has_acpi_companion()
    driver core / ACPI: Represent ACPI companions using fwnode_handle

    Rafael J. Wysocki
     

10 Apr, 2015

1 commit


09 Apr, 2015

1 commit

  • The Synopsys DesignWare DWAPB GPIO block is popular to
    synthesize amongst many architectures: X86, ARM, ARC.
    The driver was restricted to only these archs due to
    using [read|write]l_relaxed() accessors that were not
    universally available in the past,
    but as of commit 9439eb3ab9d1ece6e4ad7baaa4a7f534f9b9dab0
    "asm-generic: io: implement relaxed accessor macros as
    conditional wrappers" these accessors are available on all
    archs so this should not be a problem any more. Enable the
    driver for all archs.

    Cc: Alexey Brodkin
    Cc: Will Deacon
    Signed-off-by: Linus Walleij

    Linus Walleij
     

08 Apr, 2015

18 commits


07 Apr, 2015

1 commit


28 Mar, 2015

1 commit

  • This driver is orphaned now that mach-msm has been removed.
    Delete it.

    Cc: David Brown
    Cc: Bryan Huntsman
    Cc: Daniel Walker
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Signed-off-by: Stephen Boyd
    Acked-by: Linus Walleij
    Signed-off-by: Kumar Gala

    Stephen Boyd
     

27 Mar, 2015

4 commits

  • Even if bus is not hot-pluggable, the devices can be unbound from the
    driver via sysfs, so we should not be using __exit annotations on
    remove() methods. The only exception is drivers registered with
    platform_driver_probe() which specifically disables sysfs bind/unbind
    attributes.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Linus Walleij

    Dmitry Torokhov
     
  • Now GPIO syscon driver produces bunch of warnings during the
    boot of Kesytone 2 SoCs:
    gpio-syscon soc:keystone_dsp_gpio@02620240: can't read the dir register offset!
    gpio-syscon soc:keystone_dsp_gpio@2620244: can't read the dir register offset!

    This message unintentionally was added using dev_err(), but its
    actual log level is debug, because third cell of "ti,syscon-dev" is
    optional.

    Hence change it to dev_dbg() as it should be.

    This patch fixes commit:
    5a3e3f8 ("gpio: syscon: retriave syscon node and regs offsets from dt")

    Reported-by: Russell King
    Tested-by: Murali Karicheri
    Acked-by: Santosh Shilimkar
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Linus Walleij

    Grygorii Strashko
     
  • Now OMAP GPIO driver prepared for GPIO_INDEX() macro removing.
    Do It ;)

    Tested-by: Tony Lindgren
    Tested-by: Aaro Koskinen
    Acked-by: Santosh Shilimkar
    Acked-by: Javier Martinez Canillas
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Linus Walleij

    Grygorii Strashko
     
  • Now OMAP GPIO driver prepared for omap_irq_to_gpio() removing.
    Do it ;)

    Tested-by: Tony Lindgren
    Tested-by: Aaro Koskinen
    Acked-by: Santosh Shilimkar
    Acked-by: Javier Martinez Canillas
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Linus Walleij

    Grygorii Strashko