Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
envctrl.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kthread.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/miscdevice.h>
#include <linux/kmod.h>
#include <linux/reboot.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <asm/uaccess.h>
#include <asm/envctrl.h>
#include <asm/io.h>

Go to the source code of this file.

Data Structures

struct  pcf8584_channel
 
struct  pcf8584_tblprop
 
struct  i2c_child_t
 

Macros

#define DRIVER_NAME   "envctrl"
 
#define PFX   DRIVER_NAME ": "
 
#define ENVCTRL_MINOR   162
 
#define PCF8584_ADDRESS   0x55
 
#define CONTROL_PIN   0x80
 
#define CONTROL_ES0   0x40
 
#define CONTROL_ES1   0x20
 
#define CONTROL_ES2   0x10
 
#define CONTROL_ENI   0x08
 
#define CONTROL_STA   0x04
 
#define CONTROL_STO   0x02
 
#define CONTROL_ACK   0x01
 
#define STATUS_PIN   0x80
 
#define STATUS_STS   0x20
 
#define STATUS_BER   0x10
 
#define STATUS_LRB   0x08
 
#define STATUS_AD0   0x08
 
#define STATUS_AAB   0x04
 
#define STATUS_LAB   0x02
 
#define STATUS_BB   0x01
 
#define BUS_CLK_90   0x00
 
#define BUS_CLK_45   0x01
 
#define BUS_CLK_11   0x02
 
#define BUS_CLK_1_5   0x03
 
#define CLK_3   0x00
 
#define CLK_4_43   0x10
 
#define CLK_6   0x14
 
#define CLK_8   0x18
 
#define CLK_12   0x1c
 
#define OBD_SEND_START   0xc5 /* value to generate I2c_bus START condition */
 
#define OBD_SEND_STOP   0xc3 /* value to generate I2c_bus STOP condition */
 
#define PCF8584_MAX_CHANNELS   8
 
#define PCF8584_GLOBALADDR_TYPE   6 /* global address monitor */
 
#define PCF8584_FANSTAT_TYPE   3 /* fan status monitor */
 
#define PCF8584_VOLTAGE_TYPE   2 /* voltage monitor */
 
#define PCF8584_TEMP_TYPE   1 /* temperature monitor*/
 
#define ENVCTRL_NOMON   0
 
#define ENVCTRL_CPUTEMP_MON   1 /* cpu temperature monitor */
 
#define ENVCTRL_CPUVOLTAGE_MON   2 /* voltage monitor */
 
#define ENVCTRL_FANSTAT_MON   3 /* fan status monitor */
 
#define ENVCTRL_ETHERTEMP_MON   4 /* ethernet temperature */
 
#define ENVCTRL_VOLTAGESTAT_MON   5 /* voltage status monitor */
 
#define ENVCTRL_MTHRBDTEMP_MON   6 /* motherboard temperature */
 
#define ENVCTRL_SCSITEMP_MON   7 /* scsi temperature */
 
#define ENVCTRL_GLOBALADDR_MON   8 /* global address */
 
#define I2C_ADC   0 /* pcf8591 */
 
#define I2C_GPIO   1 /* pcf8571 */
 
#define ENVCTRL_TRANSLATE_NO   0
 
#define ENVCTRL_TRANSLATE_PARTIAL   1
 
#define ENVCTRL_TRANSLATE_COMBINED   2
 
#define ENVCTRL_TRANSLATE_FULL   3 /* table[data] */
 
#define ENVCTRL_TRANSLATE_SCALE   4 /* table[data]/scale */
 
#define ENVCTRL_MAX_CPU   4
 
#define CHANNEL_DESC_SZ   256
 
#define ENVCTRL_GLOBALADDR_ADDR_MASK   0x1F
 
#define ENVCTRL_GLOBALADDR_PSTAT_MASK   0x60
 
#define ENVCTRL_CPCI_IGNORED_NODE   0x70
 
#define PCF8584_DATA   0x00
 
#define PCF8584_CSR   0x01
 

Functions

 MODULE_DEVICE_TABLE (of, envctrl_match)
 
 module_platform_driver (envctrl_driver)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define BUS_CLK_11   0x02

Definition at line 67 of file envctrl.c.

#define BUS_CLK_1_5   0x03

Definition at line 68 of file envctrl.c.

#define BUS_CLK_45   0x01

Definition at line 66 of file envctrl.c.

#define BUS_CLK_90   0x00

Definition at line 65 of file envctrl.c.

#define CHANNEL_DESC_SZ   256

Definition at line 120 of file envctrl.c.

#define CLK_12   0x1c

Definition at line 74 of file envctrl.c.

#define CLK_3   0x00

Definition at line 70 of file envctrl.c.

#define CLK_4_43   0x10

Definition at line 71 of file envctrl.c.

#define CLK_6   0x14

Definition at line 72 of file envctrl.c.

#define CLK_8   0x18

Definition at line 73 of file envctrl.c.

#define CONTROL_ACK   0x01

Definition at line 51 of file envctrl.c.

#define CONTROL_ENI   0x08

Definition at line 48 of file envctrl.c.

#define CONTROL_ES0   0x40

Definition at line 45 of file envctrl.c.

#define CONTROL_ES1   0x20

Definition at line 46 of file envctrl.c.

#define CONTROL_ES2   0x10

Definition at line 47 of file envctrl.c.

#define CONTROL_PIN   0x80

Definition at line 44 of file envctrl.c.

#define CONTROL_STA   0x04

Definition at line 49 of file envctrl.c.

#define CONTROL_STO   0x02

Definition at line 50 of file envctrl.c.

#define DRIVER_NAME   "envctrl"

Definition at line 37 of file envctrl.c.

#define ENVCTRL_CPCI_IGNORED_NODE   0x70

Definition at line 129 of file envctrl.c.

#define ENVCTRL_CPUTEMP_MON   1 /* cpu temperature monitor */

Definition at line 92 of file envctrl.c.

#define ENVCTRL_CPUVOLTAGE_MON   2 /* voltage monitor */

Definition at line 93 of file envctrl.c.

#define ENVCTRL_ETHERTEMP_MON   4 /* ethernet temperature */

Definition at line 95 of file envctrl.c.

#define ENVCTRL_FANSTAT_MON   3 /* fan status monitor */

Definition at line 94 of file envctrl.c.

#define ENVCTRL_GLOBALADDR_ADDR_MASK   0x1F

Definition at line 123 of file envctrl.c.

#define ENVCTRL_GLOBALADDR_MON   8 /* global address */

Definition at line 100 of file envctrl.c.

#define ENVCTRL_GLOBALADDR_PSTAT_MASK   0x60

Definition at line 124 of file envctrl.c.

#define ENVCTRL_MAX_CPU   4

Definition at line 119 of file envctrl.c.

#define ENVCTRL_MINOR   162

Definition at line 40 of file envctrl.c.

#define ENVCTRL_MTHRBDTEMP_MON   6 /* motherboard temperature */

Definition at line 98 of file envctrl.c.

#define ENVCTRL_NOMON   0

Definition at line 91 of file envctrl.c.

#define ENVCTRL_SCSITEMP_MON   7 /* scsi temperature */

Definition at line 99 of file envctrl.c.

#define ENVCTRL_TRANSLATE_COMBINED   2

Definition at line 114 of file envctrl.c.

#define ENVCTRL_TRANSLATE_FULL   3 /* table[data] */

Definition at line 115 of file envctrl.c.

#define ENVCTRL_TRANSLATE_NO   0

Definition at line 112 of file envctrl.c.

#define ENVCTRL_TRANSLATE_PARTIAL   1

Definition at line 113 of file envctrl.c.

#define ENVCTRL_TRANSLATE_SCALE   4 /* table[data]/scale */

Definition at line 116 of file envctrl.c.

#define ENVCTRL_VOLTAGESTAT_MON   5 /* voltage status monitor */

Definition at line 97 of file envctrl.c.

#define I2C_ADC   0 /* pcf8591 */

Definition at line 105 of file envctrl.c.

#define I2C_GPIO   1 /* pcf8571 */

Definition at line 106 of file envctrl.c.

#define OBD_SEND_START   0xc5 /* value to generate I2c_bus START condition */

Definition at line 76 of file envctrl.c.

#define OBD_SEND_STOP   0xc3 /* value to generate I2c_bus STOP condition */

Definition at line 77 of file envctrl.c.

#define PCF8584_ADDRESS   0x55

Definition at line 42 of file envctrl.c.

#define PCF8584_CSR   0x01

Definition at line 132 of file envctrl.c.

#define PCF8584_DATA   0x00

Definition at line 131 of file envctrl.c.

#define PCF8584_FANSTAT_TYPE   3 /* fan status monitor */

Definition at line 84 of file envctrl.c.

#define PCF8584_GLOBALADDR_TYPE   6 /* global address monitor */

Definition at line 83 of file envctrl.c.

#define PCF8584_MAX_CHANNELS   8

Definition at line 82 of file envctrl.c.

#define PCF8584_TEMP_TYPE   1 /* temperature monitor*/

Definition at line 86 of file envctrl.c.

#define PCF8584_VOLTAGE_TYPE   2 /* voltage monitor */

Definition at line 85 of file envctrl.c.

#define PFX   DRIVER_NAME ": "

Definition at line 38 of file envctrl.c.

#define STATUS_AAB   0x04

Definition at line 58 of file envctrl.c.

#define STATUS_AD0   0x08

Definition at line 57 of file envctrl.c.

#define STATUS_BB   0x01

Definition at line 60 of file envctrl.c.

#define STATUS_BER   0x10

Definition at line 55 of file envctrl.c.

#define STATUS_LAB   0x02

Definition at line 59 of file envctrl.c.

#define STATUS_LRB   0x08

Definition at line 56 of file envctrl.c.

#define STATUS_PIN   0x80

Definition at line 53 of file envctrl.c.

#define STATUS_STS   0x20

Definition at line 54 of file envctrl.c.

Function Documentation

MODULE_DEVICE_TABLE ( of  ,
envctrl_match   
)
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( envctrl_driver  )