09 Dec, 2015

1 commit

  • The read and write opcodes are global for all units on SoC and even across
    Intel SoCs. Remove duplication of corresponding constants. At the same time
    convert all current users.

    No functional change.

    Acked-by: Thomas Gleixner
    Acked-by: Boon Leong Ong
    Acked-by: Jacob Pan
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki

    Andy Shevchenko
     

03 Aug, 2015

1 commit

  • The thermal code uses int, long and unsigned long for temperatures
    in different places.

    Using an unsigned type limits the thermal framework to positive
    temperatures without need. Also several drivers currently will report
    temperatures near UINT_MAX for temperatures below 0°C. This will probably
    immediately shut the machine down due to overtemperature if started below
    0°C.

    'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
    is above the melting point of all known materials.

    Consistently use a plain 'int' for temperatures throughout the thermal code and
    the drivers. This only changes the places in the drivers where the temperature
    is passed around as pointer, when drivers internally use another type this is
    not changed.

    Signed-off-by: Sascha Hauer
    Acked-by: Geert Uytterhoeven
    Reviewed-by: Jean Delvare
    Reviewed-by: Lukasz Majewski
    Reviewed-by: Darren Hart
    Reviewed-by: Heiko Stuebner
    Reviewed-by: Peter Feuerer
    Cc: Punit Agrawal
    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: Jean Delvare
    Cc: Peter Feuerer
    Cc: Heiko Stuebner
    Cc: Lukasz Majewski
    Cc: Stephen Warren
    Cc: Thierry Reding
    Cc: linux-acpi@vger.kernel.org
    Cc: platform-driver-x86@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-omap@vger.kernel.org
    Cc: linux-samsung-soc@vger.kernel.org
    Cc: Guenter Roeck
    Cc: Rafael J. Wysocki
    Cc: Maxime Ripard
    Cc: Darren Hart
    Cc: lm-sensors@lm-sensors.org
    Signed-off-by: Zhang Rui

    Sascha Hauer
     

01 May, 2015

1 commit

  • In Intel Quark SoC X1000, there is one on-die digital temperature sensor(DTS).
    The DTS offers both hot & critical trip points.

    However, in current distribution of UEFI BIOS for Quark platform, only
    critical trip point is configured to be 105 degree Celsius (based on Quark
    SW ver1.0.1 and hot trip point is not used due to lack of IRQ.

    There is no active cooling device for Quark SoC, so Quark SoC thermal
    management logic expects Linux distro to orderly power-off when temperature
    of the DTS exceeds the configured critical trip point.

    Kernel param "polling_delay" in milliseconds is used to control the frequency
    the DTS temperature is read by thermal framework. It defaults to 2-second.
    To change it, use kernel boot param "intel_quark_dts_thermal.polling_delay=X".

    User interacts with Quark SoC DTS thermal driver through sysfs via:
    /sys/class/thermal/thermal_zone0/

    For example:
    - to read DTS temperature
    $ cat temp
    - to read critical trip point
    $ cat trip_point_0_temp
    - to read trip point type
    $ cat trip_point_0_type
    - to emulate temperature raise to test orderly shutdown by Linux distro
    $ echo 105 > emul_temp

    Tested-by: Bryan O'Donoghue
    Signed-off-by: Ong Boon Leong
    Reviewed-by: Bryan O'Donoghue
    Reviewed-by: Kweh, Hock Leong
    Signed-off-by: Zhang Rui

    Ong, Boon Leong