25 Apr, 2014

1 commit

  • Currently we get the following kind of errors if we try to use interrupt
    phandles to irqchips that have not yet initialized:

    irq: no irq domain found for /ocp/pinmux@48002030 !
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1 at drivers/of/platform.c:171 of_device_alloc+0x144/0x184()
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.0-00038-g42a9708 #1012
    (show_stack+0x14/0x1c)
    (dump_stack+0x6c/0xa0)
    (warn_slowpath_common+0x64/0x84)
    (warn_slowpath_null+0x1c/0x24)
    (of_device_alloc+0x144/0x184)
    (of_platform_device_create_pdata+0x44/0x9c)
    (of_platform_bus_create+0xd0/0x170)
    (of_platform_bus_create+0x12c/0x170)
    (of_platform_populate+0x60/0x98)

    This is because we're wrongly trying to populate resources that are not
    yet available. It's perfectly valid to create irqchips dynamically, so
    let's fix up the issue by resolving the interrupt resources when
    platform_get_irq is called.

    And then we also need to accept the fact that some irqdomains do not
    exist that early on, and only get initialized later on. So we can
    make the current WARN_ON into just into a pr_debug().

    We still attempt to populate irq resources when we create the devices.
    This allows current drivers which don't use platform_get_irq to continue
    to function. Once all drivers are fixed, this code can be removed.

    Suggested-by: Russell King
    Signed-off-by: Rob Herring
    Signed-off-by: Tony Lindgren
    Tested-by: Tony Lindgren
    Cc: stable@vger.kernel.org # v3.10+
    Signed-off-by: Grant Likely

    Rob Herring
     

15 Feb, 2014

1 commit

  • The acpi_dev_pm_attach/_detach functions perform their own checks to
    ensure the device has an ACPI companion. It is not necessary for the
    caller to do so.

    This mirrors what other busses with ACPI dev PM support do (i2c, spi,
    sdio).

    Cc: Len Brown
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Josh Cartwright
    Signed-off-by: Greg Kroah-Hartman

    Josh Cartwright
     

17 Jan, 2014

2 commits

  • Fix a problem that, the platform bus supports the OF style modalias
    in .uevent() call, but not in its device 'modalias' sysfs attribute.

    Signed-off-by: Zhang Rui
    Acked-by: Rob Herring
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     
  • ACPI enumerated devices has ACPI style _HID and _CID strings,
    all of these strings can be used for both driver loading and matching.

    Currently, in Platform, I2C and SPI bus, the ACPI style driver matching
    is supported by invoking acpi_driver_match_device() in bus .match() callback.
    But, the module autoloading is still broken.

    For example, there is any ACPI device with _HID "INTABCD" that is
    enumerated to platform bus, and we have a driver that can probe it.

    The driver exports its module_alias as "acpi:INTABCD" use the following code
    static const struct acpi_device_id xxx_acpi_match[] = {
    { "INTABCD", 0 },
    { }
    };
    MODULE_DEVICE_TABLE(acpi, xxx_acpi_match);

    But, unfortunately, the device' modalias is shown as "platform:INTABCD:00",
    please refer to modalias_show() and platform_uevent() in
    drivers/base/platform.c.
    This results in that the driver will not be loaded automatically when the
    device node is created, because their modalias do not match.

    This also applies to I2C and SPI bus.

    With this patch, the device' modalias will be shown as "acpi:INTABCD" as well.

    Signed-off-by: Zhang Rui
    Acked-by: Mark Brown
    Acked-by: Wolfram Sang
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

15 Nov, 2013

1 commit

  • Modify struct acpi_dev_node to contain a pointer to struct acpi_device
    associated with the given device object (that is, its ACPI companion
    device) instead of an ACPI handle corresponding to it. Introduce two
    new macros for manipulating that pointer in a CONFIG_ACPI-safe way,
    ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the
    ACPI_HANDLE() macro to take the above changes into account.
    Drop the ACPI_HANDLE_SET() macro entirely and rework its users to
    use ACPI_COMPANION_SET() instead. For some of them who used to
    pass the result of acpi_get_child() directly to ACPI_HANDLE_SET()
    introduce a helper routine acpi_preset_companion() doing an
    equivalent thing.

    The main motivation for doing this is that there are things
    represented by struct acpi_device objects that don't have valid
    ACPI handles (so called fixed ACPI hardware features, such as
    power and sleep buttons) and we would like to create platform
    device objects for them and "glue" them to their ACPI companions
    in the usual way (which currently is impossible due to the
    lack of valid ACPI handles). However, there are more reasons
    why it may be useful.

    First, struct acpi_device pointers allow of much better type checking
    than void pointers which are ACPI handles, so it should be more
    difficult to write buggy code using modified struct acpi_dev_node
    and the new macros. Second, the change should help to reduce (over
    time) the number of places in which the result of ACPI_HANDLE() is
    passed to acpi_bus_get_device() in order to obtain a pointer to the
    struct acpi_device associated with the given "physical" device,
    because now that pointer is returned by ACPI_COMPANION() directly.
    Finally, the change should make it easier to write generic code that
    will build both for CONFIG_ACPI set and unset without adding explicit
    compiler directives to it.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Tested-by: Mika Westerberg # on Haswell
    Reviewed-by: Mika Westerberg
    Reviewed-by: Aaron Lu # for ATA and SDIO part

    Rafael J. Wysocki
     

27 Sep, 2013

1 commit

  • Prevent drivers relying on platform_driver_probe from requesting
    deferred probing in order to avoid further futile probe attempts (either
    the driver has been unregistered or its probe function has been set to
    platform_drv_probe_fail when probing is retried).

    Note that several platform drivers currently return subsystem errors
    from probe and that these can include -EPROBE_DEFER (e.g. if a gpio
    request fails).

    Add a warning to platform_drv_probe that can be used to catch drivers
    that inadvertently request probe deferral while using
    platform_driver_probe.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     

24 Aug, 2013

1 commit


20 Aug, 2013

1 commit


17 Jul, 2013

1 commit


05 Jul, 2013

1 commit

  • Pull device tree updates from Grant Likely:
    "This branch contains the following changes:
    - Removal of CONFIG_OF_DEVICE, it is always enabled by CONFIG_OF
    - Remove #ifdef from linux/of_platform.h to increase compiler syntax
    coverage
    - Bug fix for address decoding on Bimini and js2x powerpc platforms.
    - miscellaneous binding changes

    One note on the above. The binding changes going in from all kinds of
    different trees has gotten rather out of hand. I picked up some
    during this cycle, but even going though my tree isn't a great fit.

    Ian Campbell has prototyped splitting the bindings and .dtb files into
    a separate repository. The plan is to migrate to using that sometime
    in the next few kernel releases which should get rid of a lot of the
    churn on binding docs and .dts files"

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
    of: Fix address decoding on Bimini and js2x machines
    of: remove CONFIG_OF_DEVICE
    usb: chipidea: depend on CONFIG_OF instead of CONFIG_OF_DEVICE
    of: remove of_platform_driver
    ibmebus: convert of_platform_driver to platform_driver
    driver core: move to_platform_driver to platform_device.h
    mfd: DT bindings for the palmas family MFD
    ARM: dts: omap3-devkit8000: fix NAND memory binding
    of/base: fix typos
    of: remove #ifdef from linux/of_platform.h

    Linus Torvalds
     

04 Jul, 2013

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "This time the total number of ACPI commits is slightly greater than
    the number of cpufreq commits, but Viresh Kumar (who works on cpufreq)
    remains the most active patch submitter.

    To me, the most significant change is the addition of offline/online
    device operations to the driver core (with the Greg's blessing) and
    the related modifications of the ACPI core hotplug code. Next are the
    freezer updates from Colin Cross that should make the freezing of
    tasks a bit less heavy weight.

    We also have a couple of regression fixes, a number of fixes for
    issues that have not been identified as regressions, two new drivers
    and a bunch of cleanups all over.

    Highlights:

    - Hotplug changes to support graceful hot-removal failures.

    It sometimes is necessary to fail device hot-removal operations
    gracefully if they cannot be carried out completely. For example,
    if memory from a memory module being hot-removed has been allocated
    for the kernel's own use and cannot be moved elsewhere, it's
    desirable to fail the hot-removal operation in a graceful way
    rather than to crash the kernel, but currenty a success or a kernel
    crash are the only possible outcomes of an attempted memory
    hot-removal. Needless to say, that is not a very attractive
    alternative and it had to be addressed.

    However, in order to make it work for memory, I first had to make
    it work for CPUs and for this purpose I needed to modify the ACPI
    processor driver. It's been split into two parts, a resident one
    handling the low-level initialization/cleanup and a modular one
    playing the actual driver's role (but it binds to the CPU system
    device objects rather than to the ACPI device objects representing
    processors). That's been sort of like a live brain surgery on a
    patient who's riding a bike.

    So this is a little scary, but since we found and fixed a couple of
    regressions it caused to happen during the early linux-next testing
    (a month ago), nobody has complained.

    As a bonus we remove some duplicated ACPI hotplug code, because the
    ACPI-based CPU hotplug is now going to use the common ACPI hotplug
    code.

    - Lighter weight freezing of tasks.

    These changes from Colin Cross and Mandeep Singh Baines are
    targeted at making the freezing of tasks a bit less heavy weight
    operation. They reduce the number of tasks woken up every time
    during the freezing, by using the observation that the freezer
    simply doesn't need to wake up some of them and wait for them all
    to call refrigerator(). The time needed for the freezer to decide
    to report a failure is reduced too.

    Also reintroduced is the check causing a lockdep warining to
    trigger when try_to_freeze() is called with locks held (which is
    generally unsafe and shouldn't happen).

    - cpufreq updates

    First off, a commit from Srivatsa S Bhat fixes a resume regression
    introduced during the 3.10 cycle causing some cpufreq sysfs
    attributes to return wrong values to user space after resume. The
    fix is kind of fresh, but also it's pretty obvious once Srivatsa
    has identified the root cause.

    Second, we have a new freqdomain_cpus sysfs attribute for the
    acpi-cpufreq driver to provide information previously available via
    related_cpus. From Lan Tianyu.

    Finally, we fix a number of issues, mostly related to the
    CPUFREQ_POSTCHANGE notifier and cpufreq Kconfig options and clean
    up some code. The majority of changes from Viresh Kumar with bits
    from Jacob Shin, Heiko Stübner, Xiaoguang Chen, Ezequiel Garcia,
    Arnd Bergmann, and Tang Yuantian.

    - ACPICA update

    A usual bunch of updates from the ACPICA upstream.

    During the 3.4 cycle we introduced support for ACPI 5 extended
    sleep registers, but they are only supposed to be used if the
    HW-reduced mode bit is set in the FADT flags and the code attempted
    to use them without checking that bit. That caused suspend/resume
    regressions to happen on some systems. Fix from Lv Zheng causes
    those registers to be used only if the HW-reduced mode bit is set.

    Apart from this some other ACPICA bugs are fixed and code cleanups
    are made by Bob Moore, Tomasz Nowicki, Lv Zheng, Chao Guan, and
    Zhang Rui.

    - cpuidle updates

    New driver for Xilinx Zynq processors is added by Michal Simek.

    Multidriver support simplification, addition of some missing
    kerneldoc comments and Kconfig-related fixes come from Daniel
    Lezcano.

    - ACPI power management updates

    Changes to make suspend/resume work correctly in Xen guests from
    Konrad Rzeszutek Wilk, sparse warning fix from Fengguang Wu and
    cleanups and fixes of the ACPI device power state selection
    routine.

    - ACPI documentation updates

    Some previously missing pieces of ACPI documentation are added by
    Lv Zheng and Aaron Lu (hopefully, that will help people to
    uderstand how the ACPI subsystem works) and one outdated doc is
    updated by Hanjun Guo.

    - Assorted ACPI updates

    We finally nailed down the IA-64 issue that was the reason for
    reverting commit 9f29ab11ddbf ("ACPI / scan: do not match drivers
    against objects having scan handlers"), so we can fix it and move
    the ACPI scan handler check added to the ACPI video driver back to
    the core.

    A mechanism for adding CMOS RTC address space handlers is
    introduced by Lan Tianyu to allow some EC-related breakage to be
    fixed on some systems.

    A spec-compliant implementation of acpi_os_get_timer() is added by
    Mika Westerberg.

    The evaluation of _STA is added to do_acpi_find_child() to avoid
    situations in which a pointer to a disabled device object is
    returned instead of an enabled one with the same _ADR value. From
    Jeff Wu.

    Intel BayTrail PCH (Platform Controller Hub) support is added to
    the ACPI driver for Intel Low-Power Subsystems (LPSS) and that
    driver is modified to work around a couple of known BIOS issues.
    Changes from Mika Westerberg and Heikki Krogerus.

    The EC driver is fixed by Vasiliy Kulikov to use get_user() and
    put_user() instead of dereferencing user space pointers blindly.

    Code cleanups are made by Bjorn Helgaas, Nicholas Mazzuca and Toshi
    Kani.

    - Assorted power management updates

    The "runtime idle" helper routine is changed to take the return
    values of the callbacks executed by it into account and to call
    rpm_suspend() if they return 0, which allows us to reduce the
    overall code bloat a bit (by dropping some code that's not
    necessary any more after that modification).

    The runtime PM documentation is updated by Alan Stern (to reflect
    the "runtime idle" behavior change).

    New trace points for PM QoS are added by Sahara
    ().

    PM QoS documentation is updated by Lan Tianyu.

    Code cleanups are made and minor issues are addressed by Bernie
    Thompson, Bjorn Helgaas, Julius Werner, and Shuah Khan.

    - devfreq updates

    New driver for the Exynos5-bus device from Abhilash Kesavan.

    Minor cleanups, fixes and MAINTAINERS update from MyungJoo Ham,
    Abhilash Kesavan, Paul Bolle, Rajagopal Venkat, and Wei Yongjun.

    - OMAP power management updates

    Adaptive Voltage Scaling (AVS) SmartReflex voltage control driver
    updates from Andrii Tseglytskyi and Nishanth Menon."

    * tag 'pm+acpi-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits)
    cpufreq: Fix cpufreq regression after suspend/resume
    ACPI / PM: Fix possible NULL pointer deref in acpi_pm_device_sleep_state()
    PM / Sleep: Warn about system time after resume with pm_trace
    cpufreq: don't leave stale policy pointer in cdbs->cur_policy
    acpi-cpufreq: Add new sysfs attribute freqdomain_cpus
    cpufreq: make sure frequency transitions are serialized
    ACPI: implement acpi_os_get_timer() according the spec
    ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan
    ACPI: Add CMOS RTC Operation Region handler support
    ACPI / processor: Drop unused variable from processor_perflib.c
    cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
    cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases
    ...

    Linus Torvalds
     

12 Jun, 2013

1 commit


04 Jun, 2013

2 commits

  • I found a lot of mistakes using struct platform_driver without owner
    so I make a macro instead of the function platform_driver_register.
    It can set owner in it, then guys don`t care about module owner again.

    Signed-off-by: Libo Chen
    Signed-off-by: Greg Kroah-Hartman

    Libo Chen
     
  • The "runtime idle" helper routine, rpm_idle(), currently ignores
    return values from .runtime_idle() callbacks executed by it.
    However, it turns out that many subsystems use
    pm_generic_runtime_idle() which checks the return value of the
    driver's callback and executes pm_runtime_suspend() for the device
    unless that value is not 0. If that logic is moved to rpm_idle()
    instead, pm_generic_runtime_idle() can be dropped and its users
    will not need any .runtime_idle() callbacks any more.

    Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle()
    routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and
    ata_port_runtime_idle(), respectively, as well as a few drivers'
    ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has
    been returned by the .runtime_idle() callback executed by it.

    To reduce overall code bloat, make the changes described above.

    Tested-by: Mika Westerberg
    Tested-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Kevin Hilman
    Reviewed-by: Ulf Hansson
    Acked-by: Alan Stern

    Rafael J. Wysocki
     

30 Mar, 2013

2 commits


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
     

27 Nov, 2012

1 commit

  • Drivers usually expect that the devices they are supposed to handle
    will be operational when their .probe() routines are called, but that
    need not be the case on some ACPI-based systems with ACPI-based
    device enumeration where the BIOSes don't put devices into D0 by
    default. To work around this problem it is sufficient to change
    bus type .probe() routines to ensure that devices will be powered
    on before the drivers' .probe() routines run (and their .remove()
    and .shutdown() routines accordingly).

    Modify platform_drv_probe() to run acpi_dev_pm_attach() for devices
    whose ACPI handles are present, so that ACPI power management is used
    to change their power states. Analogously, modify
    platform_drv_remove() and platform_drv_shutdown() to call
    acpi_dev_pm_detach() for those devices, so that they are not subject
    to ACPI PM any more.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Reviewed-by: Mika Westerberg
    Tested-by: Mika Westerberg

    Rafael J. Wysocki
     

21 Nov, 2012

1 commit

  • The current platform device creation and registration code in
    acpi_create_platform_device() is quite convoluted. This function
    takes an ACPI device node as an argument and eventually calls
    platform_device_register_resndata() to create and register a
    platform device object on the basis of the information contained
    in that code. However, it doesn't associate the new platform
    device with the ACPI node directly, but instead it relies on
    acpi_platform_notify(), called from within device_add(), to find
    that ACPI node again with the help of acpi_platform_find_device()
    and acpi_platform_match() and then attach the new platform device
    to it. This causes an additional ACPI namespace walk to happen and
    is clearly suboptimal.

    Use the observation that it is now possible to initialize the ACPI
    handle of a device before calling device_add() for it to make this
    code more straightforward. Namely, add a new field to struct
    platform_device_info allowing us to pass the ACPI handle of interest
    to platform_device_register_full(), which will then use it to
    initialize the new device's ACPI handle before registering it.
    This will cause acpi_platform_notify() to use the ACPI handle from
    the device structure directly instead of using the .find_device()
    routine provided by the device's bus type. In consequence,
    acpi_platform_bus, acpi_platform_find_device(), and
    acpi_platform_match() are not necessary any more, so remove them.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mika Westerberg
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

16 Nov, 2012

1 commit


15 Nov, 2012

2 commits

  • With ACPI 5 it is now possible to enumerate traditional SoC
    peripherals, like serial bus controllers and slave devices behind
    them. These devices are typically based on IP-blocks used in many
    existing SoC platforms and platform drivers for them may already
    be present in the kernel tree.

    To make driver "porting" more straightforward, add ACPI support to
    the platform bus type. Instead of writing ACPI "glue" drivers for
    the existing platform drivers, register the platform bus type with
    ACPI to create platform device objects for the drivers and bind the
    corresponding ACPI handles to those platform devices.

    This should allow us to reuse the existing platform drivers for the
    devices in question with the minimum amount of modifications.

    This changeset is based on Mika Westerberg's and Mathias Nyman's
    work.

    Signed-off-by: Mathias Nyman
    Signed-off-by: Mika Westerberg
    Acked-by: Greg Kroah-Hartman
    Acked-by: H. Peter Anvin
    Acked-by: Tony Luck
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     
  • Greg Kroah-Hartman
     

10 Nov, 2012

1 commit

  • This adds sparc support for platform_get_irq that in the normal case use
    platform_get_resource() to get an irq. This standard approach fails for sparc as
    there are no resources of type IORESOURCE_IRQ for irqs for sparc.

    Cross platform drivers can then use this standard platform function and work on
    sparc instead of having to have a special case for sparc.

    Signed-off-by: Andreas Larsson
    Signed-off-by: David S. Miller

    Andreas Larsson
     

31 Oct, 2012

1 commit


03 Oct, 2012

1 commit

  • Pull power management updates from Rafael J Wysocki:

    - Improved system suspend/resume and runtime PM handling for the SH
    TMU, CMT and MTU2 clock event devices (also used by ARM/shmobile).

    - Generic PM domains framework extensions related to cpuidle support
    and domain objects lookup using names.

    - ARM/shmobile power management updates including improved support for
    the SH7372's A4S power domain containing the CPU core.

    - cpufreq changes related to AMD CPUs support from Matthew Garrett,
    Andre Przywara and Borislav Petkov.

    - cpu0 cpufreq driver from Shawn Guo.

    - cpufreq governor fixes related to the relaxing of limit from Michal
    Pecio.

    - OMAP cpufreq updates from Axel Lin and Richard Zhao.

    - cpuidle ladder governor fixes related to the disabling of states from
    Carsten Emde and me.

    - Runtime PM core updates related to the interactions with the system
    suspend core from Alan Stern and Kevin Hilman.

    - Wakeup sources modification allowing more helper functions to be
    called from interrupt context from John Stultz and additional
    diagnostic code from Todd Poynor.

    - System suspend error code path fix from Feng Hong.

    Fixed up conflicts in cpufreq/powernow-k8 that stemmed from the
    workqueue fixes conflicting fairly badly with the removal of support for
    hardware P-state chips. The changes were independent but somewhat
    intertwined.

    * tag 'pm-for-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
    Revert "PM QoS: Use spinlock in the per-device PM QoS constraints code"
    PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled, v2
    cpuidle: rename function name "__cpuidle_register_driver", v2
    cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
    cpuidle: remove some empty lines
    PM: Prevent runtime suspend during system resume
    PM QoS: Use spinlock in the per-device PM QoS constraints code
    PM / Sleep: use resume event when call dpm_resume_early
    cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure
    ACPI / processor: remove pointless variable initialization
    ACPI / processor: remove unused function parameter
    cpufreq: OMAP: remove loops_per_jiffy recalculate for smp
    sections: fix section conflicts in drivers/cpufreq
    cpufreq: conservative: update frequency when limits are relaxed
    cpufreq / ondemand: update frequency when limits are relaxed
    properly __init-annotate pm_sysrq_init()
    cpufreq: Add a generic cpufreq-cpu0 driver
    PM / OPP: Initialize OPP table from device tree
    ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp
    cpufreq: Remove support for hardware P-state chips from powernow-k8
    ...

    Linus Torvalds
     

07 Sep, 2012

1 commit


04 Sep, 2012

1 commit

  • Runtime PM helper functions, like pm_runtime_get_sync(), cannot be
    called by early platform device drivers, because the devices' power
    management locks are not initialized at that time. This is quite
    inconvenient, so modify early_platform_add_devices() to initialize
    the devices power management locks as appropriate and make sure that
    they won't be initialized more than once if an early platform
    device is going to be used as a regular one later.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

17 Aug, 2012

1 commit

  • Right now we have support for explicit platform device IDs, as well as
    ID-less platform devices when a given device type can only have one
    instance. However there are cases where multiple instances of a device
    type can exist, and their IDs aren't (and can't be) known in advance
    and do not matter. In that case we need automatic device IDs to avoid
    device name collisions.

    I am using magic ID value -2 (PLATFORM_DEVID_AUTO) for this, similar
    to -1 for ID-less devices. The automatically allocated device IDs are
    global (to avoid an additional per-driver cost.) We keep note that the
    ID was automatically allocated so that it can be freed later.

    Note that we also restore the ID to PLATFORM_DEVID_AUTO on error and
    device deletion, to avoid avoid unexpected behavior on retry. I don't
    really expect retries on platform device addition, but better safe
    than sorry.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     

02 Feb, 2012

1 commit

  • When userspace needs to find a specific device, it currently isn't easy to
    resolve a /sys/devices/ path from a specific device tree node. Nor is it
    easy to obtain the compatible list for devices.

    This patch generalizes the code that inserts OF_* values into the uevent
    device attribute so that any device that is attached to an OF node will
    have that information exported to userspace. Without this patch only
    platform devices and some powerpc-specific busses have access to this
    data.

    The original function also creates a MODALIAS property for the compatible
    list, but that code has not been generalized into the common case because
    it has the potential to break module loading on a lot of bus types. Bus
    types are still responsible for their own MODALIAS properties.

    Boot tested on ARM and compile tested on PowerPC and SPARC.

    Signed-off-by: Grant Likely
    Acked-by: Greg Kroah-Hartman
    Cc: Tobias Klauser
    Cc: Frederic Lambert
    Cc: Rob Herring
    Cc: Mark Brown
    Cc: "David S. Miller"
    Cc: Benjamin Herrenschmidt

    Grant Likely
     

09 Jan, 2012

1 commit

  • * 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
    PM / Hibernate: Implement compat_ioctl for /dev/snapshot
    PM / Freezer: fix return value of freezable_schedule_timeout_killable()
    PM / shmobile: Allow the A4R domain to be turned off at run time
    PM / input / touchscreen: Make st1232 use device PM QoS constraints
    PM / QoS: Introduce dev_pm_qos_add_ancestor_request()
    PM / shmobile: Remove the stay_on flag from SH7372's PM domains
    PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume
    PM / shmobile: Add support for the sh7372 A4S power domain / sleep mode
    PM: Drop generic_subsys_pm_ops
    PM / Sleep: Remove forward-only callbacks from AMBA bus type
    PM / Sleep: Remove forward-only callbacks from platform bus type
    PM: Run the driver callback directly if the subsystem one is not there
    PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers
    PM/Devfreq: Add Exynos4-bus device DVFS driver for Exynos4210/4212/4412.
    PM / Sleep: Merge internal functions in generic_ops.c
    PM / Sleep: Simplify generic system suspend callbacks
    PM / Hibernate: Remove deprecated hibernation snapshot ioctls
    PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()
    ARM: S3C64XX: Implement basic power domain support
    PM / shmobile: Use common always on power domain governor
    ...

    Fix up trivial conflict in fs/xfs/xfs_buf.c due to removal of unused
    XBT_FORCE_SLEEP bit

    Linus Torvalds
     

22 Dec, 2011

1 commit


10 Dec, 2011

1 commit


25 Oct, 2011

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (38 commits)
    mm: memory hotplug: Check if pages are correctly reserved on a per-section basis
    Revert "memory hotplug: Correct page reservation checking"
    Update email address for stable patch submission
    dynamic_debug: fix undefined reference to `__netdev_printk'
    dynamic_debug: use a single printk() to emit messages
    dynamic_debug: remove num_enabled accounting
    dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions
    uio: Support physical addresses >32 bits on 32-bit systems
    sysfs: add unsigned long cast to prevent compile warning
    drivers: base: print rejected matches with DEBUG_DRIVER
    memory hotplug: Correct page reservation checking
    memory hotplug: Refuse to add unaligned memory regions
    remove the messy code file Documentation/zh_CN/SubmitChecklist
    ARM: mxc: convert device creation to use platform_device_register_full
    new helper to create platform devices with dma mask
    docs/driver-model: Update device class docs
    docs/driver-model: Document device.groups
    kobj_uevent: Ignore if some listeners cannot handle message
    dynamic_debug: make netif_dbg() call __netdev_printk()
    dynamic_debug: make netdev_dbg() call __netdev_printk()
    ...

    Linus Torvalds
     

27 Aug, 2011

1 commit

  • compared to the most powerful and already existing helper (namely
    platform_device_register_resndata) this allows to specify a dma_mask.
    To make eventual extensions later more easy, a struct holding the used
    information is created instead of passing the information by function
    parameters.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

23 Aug, 2011

1 commit

  • If id_entry is available then it is used. However if we remove first the
    driver followed by the device, then the id_entry is pointing to driver's
    memory which is long gone.
    Since id->name and plat->name are equal there is no point in
    distinguishing them.

    Cc: Grant Likely
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     

09 Aug, 2011

1 commit


08 Jul, 2011

1 commit

  • On some architectures we need to setup pdev_archdata before we add the
    device. Waiting til a bus_notifier is too late since we might need the
    pdev_archdata in the bus notifier. One example is setting up of dma_mask
    pointers such that it can be used in a bus_notifier.

    We add weak noop version of arch_setup_pdev_archdata() and allow the arch
    code to override with access the full definitions of struct device,
    struct platform_device, and struct pdev_archdata.

    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Kumar Gala

    Kumar Gala
     

08 Jun, 2011

1 commit

  • This reverts 737a3bb9416ce2a7c7a4 ("Driver core: move platform device
    creation helpers to .init.text (if MODULE=n)"). That patch assumed that
    platform_device_register_resndata() is only ever called from __init code
    but that isn't true in the case ioctl->drm_ioctl->radeon_cp_init().

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=35192

    Cc: Uwe Kleine-König
    Reported-by: Anthony Basile
    Cc: Greg KH
    Cc: David Airlie
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Andrew Morton
     

20 May, 2011

1 commit

  • …/gregkh/driver-core-2.6

    * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (44 commits)
    debugfs: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
    sysfs: remove "last sysfs file:" line from the oops messages
    drivers/base/memory.c: fix warning due to "memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION"
    memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION
    SYSFS: Fix erroneous comments for sysfs_update_group().
    driver core: remove the driver-model structures from the documentation
    driver core: Add the device driver-model structures to kerneldoc
    Translated Documentation/email-clients.txt
    RAW driver: Remove call to kobject_put().
    reboot: disable usermodehelper to prevent fs access
    efivars: prevent oops on unload when efi is not enabled
    Allow setting of number of raw devices as a module parameter
    Introduce CONFIG_GOOGLE_FIRMWARE
    driver: Google Memory Console
    driver: Google EFI SMI
    x86: Better comments for get_bios_ebda()
    x86: get_bios_ebda_length()
    misc: fix ti-st build issues
    params.c: Use new strtobool function to process boolean inputs
    debugfs: move to new strtobool
    ...

    Fix up trivial conflicts in fs/debugfs/file.c due to the same patch
    being applied twice, and an unrelated cleanup nearby.

    Linus Torvalds
     

17 May, 2011

1 commit