Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
intel_mid_thermal.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/param.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/pm.h>
#include <linux/thermal.h>
#include <linux/mfd/intel_msic.h>

Go to the source code of this file.

Data Structures

struct  platform_info
 
struct  thermal_device_info
 

Macros

#define pr_fmt(fmt)   "intel_mid_thermal: " fmt
 
#define MSIC_THERMAL_SENSORS   4
 
#define MSIC_ADC_ENBL   0x10
 
#define MSIC_ADC_START   0x08
 
#define MSIC_ADCTHERM_ENBL   0x04
 
#define MSIC_ADCRRDATA_ENBL   0x05
 
#define MSIC_CHANL_MASK_VAL   0x0F
 
#define MSIC_STOPBIT_MASK   16
 
#define MSIC_ADCTHERM_MASK   4
 
#define ADC_CHANLS_MAX   15
 
#define ADC_LOOP_MAX   (ADC_CHANLS_MAX - MSIC_THERMAL_SENSORS)
 
#define SKIN_SENSOR0_CODE   0x08
 
#define SKIN_SENSOR1_CODE   0x09
 
#define SYS_SENSOR_CODE   0x0A
 
#define MSIC_DIE_SENSOR_CODE   0x03
 
#define SKIN_THERM_SENSOR0   0
 
#define SKIN_THERM_SENSOR1   1
 
#define SYS_THERM_SENSOR2   2
 
#define MSIC_DIE_THERM_SENSOR3   3
 
#define ADC_MAX   977
 
#define ADC_MIN   162
 
#define ADC_VAL0C   887
 
#define ADC_VAL20C   720
 
#define ADC_VAL40C   508
 
#define ADC_VAL60C   315
 
#define ADC_CHNL_START_ADDR   INTEL_MSIC_ADC1ADDR0 /* increments by 1 */
 
#define ADC_DATA_START_ADDR   INTEL_MSIC_ADC1SNS0H /* increments by 2 */
 
#define MSIC_DIE_ADC_MIN   488
 
#define MSIC_DIE_ADC_MAX   1004
 
#define DRIVER_NAME   "msic_thermal"
 

Functions

 module_platform_driver (mid_thermal_driver)
 
 MODULE_AUTHOR ("Durgadoss R <durgadoss.r@intel.com>")
 
 MODULE_DESCRIPTION ("Intel Medfield Platform Thermal Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ADC_CHANLS_MAX   15

Definition at line 52 of file intel_mid_thermal.c.

#define ADC_CHNL_START_ADDR   INTEL_MSIC_ADC1ADDR0 /* increments by 1 */

Definition at line 75 of file intel_mid_thermal.c.

#define ADC_DATA_START_ADDR   INTEL_MSIC_ADC1SNS0H /* increments by 2 */

Definition at line 76 of file intel_mid_thermal.c.

#define ADC_LOOP_MAX   (ADC_CHANLS_MAX - MSIC_THERMAL_SENSORS)

Definition at line 53 of file intel_mid_thermal.c.

#define ADC_MAX   977

Definition at line 67 of file intel_mid_thermal.c.

#define ADC_MIN   162

Definition at line 68 of file intel_mid_thermal.c.

#define ADC_VAL0C   887

Definition at line 69 of file intel_mid_thermal.c.

#define ADC_VAL20C   720

Definition at line 70 of file intel_mid_thermal.c.

#define ADC_VAL40C   508

Definition at line 71 of file intel_mid_thermal.c.

#define ADC_VAL60C   315

Definition at line 72 of file intel_mid_thermal.c.

#define DRIVER_NAME   "msic_thermal"

Definition at line 551 of file intel_mid_thermal.c.

#define MSIC_ADC_ENBL   0x10

Definition at line 42 of file intel_mid_thermal.c.

#define MSIC_ADC_START   0x08

Definition at line 43 of file intel_mid_thermal.c.

#define MSIC_ADCRRDATA_ENBL   0x05

Definition at line 46 of file intel_mid_thermal.c.

#define MSIC_ADCTHERM_ENBL   0x04

Definition at line 45 of file intel_mid_thermal.c.

#define MSIC_ADCTHERM_MASK   4

Definition at line 50 of file intel_mid_thermal.c.

#define MSIC_CHANL_MASK_VAL   0x0F

Definition at line 47 of file intel_mid_thermal.c.

#define MSIC_DIE_ADC_MAX   1004

Definition at line 80 of file intel_mid_thermal.c.

#define MSIC_DIE_ADC_MIN   488

Definition at line 79 of file intel_mid_thermal.c.

#define MSIC_DIE_SENSOR_CODE   0x03

Definition at line 59 of file intel_mid_thermal.c.

#define MSIC_DIE_THERM_SENSOR3   3

Definition at line 64 of file intel_mid_thermal.c.

#define MSIC_STOPBIT_MASK   16

Definition at line 49 of file intel_mid_thermal.c.

#define MSIC_THERMAL_SENSORS   4

Definition at line 39 of file intel_mid_thermal.c.

#define pr_fmt (   fmt)    "intel_mid_thermal: " fmt

Definition at line 25 of file intel_mid_thermal.c.

#define SKIN_SENSOR0_CODE   0x08

Definition at line 56 of file intel_mid_thermal.c.

#define SKIN_SENSOR1_CODE   0x09

Definition at line 57 of file intel_mid_thermal.c.

#define SKIN_THERM_SENSOR0   0

Definition at line 61 of file intel_mid_thermal.c.

#define SKIN_THERM_SENSOR1   1

Definition at line 62 of file intel_mid_thermal.c.

#define SYS_SENSOR_CODE   0x0A

Definition at line 58 of file intel_mid_thermal.c.

#define SYS_THERM_SENSOR2   2

Definition at line 63 of file intel_mid_thermal.c.

Function Documentation

MODULE_AUTHOR ( "Durgadoss R <durgadoss.r@intel.com>"  )
MODULE_DESCRIPTION ( "Intel Medfield Platform Thermal Driver"  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( mid_thermal_driver  )