Jonghwa Lee | bbf63be | 2012-11-21 13:31:01 +0900 | [diff] [blame] | 1 | EXYNOS EMULATION MODE |
| 2 | ======================== |
| 3 | |
| 4 | Copyright (C) 2012 Samsung Electronics |
| 5 | |
| 6 | Written by Jonghwa Lee <jonghwa3.lee@samsung.com> |
| 7 | |
| 8 | Description |
| 9 | ----------- |
| 10 | |
| 11 | Exynos 4x12 (4212, 4412) and 5 series provide emulation mode for thermal management unit. |
| 12 | Thermal emulation mode supports software debug for TMU's operation. User can set temperature |
| 13 | manually with software code and TMU will read current temperature from user value not from |
| 14 | sensor's value. |
| 15 | |
Amit Daniel Kachhap | bffd1f8 | 2013-02-11 03:54:23 +0000 | [diff] [blame] | 16 | Enabling CONFIG_THERMAL_EMULATION option will make this support available. |
| 17 | When it's enabled, sysfs node will be created as |
| 18 | /sys/devices/virtual/thermal/thermal_zone'zone id'/emul_temp. |
Jonghwa Lee | bbf63be | 2012-11-21 13:31:01 +0900 | [diff] [blame] | 19 | |
Amit Daniel Kachhap | bffd1f8 | 2013-02-11 03:54:23 +0000 | [diff] [blame] | 20 | The sysfs node, 'emul_node', will contain value 0 for the initial state. When you input any |
Jonghwa Lee | bbf63be | 2012-11-21 13:31:01 +0900 | [diff] [blame] | 21 | temperature you want to update to sysfs node, it automatically enable emulation mode and |
| 22 | current temperature will be changed into it. |
Anatol Pomozov | f884ab1 | 2013-05-08 16:56:16 -0700 | [diff] [blame] | 23 | (Exynos also supports user changeable delay time which would be used to delay of |
Jonghwa Lee | bbf63be | 2012-11-21 13:31:01 +0900 | [diff] [blame] | 24 | changing temperature. However, this node only uses same delay of real sensing time, 938us.) |
| 25 | |
| 26 | Exynos emulation mode requires synchronous of value changing and enabling. It means when you |
| 27 | want to update the any value of delay or next temperature, then you have to enable emulation |
| 28 | mode at the same time. (Or you have to keep the mode enabling.) If you don't, it fails to |
| 29 | change the value to updated one and just use last succeessful value repeatedly. That's why |
| 30 | this node gives users the right to change termerpature only. Just one interface makes it more |
| 31 | simply to use. |
| 32 | |
| 33 | Disabling emulation mode only requires writing value 0 to sysfs node. |
| 34 | |
| 35 | |
| 36 | TEMP 120 | |
| 37 | | |
| 38 | 100 | |
| 39 | | |
| 40 | 80 | |
| 41 | | +----------- |
| 42 | 60 | | | |
| 43 | | +-------------| | |
| 44 | 40 | | | | |
| 45 | | | | | |
| 46 | 20 | | | +---------- |
| 47 | | | | | | |
| 48 | 0 |______________|_____________|__________|__________|_________ |
| 49 | A A A A TIME |
| 50 | |<----->| |<----->| |<----->| | |
| 51 | | 938us | | | | | | |
| 52 | emulation : 0 50 | 70 | 20 | 0 |
| 53 | current temp : sensor 50 70 20 sensor |