30 Apr, 2014

1 commit


11 Apr, 2014

1 commit

  • Pull thermal management updates from Zhang Rui:
    "We only have a couple of fixes/cleanups for platform thermal drivers
    this time.

    Specifics:

    - rcar thermal driver: avoid updating the thermal zone in case an IRQ
    was triggered but the temperature didn't effectively change. From
    Patrick Titiano.

    - update the imx thermal driver' formula of converting thermal
    sensor' raw date to real temperature in degree C. From Anson
    Huang.

    - trivial code cleanups of ti soc thermal and rcar thermal driver
    from Jingoo Han and Patrick Titiano"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
    thermal: rcar-thermal: update thermal zone only when temperature changes
    thermal: rcar-thermal: fix same mask applied twice
    thermal: ti-soc-thermal: Use SIMPLE_DEV_PM_OPS macro
    thermal: imx: update formula for thermal sensor

    Linus Torvalds
     

08 Apr, 2014

5 commits

  • Avoid updating the thermal zone in case an IRQ was triggered but the
    temperature didn't effectively change.
    Note this is not a driver issue.
    Below is a captured debug trace illustrating the purpose of this patch:
    out of 8 thermal zone updates, only 2 are actually necessary.

    [ 41.120000] rcar_thermal_work(): cctemp=25000
    [ 41.120000] rcar_thermal_work(): nctemp=30000
    [ 41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
    [ 58.990000] rcar_thermal_work(): cctemp=30000
    [ 58.990000] rcar_thermal_work(): nctemp=30000
    [ 58.990000] rcar_thermal_work(): same temp, do not update thermal zone
    [ 59.290000] rcar_thermal_work(): cctemp=30000
    [ 59.290000] rcar_thermal_work(): nctemp=30000
    [ 59.290000] rcar_thermal_work(): same temp, do not update thermal zone
    [ 59.590000] rcar_thermal_work(): cctemp=30000
    [ 59.590000] rcar_thermal_work(): nctemp=30000
    [ 59.590000] rcar_thermal_work(): same temp, do not update thermal zone
    [ 59.890000] rcar_thermal_work(): cctemp=30000
    [ 59.890000] rcar_thermal_work(): nctemp=30000
    [ 59.890000] rcar_thermal_work(): same temp, do not update thermal zone
    [ 60.190000] rcar_thermal_work(): cctemp=30000
    [ 60.190000] rcar_thermal_work(): nctemp=30000
    [ 60.190000] rcar_thermal_work(): same temp, do not update thermal zone
    [ 60.490000] rcar_thermal_work(): cctemp=30000
    [ 60.490000] rcar_thermal_work(): nctemp=30000
    [ 60.490000] rcar_thermal_work(): same temp, do not update thermal zone
    [ 60.790000] rcar_thermal_work(): cctemp=30000
    [ 60.790000] rcar_thermal_work(): nctemp=35000
    [ 60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone

    I suspect this may be due to sensor sampling accuracy / fluctuation,
    but no formal proof.

    Signed-off-by: Patrick Titiano
    Acked-by: Kuninori Morimoto
    Signed-off-by: Zhang Rui

    Patrick Titiano
     
  • Mask is already applied preceding the if statement.
    Remove the second mask.

    Signed-off-by: Patrick Titiano
    Acked-by: Kuninori Morimoto
    Signed-off-by: Zhang Rui

    Patrick Titiano
     
  • Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Zhang Rui

    Jingoo Han
     
  • Thermal sensor used to need two calibration points which are
    in fuse map to get a slope for converting thermal sensor's raw
    data to real temperature in degree C. Due to the chip calibration
    limitation, hardware team provides an universal formula to get
    real temperature from internal thermal sensor raw data:

    Slope = 0.4297157 - (0.0015976 * 25C fuse);

    Update the formula, as there will be no hot point calibration
    data in fuse map from now on.

    Signed-off-by: Anson Huang
    Acked-by: Shawn Guo
    Signed-off-by: Zhang Rui

    Anson Huang
     
  • Pull CPU hotplug notifiers registration fixes from Rafael Wysocki:
    "The purpose of this single series of commits from Srivatsa S Bhat
    (with a small piece from Gautham R Shenoy) touching multiple
    subsystems that use CPU hotplug notifiers is to provide a way to
    register them that will not lead to deadlocks with CPU online/offline
    operations as described in the changelog of commit 93ae4f978ca7f ("CPU
    hotplug: Provide lockless versions of callback registration
    functions").

    The first three commits in the series introduce the API and document
    it and the rest simply goes through the users of CPU hotplug notifiers
    and converts them to using the new method"

    * tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits)
    net/iucv/iucv.c: Fix CPU hotplug callback registration
    net/core/flow.c: Fix CPU hotplug callback registration
    mm, zswap: Fix CPU hotplug callback registration
    mm, vmstat: Fix CPU hotplug callback registration
    profile: Fix CPU hotplug callback registration
    trace, ring-buffer: Fix CPU hotplug callback registration
    xen, balloon: Fix CPU hotplug callback registration
    hwmon, via-cputemp: Fix CPU hotplug callback registration
    hwmon, coretemp: Fix CPU hotplug callback registration
    thermal, x86-pkg-temp: Fix CPU hotplug callback registration
    octeon, watchdog: Fix CPU hotplug callback registration
    oprofile, nmi-timer: Fix CPU hotplug callback registration
    intel-idle: Fix CPU hotplug callback registration
    clocksource, dummy-timer: Fix CPU hotplug callback registration
    drivers/base/topology.c: Fix CPU hotplug callback registration
    acpi-cpufreq: Fix CPU hotplug callback registration
    zsmalloc: Fix CPU hotplug callback registration
    scsi, fcoe: Fix CPU hotplug callback registration
    scsi, bnx2fc: Fix CPU hotplug callback registration
    scsi, bnx2i: Fix CPU hotplug callback registration
    ...

    Linus Torvalds
     

06 Apr, 2014

1 commit

  • Pull ARM SoC driver changes from Arnd Bergmann:
    "These changes are mostly for ARM specific device drivers that either
    don't have an upstream maintainer, or that had the maintainer ask us
    to pick up the changes to avoid conflicts.

    A large chunk of this are clock drivers (bcm281xx, exynos, versatile,
    shmobile), aside from that, reset controllers for STi as well as a
    large rework of the Marvell Orion/EBU watchdog driver are notable"

    * tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits)
    Revert "dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac."
    Revert "net: stmmac: Add SOCFPGA glue driver"
    ARM: shmobile: r8a7791: Fix SCIFA3-5 clocks
    ARM: STi: Add reset controller support to mach-sti Kconfig
    drivers: reset: stih416: add softreset controller
    drivers: reset: stih415: add softreset controller
    drivers: reset: Reset controller driver for STiH416
    drivers: reset: Reset controller driver for STiH415
    drivers: reset: STi SoC system configuration reset controller support
    dts: socfpga: Add sysmgr node so the gmac can use to reference
    dts: socfpga: Add support for SD/MMC on the SOCFPGA platform
    reset: Add optional resets and stubs
    ARM: shmobile: r7s72100: fix bus clock calculation
    Power: Reset: Generalize qnap-poweroff to work on Synology devices.
    dts: socfpga: Update clock entry to support multiple parents
    ARM: socfpga: Update socfpga_defconfig
    dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac.
    net: stmmac: Add SOCFPGA glue driver
    watchdog: orion_wdt: Use %pa to print 'phys_addr_t'
    drivers: cci: Export CCI PMU revision
    ...

    Linus Torvalds
     

20 Mar, 2014

1 commit

  • Subsystems that want to register CPU hotplug callbacks, as well as perform
    initialization for the CPUs that are already online, often do it as shown
    below:

    get_online_cpus();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    register_cpu_notifier(&foobar_cpu_notifier);

    put_online_cpus();

    This is wrong, since it is prone to ABBA deadlocks involving the
    cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
    with CPU hotplug operations).

    Instead, the correct and race-free way of performing the callback
    registration is:

    cpu_notifier_register_begin();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    /* Note the use of the double underscored version of the API */
    __register_cpu_notifier(&foobar_cpu_notifier);

    cpu_notifier_register_done();

    Fix the thermal x86-pkg-temp code by using this latter form of callback
    registration.

    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Cc: Ingo Molnar
    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     

03 Mar, 2014

6 commits

  • This patch does a cleanup about the thermal zone govenor,
    setting and make the following rule.
    1. For thermal zone devices that are registered w/o tz->tzp,
    they can use the default thermal governor only.
    2. For thermal zone devices w/ governor name specified in
    tz->tzp->governor_name, we will use the default govenor
    if the governor specified is not available at the moment,
    and update tz->governor when the matched governor is registered.

    This also fixes a problem that OF registered thermal zones
    are running with no governor.

    Signed-off-by: Zhang Rui
    Acked-by: Javi Merino

    Zhang Rui
     
  • In initialization, if the cooling device is initialized at
    max cooling state, and the thermal zone temperature is below
    the first trip point, then the cooling state can't be updated
    to the right state, untill the first trip point be triggered.

    To fix this issue, allow first update of cooling device state
    during registration, initialized "updated" device field as
    "false" (instead of "true").

    Signed-off-by: Wei Ni
    Signed-off-by: Zhang Rui

    Ni Wade
     
  • Commit beeb5a1e (thermal: rcar-thermal: Enable driver compilation with COMPILE_TEST)
    broke build on archs wihout io memory.

    On archs like S390 or um this driver cannot build nor work.
    Make it depend on HAS_IOMEM to bypass build failures.

    drivers/thermal/rcar_thermal.c:404: undefined reference to `devm_ioremap_resource'
    drivers/thermal/rcar_thermal.c:426: undefined reference to `devm_ioremap_resource'

    Signed-off-by: Richard Weinberger
    Acked-by: Laurent Pinchart
    Acked-by: Kuninori Morimoto
    Signed-off-by: Zhang Rui

    Richard Weinberger
     
  • The thermal zone type should not include an instance number. Otherwise
    each zone is considered a different type and the thermal-to-hwmon
    bridge fails to group them all in a single hwmon device.

    I also changed the type to "x86_pkg_temp", because "pkg" was too
    generic, and other thermal drivers use an underscore, not a dash, as
    a separator. Or maybe "cpu_pkg_temp" would be better?

    Signed-off-by: Jean Delvare
    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Jean Delvare
     
  • The temperature value reported by x86_pkg_temp_thermal is already
    reported by the coretemp driver. So, do not expose this thermal zone
    as a hwmon device, because it would be redundant.

    Signed-off-by: Jean Delvare
    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Acked-by: Guenter Roeck
    Signed-off-by: Zhang Rui

    Jean Delvare
     
  • Signed-off-by: Zhang Rui

    Zhang Rui
     

25 Feb, 2014

1 commit

  • With the move of kirkwood into mach-mvebu, drivers Kconfig need
    tweeking to allow the kirkwood specific drivers to be built.

    Signed-off-by: Andrew Lunn
    Acked-by: Arnd Bergmann
    Acked-by: Mark Brown
    Acked-by: Kishon Vijay Abraham I
    Acked-by: Daniel Lezcano
    Acked-by: Viresh Kumar
    Tested-by: Jason Gunthorpe
    Cc: Viresh Kumar
    Cc: Rafael J. Wysocki
    Cc: Richard Purdie
    Cc: Bryan Wu
    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Signed-off-by: Jason Cooper

    Andrew Lunn
     

25 Jan, 2014

2 commits

  • Pull thermal management updates from Zhang Rui:
    "This time, the biggest change is the work of representing hardware
    thermal properties in device tree infrastructure.

    This work includes the introduction of a device tree bindings for
    describing the hardware thermal behavior and limits, and also a parser
    to read and interpret the data, and build thermal zones and thermal
    binding parameters. It also contains three examples on how to use the
    new representation on sensor devices, using three different drivers to
    accomplish it. One driver is in thermal subsystem, the TI SoC
    thermal, and the other two drivers are in hwmon subsystem.

    Actually, this would be the first step of the complete work because we
    still need to check other potential drivers to be converted and then
    validate the proposed API. But the reason why I include it in this
    pull request is that, first, this change does not hurt any others
    without using this approach, second, the principle and concept of this
    change would not break after converting the remaining drivers. BTW,
    as you can see, there are several points in this change that do not
    belong to thermal subsystem. Because it has been suggested by Guenter
    R that in such cases, it is recommended to send the complete series
    via one single subsystem.

    Specifics:

    - representing hardware thermal properties in device tree
    infrastructure

    - fix a regression that the imx thermal driver breaks system suspend.

    - introduce ACPI INT3403 thermal driver to retrieve temperature data
    from the INT3403 ACPI device object present on some systems.

    - introduce debug statement for thermal core and step_wise governor.

    - assorted fixes and cleanups for thermal core, cpu cooling, exynos
    thrmal, intel powerclamp and imx thermal driver"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (34 commits)
    thermal: remove const flag from .ops of imx thermal
    Thermal: update thermal zone device after setting emul_temp
    intel_powerclamp: Fix cstate counter detection.
    thermal: imx: add necessary clk operation
    Thermal cpu cooling: return error if no valid cpu frequency entry
    thermal: fix cpu_cooling max_level behavior
    thermal: rcar-thermal: Enable driver compilation with COMPILE_TEST
    thermal: debug: add debug statement for core and step_wise
    thermal: imx_thermal: add module device table
    drivers: thermal: Mark function as static in x86_pkg_temp_thermal.c
    thermal:samsung: fix compilation warning
    thermal: imx: correct suspend/resume flow
    thermal: exynos: fix error return code
    Thermal: ACPI INT3403 thermal driver
    MAINTAINERS: add thermal bindings entry in thermal domain
    arm: dts: make OMAP4460 bandgap node to belong to OCP
    arm: dts: make OMAP443x bandgap node to belong to OCP
    arm: dts: add cooling properties on omap5 cpu node
    arm: dts: add omap5 thermal data
    arm: dts: add omap5 CORE thermal data
    ...

    Linus Torvalds
     
  • Pull ACPI and power management updates from Rafael Wysocki:
    "As far as the number of commits goes, the top spot belongs to ACPI
    this time with cpufreq in the second position and a handful of PM
    core, PNP and cpuidle updates. They are fixes and cleanups mostly, as
    usual, with a couple of new features in the mix.

    The most visible change is probably that we will create struct
    acpi_device objects (visible in sysfs) for all devices represented in
    the ACPI tables regardless of their status and there will be a new
    sysfs attribute under those objects allowing user space to check that
    status via _STA.

    Consequently, ACPI device eject or generally hot-removal will not
    delete those objects, unless the table containing the corresponding
    namespace nodes is unloaded, which is extremely rare. Also ACPI
    container hotplug will be handled quite a bit differently and cpufreq
    will support CPU boost ("turbo") generically and not only in the
    acpi-cpufreq driver.

    Specifics:

    - ACPI core changes to make it create a struct acpi_device object for
    every device represented in the ACPI tables during all namespace
    scans regardless of the current status of that device. In
    accordance with this, ACPI hotplug operations will not delete those
    objects, unless the underlying ACPI tables go away.

    - On top of the above, new sysfs attribute for ACPI device objects
    allowing user space to check device status by triggering the
    execution of _STA for its ACPI object. From Srinivas Pandruvada.

    - ACPI core hotplug changes reducing code duplication, integrating
    the PCI root hotplug with the core and reworking container hotplug.

    - ACPI core simplifications making it use ACPI_COMPANION() in the
    code "glueing" ACPI device objects to "physical" devices.

    - ACPICA update to upstream version 20131218. This adds support for
    the DBG2 and PCCT tables to ACPICA, fixes some bugs and improves
    debug facilities. From Bob Moore, Lv Zheng and Betty Dall.

    - Init code change to carry out the early ACPI initialization
    earlier. That should allow us to use ACPI during the timekeeping
    initialization and possibly to simplify the EFI initialization too.
    From Chun-Yi Lee.

    - Clenups of the inclusions of ACPI headers in many places all over
    from Lv Zheng and Rashika Kheria (work in progress).

    - New helper for ACPI _DSM execution and rework of the code in
    drivers that uses _DSM to execute it via the new helper. From
    Jiang Liu.

    - New Win8 OSI blacklist entries from Takashi Iwai.

    - Assorted ACPI fixes and cleanups from Al Stone, Emil Goode, Hanjun
    Guo, Lan Tianyu, Masanari Iida, Oliver Neukum, Prarit Bhargava,
    Rashika Kheria, Tang Chen, Zhang Rui.

    - intel_pstate driver updates, including proper Baytrail support,
    from Dirk Brandewie and intel_pstate documentation from Ramkumar
    Ramachandra.

    - Generic CPU boost ("turbo") support for cpufreq from Lukasz
    Majewski.

    - powernow-k6 cpufreq driver fixes from Mikulas Patocka.

    - cpufreq core fixes and cleanups from Viresh Kumar, Jane Li, Mark
    Brown.

    - Assorted cpufreq drivers fixes and cleanups from Anson Huang, John
    Tobias, Paul Bolle, Paul Walmsley, Sachin Kamat, Shawn Guo, Viresh
    Kumar.

    - cpuidle cleanups from Bartlomiej Zolnierkiewicz.

    - Support for hibernation APM events from Bin Shi.

    - Hibernation fix to avoid bringing up nonboot CPUs with ACPI EC
    disabled during thaw transitions from Bjørn Mork.

    - PM core fixes and cleanups from Ben Dooks, Leonardo Potenza, Ulf
    Hansson.

    - PNP subsystem fixes and cleanups from Dmitry Torokhov, Levente
    Kurusa, Rashika Kheria.

    - New tool for profiling system suspend from Todd E Brandt and a
    cpupower tool cleanup from One Thousand Gnomes"

    * tag 'pm+acpi-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (153 commits)
    thermal: exynos: boost: Automatic enable/disable of BOOST feature (at Exynos4412)
    cpufreq: exynos4x12: Change L0 driver data to CPUFREQ_BOOST_FREQ
    Documentation: cpufreq / boost: Update BOOST documentation
    cpufreq: exynos: Extend Exynos cpufreq driver to support boost
    cpufreq / boost: Kconfig: Support for software-managed BOOST
    acpi-cpufreq: Adjust the code to use the common boost attribute
    cpufreq: Add boost frequency support in core
    intel_pstate: Add trace point to report internal state.
    cpufreq: introduce cpufreq_generic_get() routine
    ARM: SA1100: Create dummy clk_get_rate() to avoid build failures
    cpufreq: stats: create sysfs entries when cpufreq_stats is a module
    cpufreq: stats: free table and remove sysfs entry in a single routine
    cpufreq: stats: remove hotplug notifiers
    cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly
    cpufreq: speedstep: remove unused speedstep_get_state
    platform: introduce OF style 'modalias' support for platform bus
    PM / tools: new tool for suspend/resume performance optimization
    ACPI: fix module autoloading for ACPI enumerated devices
    ACPI: add module autoloading support for ACPI enumerated devices
    ACPI: fix create_modalias() return value handling
    ...

    Linus Torvalds
     

23 Jan, 2014

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual rocket science stuff from trivial.git"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    neighbour.h: fix comment
    sched: Fix warning on make htmldocs caused by wait.h
    slab: struct kmem_cache is protected by slab_mutex
    doc: Fix typo in USB Gadget Documentation
    of/Kconfig: Spelling s/one/once/
    mkregtable: Fix sscanf handling
    lp5523, lp8501: comment improvements
    thermal: rcar: comment spelling
    treewide: fix comments and printk msgs
    IXP4xx: remove '1 &&' from a condition check in ixp4xx_restart()
    Documentation: update /proc/uptime field description
    Documentation: Fix size parameter for snprintf
    arm: fix comment header and macro name
    asm-generic: uaccess: Spelling s/a ny/any/
    mtd: onenand: fix comment header
    doc: driver-model/platform.txt: fix a typo
    drivers: fix typo in DEVTMPFS_MOUNT Kconfig help text
    doc: Fix typo (acces_process_vm -> access_process_vm)
    treewide: Fix typos in printk
    drivers/gpu/drm/qxl/Kconfig: reformat the help text
    ...

    Linus Torvalds
     

17 Jan, 2014

1 commit

  • This patch provides auto disable/enable operation for boost. It uses already
    present thermal infrastructure to provide BOOST hysteresis.
    The TMU data is modified to work properly with or without BOOST.
    Hence, the two first trip points with corresponding clip frequencies are
    adjusted.

    The first one is reduced from 85 to 70 degrees and the clip frequency is
    increased to 1.4 GHz from 800 MHz. This trip point is in fact responsible
    for providing BOOST hysteresis. When temperature exceeds 70 deg, the maximal
    non BOOST frequency for Exynos4412 is imposed.

    Since the first trigger level has been "stolen" for BOOST, the second one
    needs to be a compromise for the previously used two for non BOOST
    configuration. The 95 deg with modified clip freq (to 400 MHz) should provide
    a good balance between cooling down the overheated device and throughput on
    an acceptable level.

    Two last trigger levels are not modified since, they cause platform shutdown
    on emergency overheat to happen.

    The third trip point passage results in SW managed shut down of the system.
    If the last trip point is crossed, the PMU HW generates the power off
    signal.

    Signed-off-by: Lukasz Majewski
    Signed-off-by: Myungjoo Ham
    Acked-by: Eduardo Valentin
    Reviewed-by: Zhang Rui
    [rjw: Changelog]
    Signed-off-by: Rafael J. Wysocki

    Lukasz Majewski
     

14 Jan, 2014

1 commit

  • The only valid use of preempt_enable_no_resched() is if the very next
    line is schedule() or if we know preemption cannot actually be enabled
    by that statement due to known more preempt_count 'refs'.

    Signed-off-by: Peter Zijlstra
    Cc: rjw@rjwysocki.net
    Cc: Eliezer Tamir
    Cc: rui.zhang@intel.com
    Cc: jacob.jun.pan@linux.intel.com
    Cc: Mike Galbraith
    Cc: hpa@zytor.com
    Cc: Arjan van de Ven
    Cc: lenb@kernel.org
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/n/tip-zcfvacdlvlr63qmnn5i58vuj@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

08 Jan, 2014

1 commit


06 Jan, 2014

2 commits


03 Jan, 2014

4 commits


02 Jan, 2014

11 commits

  • Zhang Rui
     
  • Signed-off-by: Zhang Rui

    Zhang Rui
     
  • As per Documentation/thermal/sysfs-api.txt, max_level
    is an index, not a counter. Thus, in case a CPU has
    3 valid frequencies, max_level is expected to be 2, for instance.

    The current code makes max_level == number of valid frequencies,
    which is bogus. This patch fix the cpu_cooling device by
    ranging max_level properly.

    Reported-by: Carlos Hernandez
    Signed-off-by: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Eduardo Valentin
     
  • This helps increasing build testing coverage.

    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Cc: linux-pm@vger.kernel.org
    Signed-off-by: Laurent Pinchart
    Acked-by: Simon Horman
    Acked-by: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Laurent Pinchart
     
  • To ease debugging thermal problem, add these dynamic debug statements
    so that user do not need rebuild kernel to see these info.

    Based on a patch from Zhang Rui for debugging on bugzilla:
    https://bugzilla.kernel.org/attachment.cgi?id=98671

    A sample output after we turn on dynamic debug with the following cmd:
    # echo 'module thermal_sys +fp' > /sys/kernel/debug/dynamic_debug/control
    is like:

    [ 355.147627] update_temperature: thermal thermal_zone0: last_temperature=52000, current_temperature=55000
    [ 355.147636] thermal_zone_trip_update: thermal thermal_zone0: Trip1[type=1,temp=79000]:trend=2,throttle=0
    [ 355.147644] get_target_state: thermal cooling_device8: cur_state=0
    [ 355.147647] thermal_zone_trip_update: thermal cooling_device8: old_target=-1, target=-1
    [ 355.147652] get_target_state: thermal cooling_device7: cur_state=0
    [ 355.147655] thermal_zone_trip_update: thermal cooling_device7: old_target=-1, target=-1
    [ 355.147660] get_target_state: thermal cooling_device6: cur_state=0
    [ 355.147663] thermal_zone_trip_update: thermal cooling_device6: old_target=-1, target=-1
    [ 355.147668] get_target_state: thermal cooling_device5: cur_state=0
    [ 355.147671] thermal_zone_trip_update: thermal cooling_device5: old_target=-1, target=-1
    [ 355.147678] thermal_zone_trip_update: thermal thermal_zone0: Trip2[type=0,temp=90000]:trend=1,throttle=0
    [ 355.147776] get_target_state: thermal cooling_device0: cur_state=0
    [ 355.147783] thermal_zone_trip_update: thermal cooling_device0: old_target=-1, target=-1
    [ 355.147792] thermal_zone_trip_update: thermal thermal_zone0: Trip3[type=0,temp=80000]:trend=1,throttle=0
    [ 355.147845] get_target_state: thermal cooling_device1: cur_state=0
    [ 355.147849] thermal_zone_trip_update: thermal cooling_device1: old_target=-1, target=-1
    [ 355.147856] thermal_zone_trip_update: thermal thermal_zone0: Trip4[type=0,temp=70000]:trend=1,throttle=0
    [ 355.147904] get_target_state: thermal cooling_device2: cur_state=0
    [ 355.147908] thermal_zone_trip_update: thermal cooling_device2: old_target=-1, target=-1
    [ 355.147915] thermal_zone_trip_update: thermal thermal_zone0: Trip5[type=0,temp=60000]:trend=1,throttle=0
    [ 355.147963] get_target_state: thermal cooling_device3: cur_state=0
    [ 355.147967] thermal_zone_trip_update: thermal cooling_device3: old_target=-1, target=-1
    [ 355.147973] thermal_zone_trip_update: thermal thermal_zone0: Trip6[type=0,temp=55000]:trend=1,throttle=1
    [ 355.148022] get_target_state: thermal cooling_device4: cur_state=0
    [ 355.148025] thermal_zone_trip_update: thermal cooling_device4: old_target=-1, target=1
    [ 355.148036] thermal_cdev_update: thermal cooling_device4: zone0->target=1
    [ 355.169279] thermal_cdev_update: thermal cooling_device4: set to state 1

    Signed-off-by: Aaron Lu
    Acked-by: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Aaron Lu
     
  • Add the module device table declaration so the module can be loaded
    automatically at boot time.

    Signed-off-by: Russell King
    Acked-by: Shawn Guo
    Acked-by: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Russell King
     
  • Mark function sys_set_trip_temp() as static in x86_pkg_temp_thermal.c
    because it is not used outside this file.

    This eliminates the following warning in x86_pkg_temp_thermal.c:
    drivers/thermal/x86_pkg_temp_thermal.c:218:5: warning: no previous prototype for ‘sys_set_trip_temp’ [-Wmissing-prototypes]

    Signed-off-by: Rashika Kheria
    Reviewed-by: Josh Triplett
    Signed-off-by: Zhang Rui

    Rashika
     
  • This patch fixes a compilation warning.

    warning: passing argument 5 of 'thermal_zone_device_register' discards 'const'
    qualifier from pointer target type [enabled by default]
    include/linux/thermal.h:270:29: note: expected 'struct thermal_zone_device_ops *'
    but argument is of type 'const struct thermal_zone_device_ops *'

    Signed-off-by: Naveen Krishna Chatradhi
    Signed-off-by: Zhang Rui

    Naveen Krishna Chatradhi
     
  • Fixes regression introduced by:

    commit 37713a1e8e4c1a1067ad4c99296f78d3c82ed9c4
    Author: Philipp Zabel
    Date: Thu Aug 1 18:33:12 2013 +0200

    thermal: imx: implement thermal alarm interrupt handling

    The commit 37713a1e8e4 makes imx thermal sensor always powered up as alarm
    function is enabled, but the suspend callback of imx thermal returns
    success only if thermal sensor is powered down, so it will always returns
    fail hence break system's suspend, this patch disables imx thermal sensor
    before suspend and re-enable it after resume.

    Signed-off-by: Anson Huang
    Acked-by: Shawn Guo
    Signed-off-by: Zhang Rui

    Anson Huang
     
  • Set the return variable to an error code as done elsewhere in the function.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }

    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Jingoo Han
    Signed-off-by: Zhang Rui

    Julia Lawall
     
  • The ACPI INT3403 device objects present on some systems can be used to retrieve
    temperature data from thermal sensors. Add a driver registering each INT3403
    device object as a thermal zone device and exposing its _TMP, PATx and GTSH
    method via the standard thermal control interface under /sys/class/thermal/.

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Zhang Rui

    Srinivas Pandruvada
     

20 Dec, 2013

1 commit

  • People seem to delight in writing wrong and broken mwait idle routines;
    collapse the lot.

    This leaves mwait_play_dead() the sole remaining user of __mwait() and
    new __mwait() users are probably doing it wrong.

    Also remove __sti_mwait() as its unused.

    Cc: Arjan van de Ven
    Cc: Jacob Jun Pan
    Cc: Mike Galbraith
    Cc: Len Brown
    Cc: Rui Zhang
    Acked-by: Rafael Wysocki
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20131212141654.616820819@infradead.org
    Signed-off-by: H. Peter Anvin

    Peter Zijlstra