1*4882a593Smuzhiyun===================== 2*4882a593SmuzhiyunExynos Emulation Mode 3*4882a593Smuzhiyun===================== 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunCopyright (C) 2012 Samsung Electronics 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunWritten by Jonghwa Lee <jonghwa3.lee@samsung.com> 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunDescription 10*4882a593Smuzhiyun----------- 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunExynos 4x12 (4212, 4412) and 5 series provide emulation mode for thermal 13*4882a593Smuzhiyunmanagement unit. Thermal emulation mode supports software debug for 14*4882a593SmuzhiyunTMU's operation. User can set temperature manually with software code 15*4882a593Smuzhiyunand TMU will read current temperature from user value not from sensor's 16*4882a593Smuzhiyunvalue. 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunEnabling CONFIG_THERMAL_EMULATION option will make this support 19*4882a593Smuzhiyunavailable. When it's enabled, sysfs node will be created as 20*4882a593Smuzhiyun/sys/devices/virtual/thermal/thermal_zone'zone id'/emul_temp. 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunThe sysfs node, 'emul_node', will contain value 0 for the initial state. 23*4882a593SmuzhiyunWhen you input any temperature you want to update to sysfs node, it 24*4882a593Smuzhiyunautomatically enable emulation mode and current temperature will be 25*4882a593Smuzhiyunchanged into it. 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun(Exynos also supports user changeable delay time which would be used to 28*4882a593Smuzhiyundelay of changing temperature. However, this node only uses same delay 29*4882a593Smuzhiyunof real sensing time, 938us.) 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunExynos emulation mode requires synchronous of value changing and 32*4882a593Smuzhiyunenabling. It means when you want to update the any value of delay or 33*4882a593Smuzhiyunnext temperature, then you have to enable emulation mode at the same 34*4882a593Smuzhiyuntime. (Or you have to keep the mode enabling.) If you don't, it fails to 35*4882a593Smuzhiyunchange the value to updated one and just use last succeessful value 36*4882a593Smuzhiyunrepeatedly. That's why this node gives users the right to change 37*4882a593Smuzhiyuntermerpature only. Just one interface makes it more simply to use. 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunDisabling emulation mode only requires writing value 0 to sysfs node. 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun:: 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun TEMP 120 | 45*4882a593Smuzhiyun | 46*4882a593Smuzhiyun 100 | 47*4882a593Smuzhiyun | 48*4882a593Smuzhiyun 80 | 49*4882a593Smuzhiyun | +----------- 50*4882a593Smuzhiyun 60 | | | 51*4882a593Smuzhiyun | +-------------| | 52*4882a593Smuzhiyun 40 | | | | 53*4882a593Smuzhiyun | | | | 54*4882a593Smuzhiyun 20 | | | +---------- 55*4882a593Smuzhiyun | | | | | 56*4882a593Smuzhiyun 0 |______________|_____________|__________|__________|_________ 57*4882a593Smuzhiyun A A A A TIME 58*4882a593Smuzhiyun |<----->| |<----->| |<----->| | 59*4882a593Smuzhiyun | 938us | | | | | | 60*4882a593Smuzhiyun emulation : 0 50 | 70 | 20 | 0 61*4882a593Smuzhiyun current temp: sensor 50 70 20 sensor 62