Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sis5595.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/acpi.h>
#include <linux/io.h>

Go to the source code of this file.

Data Structures

struct  sis5595_data
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define SIS5595_EXTENT   8
 
#define SIS5595_BASE_REG   0x68
 
#define SIS5595_PIN_REG   0x7A
 
#define SIS5595_ENABLE_REG   0x7B
 
#define SIS5595_ADDR_REG_OFFSET   5
 
#define SIS5595_DATA_REG_OFFSET   6
 
#define SIS5595_REG_IN_MAX(nr)   (0x2b + (nr) * 2)
 
#define SIS5595_REG_IN_MIN(nr)   (0x2c + (nr) * 2)
 
#define SIS5595_REG_IN(nr)   (0x20 + (nr))
 
#define SIS5595_REG_FAN_MIN(nr)   (0x3b + (nr))
 
#define SIS5595_REG_FAN(nr)   (0x28 + (nr))
 
#define REV2MIN   0xb0
 
#define SIS5595_REG_TEMP
 
#define SIS5595_REG_TEMP_OVER
 
#define SIS5595_REG_TEMP_HYST
 
#define SIS5595_REG_CONFIG   0x40
 
#define SIS5595_REG_ALARM1   0x41
 
#define SIS5595_REG_ALARM2   0x42
 
#define SIS5595_REG_FANDIV   0x47
 
#define IN_FROM_REG(val)   ((val) * 16)
 
#define DIV_FROM_REG(val)   (1 << (val))
 
#define show_in_offset(offset)
 
#define show_fan_offset(offset)
 

Functions

 module_param (force_addr, ushort, 0)
 
 MODULE_PARM_DESC (force_addr,"Initialize the base address of the sensors")
 
 show_in_offset (0)
 
 show_in_offset (1)
 
 show_in_offset (2)
 
 show_in_offset (3)
 
 show_in_offset (4)
 
 show_fan_offset (1)
 
 show_fan_offset (2)
 
 MODULE_DEVICE_TABLE (pci, sis5595_pci_ids)
 
 MODULE_AUTHOR ("Aurelien Jarno <[email protected]>")
 
 MODULE_DESCRIPTION ("SiS 5595 Sensor device")
 
 MODULE_LICENSE ("GPL")
 
 module_init (sm_sis5595_init)
 
 module_exit (sm_sis5595_exit)
 

Macro Definition Documentation

#define DIV_FROM_REG (   val)    (1 << (val))

Definition at line 174 of file sis5595.c.

#define IN_FROM_REG (   val)    ((val) * 16)

Definition at line 138 of file sis5595.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 53 of file sis5595.c.

#define REV2MIN   0xb0

Definition at line 111 of file sis5595.c.

#define show_fan_offset (   offset)
Value:
static SENSOR_DEVICE_ATTR(fan##offset##_input, S_IRUGO, \
show_fan, NULL, offset - 1); \
show_fan_min, set_fan_min, offset - 1); \
show_fan_div, set_fan_div, offset - 1);

Definition at line 481 of file sis5595.c.

#define show_in_offset (   offset)
Value:
static SENSOR_DEVICE_ATTR(in##offset##_input, S_IRUGO, \
show_in_min, set_in_min, offset); \
show_in_max, set_in_max, offset);

Definition at line 291 of file sis5595.c.

#define SIS5595_ADDR_REG_OFFSET   5

Definition at line 92 of file sis5595.c.

#define SIS5595_BASE_REG   0x68

Definition at line 87 of file sis5595.c.

#define SIS5595_DATA_REG_OFFSET   6

Definition at line 93 of file sis5595.c.

#define SIS5595_ENABLE_REG   0x7B

Definition at line 89 of file sis5595.c.

#define SIS5595_EXTENT   8

Definition at line 85 of file sis5595.c.

#define SIS5595_PIN_REG   0x7A

Definition at line 88 of file sis5595.c.

#define SIS5595_REG_ALARM1   0x41

Definition at line 120 of file sis5595.c.

#define SIS5595_REG_ALARM2   0x42

Definition at line 121 of file sis5595.c.

#define SIS5595_REG_CONFIG   0x40

Definition at line 119 of file sis5595.c.

#define SIS5595_REG_FAN (   nr)    (0x28 + (nr))

Definition at line 101 of file sis5595.c.

#define SIS5595_REG_FAN_MIN (   nr)    (0x3b + (nr))

Definition at line 100 of file sis5595.c.

#define SIS5595_REG_FANDIV   0x47

Definition at line 122 of file sis5595.c.

#define SIS5595_REG_IN (   nr)    (0x20 + (nr))

Definition at line 98 of file sis5595.c.

#define SIS5595_REG_IN_MAX (   nr)    (0x2b + (nr) * 2)

Definition at line 96 of file sis5595.c.

#define SIS5595_REG_IN_MIN (   nr)    (0x2c + (nr) * 2)

Definition at line 97 of file sis5595.c.

#define SIS5595_REG_TEMP
Value:
(((data->revision) >= REV2MIN) ? \
SIS5595_REG_IN(4) : 0x27)

Definition at line 112 of file sis5595.c.

#define SIS5595_REG_TEMP_HYST
Value:
(((data->revision) >= REV2MIN) ? \
SIS5595_REG_IN_MIN(4) : 0x3a)

Definition at line 116 of file sis5595.c.

#define SIS5595_REG_TEMP_OVER
Value:
(((data->revision) >= REV2MIN) ? \
SIS5595_REG_IN_MAX(4) : 0x39)

Definition at line 114 of file sis5595.c.

Function Documentation

MODULE_AUTHOR ( "Aurelien Jarno <[email protected]>"  )
MODULE_DESCRIPTION ( "SiS 5595 Sensor device )
MODULE_DEVICE_TABLE ( pci  ,
sis5595_pci_ids   
)
module_exit ( sm_sis5595_exit  )
module_init ( sm_sis5595_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( force_addr  ,
ushort  ,
 
)
MODULE_PARM_DESC ( force_addr  ,
"Initialize the base address of the sensors  
)
show_fan_offset ( )
show_fan_offset ( )
show_in_offset ( )

Definition at line 220 of file smsc47m192.c.

show_in_offset ( )
show_in_offset ( )
show_in_offset ( )
show_in_offset ( )