Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
exynos_thermal.c File Reference
#include <linux/module.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
#include <linux/workqueue.h>
#include <linux/sysfs.h>
#include <linux/kobject.h>
#include <linux/io.h>
#include <linux/mutex.h>
#include <linux/platform_data/exynos_thermal.h>
#include <linux/thermal.h>
#include <linux/cpufreq.h>
#include <linux/cpu_cooling.h>
#include <linux/of.h>
#include <plat/cpu.h>

Go to the source code of this file.

Data Structures

struct  exynos_tmu_data
 
struct  thermal_trip_point_conf
 
struct  thermal_cooling_conf
 
struct  thermal_sensor_conf
 
struct  exynos_thermal_zone
 

Macros

#define EXYNOS_TMU_REG_TRIMINFO   0x0
 
#define EXYNOS_TMU_REG_CONTROL   0x20
 
#define EXYNOS_TMU_REG_STATUS   0x28
 
#define EXYNOS_TMU_REG_CURRENT_TEMP   0x40
 
#define EXYNOS_TMU_REG_INTEN   0x70
 
#define EXYNOS_TMU_REG_INTSTAT   0x74
 
#define EXYNOS_TMU_REG_INTCLEAR   0x78
 
#define EXYNOS_TMU_TRIM_TEMP_MASK   0xff
 
#define EXYNOS_TMU_GAIN_SHIFT   8
 
#define EXYNOS_TMU_REF_VOLTAGE_SHIFT   24
 
#define EXYNOS_TMU_CORE_ON   3
 
#define EXYNOS_TMU_CORE_OFF   2
 
#define EXYNOS_TMU_DEF_CODE_TO_TEMP_OFFSET   50
 
#define EXYNOS4210_TMU_REG_THRESHOLD_TEMP   0x44
 
#define EXYNOS4210_TMU_REG_TRIG_LEVEL0   0x50
 
#define EXYNOS4210_TMU_REG_TRIG_LEVEL1   0x54
 
#define EXYNOS4210_TMU_REG_TRIG_LEVEL2   0x58
 
#define EXYNOS4210_TMU_REG_TRIG_LEVEL3   0x5C
 
#define EXYNOS4210_TMU_REG_PAST_TEMP0   0x60
 
#define EXYNOS4210_TMU_REG_PAST_TEMP1   0x64
 
#define EXYNOS4210_TMU_REG_PAST_TEMP2   0x68
 
#define EXYNOS4210_TMU_REG_PAST_TEMP3   0x6C
 
#define EXYNOS4210_TMU_TRIG_LEVEL0_MASK   0x1
 
#define EXYNOS4210_TMU_TRIG_LEVEL1_MASK   0x10
 
#define EXYNOS4210_TMU_TRIG_LEVEL2_MASK   0x100
 
#define EXYNOS4210_TMU_TRIG_LEVEL3_MASK   0x1000
 
#define EXYNOS4210_TMU_INTCLEAR_VAL   0x1111
 
#define EXYNOS_TMU_TRIMINFO_CON   0x14
 
#define EXYNOS_THD_TEMP_RISE   0x50
 
#define EXYNOS_THD_TEMP_FALL   0x54
 
#define EXYNOS_EMUL_CON   0x80
 
#define EXYNOS_TRIMINFO_RELOAD   0x1
 
#define EXYNOS_TMU_CLEAR_RISE_INT   0x111
 
#define EXYNOS_TMU_CLEAR_FALL_INT   (0x111 << 16)
 
#define EXYNOS_MUX_ADDR_VALUE   6
 
#define EXYNOS_MUX_ADDR_SHIFT   20
 
#define EXYNOS_TMU_TRIP_MODE_SHIFT   13
 
#define EFUSE_MIN_VALUE   40
 
#define EFUSE_MAX_VALUE   100
 
#define SENSOR_NAME_LEN   16
 
#define MAX_TRIP_COUNT   8
 
#define MAX_COOLING_DEVICE   4
 
#define ACTIVE_INTERVAL   500
 
#define IDLE_INTERVAL   10000
 
#define MCELSIUS   1000
 
#define PANIC_ZONE   4
 
#define WARN_ZONE   3
 
#define MONITOR_ZONE   2
 
#define SAFE_ZONE   1
 
#define GET_ZONE(trip)   (trip + 2)
 
#define GET_TRIP(zone)   (zone - 2)
 
#define EXYNOS_ZONE_COUNT   3
 
#define EXYNOS4210_TMU_DRV_DATA   (NULL)
 
#define EXYNOS_TMU_DRV_DATA   (NULL)
 
#define exynos_tmu_match   NULL
 
#define EXYNOS_TMU_PM   NULL
 

Functions

 MODULE_DEVICE_TABLE (platform, exynos_tmu_driver_ids)
 
 module_platform_driver (exynos_tmu_driver)
 
 MODULE_DESCRIPTION ("EXYNOS TMU Driver")
 
 MODULE_AUTHOR ("Donggeun Kim <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:exynos-tmu")
 

Macro Definition Documentation

#define ACTIVE_INTERVAL   500

Definition at line 98 of file exynos_thermal.c.

#define EFUSE_MAX_VALUE   100

Definition at line 91 of file exynos_thermal.c.

#define EFUSE_MIN_VALUE   40

Definition at line 90 of file exynos_thermal.c.

#define EXYNOS4210_TMU_DRV_DATA   (NULL)

Definition at line 757 of file exynos_thermal.c.

#define EXYNOS4210_TMU_INTCLEAR_VAL   0x1111

Definition at line 75 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_PAST_TEMP0   0x60

Definition at line 66 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_PAST_TEMP1   0x64

Definition at line 67 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_PAST_TEMP2   0x68

Definition at line 68 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_PAST_TEMP3   0x6C

Definition at line 69 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_THRESHOLD_TEMP   0x44

Definition at line 61 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_TRIG_LEVEL0   0x50

Definition at line 62 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_TRIG_LEVEL1   0x54

Definition at line 63 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_TRIG_LEVEL2   0x58

Definition at line 64 of file exynos_thermal.c.

#define EXYNOS4210_TMU_REG_TRIG_LEVEL3   0x5C

Definition at line 65 of file exynos_thermal.c.

#define EXYNOS4210_TMU_TRIG_LEVEL0_MASK   0x1

Definition at line 71 of file exynos_thermal.c.

#define EXYNOS4210_TMU_TRIG_LEVEL1_MASK   0x10

Definition at line 72 of file exynos_thermal.c.

#define EXYNOS4210_TMU_TRIG_LEVEL2_MASK   0x100

Definition at line 73 of file exynos_thermal.c.

#define EXYNOS4210_TMU_TRIG_LEVEL3_MASK   0x1000

Definition at line 74 of file exynos_thermal.c.

#define EXYNOS_EMUL_CON   0x80

Definition at line 81 of file exynos_thermal.c.

#define EXYNOS_MUX_ADDR_SHIFT   20

Definition at line 87 of file exynos_thermal.c.

#define EXYNOS_MUX_ADDR_VALUE   6

Definition at line 86 of file exynos_thermal.c.

#define EXYNOS_THD_TEMP_FALL   0x54

Definition at line 80 of file exynos_thermal.c.

#define EXYNOS_THD_TEMP_RISE   0x50

Definition at line 79 of file exynos_thermal.c.

#define EXYNOS_TMU_CLEAR_FALL_INT   (0x111 << 16)

Definition at line 85 of file exynos_thermal.c.

#define EXYNOS_TMU_CLEAR_RISE_INT   0x111

Definition at line 84 of file exynos_thermal.c.

#define EXYNOS_TMU_CORE_OFF   2

Definition at line 57 of file exynos_thermal.c.

#define EXYNOS_TMU_CORE_ON   3

Definition at line 56 of file exynos_thermal.c.

#define EXYNOS_TMU_DEF_CODE_TO_TEMP_OFFSET   50

Definition at line 58 of file exynos_thermal.c.

#define EXYNOS_TMU_DRV_DATA   (NULL)

Definition at line 787 of file exynos_thermal.c.

#define EXYNOS_TMU_GAIN_SHIFT   8

Definition at line 54 of file exynos_thermal.c.

#define exynos_tmu_match   NULL

Definition at line 804 of file exynos_thermal.c.

#define EXYNOS_TMU_PM   NULL

Definition at line 977 of file exynos_thermal.c.

#define EXYNOS_TMU_REF_VOLTAGE_SHIFT   24

Definition at line 55 of file exynos_thermal.c.

#define EXYNOS_TMU_REG_CONTROL   0x20

Definition at line 46 of file exynos_thermal.c.

#define EXYNOS_TMU_REG_CURRENT_TEMP   0x40

Definition at line 48 of file exynos_thermal.c.

#define EXYNOS_TMU_REG_INTCLEAR   0x78

Definition at line 51 of file exynos_thermal.c.

#define EXYNOS_TMU_REG_INTEN   0x70

Definition at line 49 of file exynos_thermal.c.

#define EXYNOS_TMU_REG_INTSTAT   0x74

Definition at line 50 of file exynos_thermal.c.

#define EXYNOS_TMU_REG_STATUS   0x28

Definition at line 47 of file exynos_thermal.c.

#define EXYNOS_TMU_REG_TRIMINFO   0x0

Definition at line 45 of file exynos_thermal.c.

#define EXYNOS_TMU_TRIM_TEMP_MASK   0xff

Definition at line 53 of file exynos_thermal.c.

#define EXYNOS_TMU_TRIMINFO_CON   0x14

Definition at line 78 of file exynos_thermal.c.

#define EXYNOS_TMU_TRIP_MODE_SHIFT   13

Definition at line 88 of file exynos_thermal.c.

#define EXYNOS_TRIMINFO_RELOAD   0x1

Definition at line 83 of file exynos_thermal.c.

#define EXYNOS_ZONE_COUNT   3

Definition at line 111 of file exynos_thermal.c.

#define GET_TRIP (   zone)    (zone - 2)

Definition at line 109 of file exynos_thermal.c.

#define GET_ZONE (   trip)    (trip + 2)

Definition at line 108 of file exynos_thermal.c.

#define IDLE_INTERVAL   10000

Definition at line 99 of file exynos_thermal.c.

#define MAX_COOLING_DEVICE   4

Definition at line 96 of file exynos_thermal.c.

#define MAX_TRIP_COUNT   8

Definition at line 95 of file exynos_thermal.c.

#define MCELSIUS   1000

Definition at line 100 of file exynos_thermal.c.

#define MONITOR_ZONE   2

Definition at line 105 of file exynos_thermal.c.

#define PANIC_ZONE   4

Definition at line 103 of file exynos_thermal.c.

#define SAFE_ZONE   1

Definition at line 106 of file exynos_thermal.c.

#define SENSOR_NAME_LEN   16

Definition at line 94 of file exynos_thermal.c.

#define WARN_ZONE   3

Definition at line 104 of file exynos_thermal.c.

Function Documentation

MODULE_ALIAS ( "platform:exynos-tmu"  )
MODULE_AUTHOR ( "Donggeun Kim <[email protected]>"  )
MODULE_DESCRIPTION ( "EXYNOS TMU Driver"  )
MODULE_DEVICE_TABLE ( platform  ,
exynos_tmu_driver_ids   
)
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( exynos_tmu_driver  )