Back to home page

OSCL-LXR

 
 

    


0001 =====================
0002 Exynos Emulation Mode
0003 =====================
0004 
0005 Copyright (C) 2012 Samsung Electronics
0006 
0007 Written by Jonghwa Lee <jonghwa3.lee@samsung.com>
0008 
0009 Description
0010 -----------
0011 
0012 Exynos 4x12 (4212, 4412) and 5 series provide emulation mode for thermal
0013 management unit. Thermal emulation mode supports software debug for
0014 TMU's operation. User can set temperature manually with software code
0015 and TMU will read current temperature from user value not from sensor's
0016 value.
0017 
0018 Enabling CONFIG_THERMAL_EMULATION option will make this support
0019 available. When it's enabled, sysfs node will be created as
0020 /sys/devices/virtual/thermal/thermal_zone'zone id'/emul_temp.
0021 
0022 The sysfs node, 'emul_node', will contain value 0 for the initial state.
0023 When you input any temperature you want to update to sysfs node, it
0024 automatically enable emulation mode and current temperature will be
0025 changed into it.
0026 
0027 (Exynos also supports user changeable delay time which would be used to
0028 delay of changing temperature. However, this node only uses same delay
0029 of real sensing time, 938us.)
0030 
0031 Exynos emulation mode requires synchronous of value changing and
0032 enabling. It means when you want to update the any value of delay or
0033 next temperature, then you have to enable emulation mode at the same
0034 time. (Or you have to keep the mode enabling.) If you don't, it fails to
0035 change the value to updated one and just use last succeessful value
0036 repeatedly. That's why this node gives users the right to change
0037 termerpature only. Just one interface makes it more simply to use.
0038 
0039 Disabling emulation mode only requires writing value 0 to sysfs node.
0040 
0041 ::
0042 
0043 
0044   TEMP  120 |
0045             |
0046         100 |
0047             |
0048          80 |
0049             |                            +-----------
0050          60 |                            |          |
0051             |              +-------------|          |
0052          40 |              |             |          |
0053             |              |             |          |
0054          20 |              |             |          +----------
0055             |              |             |          |          |
0056           0 |______________|_____________|__________|__________|_________
0057                    A             A          A                  A     TIME
0058                    |<----->|     |<----->|  |<----->|          |
0059                    | 938us |     |       |  |       |          |
0060   emulation   : 0  50      |     70      |  20      |          0
0061   current temp:   sensor   50            70         20        sensor