Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
asus_atk0110.c File Reference
#include <linux/debugfs.h>
#include <linux/kernel.h>
#include <linux/hwmon.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/dmi.h>
#include <linux/jiffies.h>
#include <linux/err.h>
#include <acpi/acpi.h>
#include <acpi/acpixf.h>
#include <acpi/acpi_drivers.h>
#include <acpi/acpi_bus.h>

Go to the source code of this file.

Data Structures

struct  atk_data
 
struct  atk_sensor_data
 
struct  atk_acpi_ret_buffer
 
struct  atk_acpi_input_buf
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define ATK_HID   "ATK0110"
 
#define CACHE_TIME   HZ
 
#define BOARD_ID   "MBIF"
 
#define METHOD_ENUMERATE   "GGRP"
 
#define METHOD_READ   "GITM"
 
#define METHOD_WRITE   "SITM"
 
#define METHOD_OLD_READ_TMP   "RTMP"
 
#define METHOD_OLD_READ_VLT   "RVLT"
 
#define METHOD_OLD_READ_FAN   "RFAN"
 
#define METHOD_OLD_ENUM_TMP   "TSIF"
 
#define METHOD_OLD_ENUM_VLT   "VSIF"
 
#define METHOD_OLD_ENUM_FAN   "FSIF"
 
#define ATK_MUX_HWMON   0x00000006ULL
 
#define ATK_MUX_MGMT   0x00000011ULL
 
#define ATK_CLASS_MASK   0xff000000ULL
 
#define ATK_CLASS_FREQ_CTL   0x03000000ULL
 
#define ATK_CLASS_FAN_CTL   0x04000000ULL
 
#define ATK_CLASS_HWMON   0x06000000ULL
 
#define ATK_CLASS_MGMT   0x11000000ULL
 
#define ATK_TYPE_MASK   0x00ff0000ULL
 
#define HWMON_TYPE_VOLT   0x00020000ULL
 
#define HWMON_TYPE_TEMP   0x00030000ULL
 
#define HWMON_TYPE_FAN   0x00040000ULL
 
#define ATK_ELEMENT_ID_MASK   0x0000ffffULL
 
#define ATK_EC_ID   0x11060004ULL
 
#define _HWMON_NEW_PACK_SIZE   7
 
#define _HWMON_NEW_PACK_FLAGS   0
 
#define _HWMON_NEW_PACK_NAME   1
 
#define _HWMON_NEW_PACK_UNK1   2
 
#define _HWMON_NEW_PACK_UNK2   3
 
#define _HWMON_NEW_PACK_LIMIT1   4
 
#define _HWMON_NEW_PACK_LIMIT2   5
 
#define _HWMON_NEW_PACK_ENABLE   6
 
#define _HWMON_OLD_PACK_SIZE   5
 
#define _HWMON_OLD_PACK_FLAGS   0
 
#define _HWMON_OLD_PACK_NAME   1
 
#define _HWMON_OLD_PACK_LIMIT1   2
 
#define _HWMON_OLD_PACK_LIMIT2   3
 
#define _HWMON_OLD_PACK_ENABLE   4
 
#define ATTR_NAME_SIZE   16 /* Worst case is "tempN_input" */
 
#define input_to_atk_sensor(attr)   container_of(attr, struct atk_sensor_data, input_attr)
 
#define label_to_atk_sensor(attr)   container_of(attr, struct atk_sensor_data, label_attr)
 
#define limit1_to_atk_sensor(attr)   container_of(attr, struct atk_sensor_data, limit1_attr)
 
#define limit2_to_atk_sensor(attr)   container_of(attr, struct atk_sensor_data, limit2_attr)
 

Typedefs

typedef ssize_t(* sysfs_show_func )(struct device *dev, struct device_attribute *attr, char *buf)
 

Enumerations

enum  atk_pack_member {
  HWMON_PACK_FLAGS, HWMON_PACK_NAME, HWMON_PACK_LIMIT1, HWMON_PACK_LIMIT2,
  HWMON_PACK_ENABLE
}
 

Functions

 module_param (new_if, bool, 0)
 
 MODULE_PARM_DESC (new_if,"Override detection heuristic and force the use of the new ATK0110 interface")
 
 MODULE_DEVICE_TABLE (acpi, atk_ids)
 
 module_init (atk0110_init)
 
 module_exit (atk0110_exit)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define _HWMON_NEW_PACK_ENABLE   6

Definition at line 100 of file asus_atk0110.c.

#define _HWMON_NEW_PACK_FLAGS   0

Definition at line 94 of file asus_atk0110.c.

#define _HWMON_NEW_PACK_LIMIT1   4

Definition at line 98 of file asus_atk0110.c.

#define _HWMON_NEW_PACK_LIMIT2   5

Definition at line 99 of file asus_atk0110.c.

#define _HWMON_NEW_PACK_NAME   1

Definition at line 95 of file asus_atk0110.c.

#define _HWMON_NEW_PACK_SIZE   7

Definition at line 93 of file asus_atk0110.c.

#define _HWMON_NEW_PACK_UNK1   2

Definition at line 96 of file asus_atk0110.c.

#define _HWMON_NEW_PACK_UNK2   3

Definition at line 97 of file asus_atk0110.c.

#define _HWMON_OLD_PACK_ENABLE   4

Definition at line 108 of file asus_atk0110.c.

#define _HWMON_OLD_PACK_FLAGS   0

Definition at line 104 of file asus_atk0110.c.

#define _HWMON_OLD_PACK_LIMIT1   2

Definition at line 106 of file asus_atk0110.c.

#define _HWMON_OLD_PACK_LIMIT2   3

Definition at line 107 of file asus_atk0110.c.

#define _HWMON_OLD_PACK_NAME   1

Definition at line 105 of file asus_atk0110.c.

#define _HWMON_OLD_PACK_SIZE   5

Definition at line 103 of file asus_atk0110.c.

#define ATK_CLASS_FAN_CTL   0x04000000ULL

Definition at line 71 of file asus_atk0110.c.

#define ATK_CLASS_FREQ_CTL   0x03000000ULL

Definition at line 70 of file asus_atk0110.c.

#define ATK_CLASS_HWMON   0x06000000ULL

Definition at line 72 of file asus_atk0110.c.

#define ATK_CLASS_MASK   0xff000000ULL

Definition at line 69 of file asus_atk0110.c.

#define ATK_CLASS_MGMT   0x11000000ULL

Definition at line 73 of file asus_atk0110.c.

#define ATK_EC_ID   0x11060004ULL

Definition at line 82 of file asus_atk0110.c.

#define ATK_ELEMENT_ID_MASK   0x0000ffffULL

Definition at line 80 of file asus_atk0110.c.

#define ATK_HID   "ATK0110"

Definition at line 26 of file asus_atk0110.c.

#define ATK_MUX_HWMON   0x00000006ULL

Definition at line 66 of file asus_atk0110.c.

#define ATK_MUX_MGMT   0x00000011ULL

Definition at line 67 of file asus_atk0110.c.

#define ATK_TYPE_MASK   0x00ff0000ULL

Definition at line 75 of file asus_atk0110.c.

#define ATTR_NAME_SIZE   16 /* Worst case is "tempN_input" */

Definition at line 150 of file asus_atk0110.c.

#define BOARD_ID   "MBIF"

Definition at line 55 of file asus_atk0110.c.

#define CACHE_TIME   HZ

Definition at line 53 of file asus_atk0110.c.

#define HWMON_TYPE_FAN   0x00040000ULL

Definition at line 78 of file asus_atk0110.c.

#define HWMON_TYPE_TEMP   0x00030000ULL

Definition at line 77 of file asus_atk0110.c.

#define HWMON_TYPE_VOLT   0x00020000ULL

Definition at line 76 of file asus_atk0110.c.

#define input_to_atk_sensor (   attr)    container_of(attr, struct atk_sensor_data, input_attr)

Definition at line 208 of file asus_atk0110.c.

#define label_to_atk_sensor (   attr)    container_of(attr, struct atk_sensor_data, label_attr)

Definition at line 211 of file asus_atk0110.c.

#define limit1_to_atk_sensor (   attr)    container_of(attr, struct atk_sensor_data, limit1_attr)

Definition at line 214 of file asus_atk0110.c.

#define limit2_to_atk_sensor (   attr)    container_of(attr, struct atk_sensor_data, limit2_attr)

Definition at line 217 of file asus_atk0110.c.

#define METHOD_ENUMERATE   "GGRP"

Definition at line 56 of file asus_atk0110.c.

#define METHOD_OLD_ENUM_FAN   "FSIF"

Definition at line 64 of file asus_atk0110.c.

#define METHOD_OLD_ENUM_TMP   "TSIF"

Definition at line 62 of file asus_atk0110.c.

#define METHOD_OLD_ENUM_VLT   "VSIF"

Definition at line 63 of file asus_atk0110.c.

#define METHOD_OLD_READ_FAN   "RFAN"

Definition at line 61 of file asus_atk0110.c.

#define METHOD_OLD_READ_TMP   "RTMP"

Definition at line 59 of file asus_atk0110.c.

#define METHOD_OLD_READ_VLT   "RVLT"

Definition at line 60 of file asus_atk0110.c.

#define METHOD_READ   "GITM"

Definition at line 57 of file asus_atk0110.c.

#define METHOD_WRITE   "SITM"

Definition at line 58 of file asus_atk0110.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 8 of file asus_atk0110.c.

Typedef Documentation

typedef ssize_t(* sysfs_show_func)(struct device *dev, struct device_attribute *attr, char *buf)

Definition at line 141 of file asus_atk0110.c.

Enumeration Type Documentation

Enumerator:
HWMON_PACK_FLAGS 
HWMON_PACK_NAME 
HWMON_PACK_LIMIT1 
HWMON_PACK_LIMIT2 
HWMON_PACK_ENABLE 

Definition at line 84 of file asus_atk0110.c.

Function Documentation

MODULE_DEVICE_TABLE ( acpi  ,
atk_ids   
)
module_exit ( atk0110_exit  )
module_init ( atk0110_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( new_if  ,
bool  ,
 
)
MODULE_PARM_DESC ( new_if  ,
"Override detection heuristic and force the use of the new ATK0110 interface  
)