Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
sbshc.c File Reference
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include <linux/wait.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include "sbshc.h"

Go to the source code of this file.

Data Structures

struct  acpi_smb_hc
 
union  acpi_smb_status
 

Macros

#define PREFIX   "ACPI: "
 
#define ACPI_SMB_HC_CLASS   "smbus_host_ctl"
 
#define ACPI_SMB_HC_DEVICE_NAME   "ACPI SMBus HC"
 

Typedefs

typedef int(* acpi_ec_query_func )(void *data)
 

Enumerations

enum  acpi_smb_status_codes {
  SMBUS_OK = 0, SMBUS_UNKNOWN_FAILURE = 0x07, SMBUS_DEVICE_ADDRESS_NACK = 0x10, SMBUS_DEVICE_ERROR = 0x11,
  SMBUS_DEVICE_COMMAND_ACCESS_DENIED = 0x12, SMBUS_UNKNOWN_ERROR = 0x13, SMBUS_DEVICE_ACCESS_DENIED = 0x17, SMBUS_TIMEOUT = 0x18,
  SMBUS_HOST_UNSUPPORTED_PROTOCOL = 0x19, SMBUS_BUSY = 0x1a, SMBUS_PEC_ERROR = 0x1f
}
 
enum  acpi_smb_offset {
  ACPI_SMB_PROTOCOL = 0, ACPI_SMB_STATUS = 1, ACPI_SMB_ADDRESS = 2, ACPI_SMB_COMMAND = 3,
  ACPI_SMB_DATA = 4, ACPI_SMB_BLOCK_COUNT = 0x24, ACPI_SMB_ALARM_ADDRESS = 0x25, ACPI_SMB_ALARM_DATA = 0x26
}
 

Functions

 MODULE_DEVICE_TABLE (acpi, sbs_device_ids)
 
int acpi_smbus_read (struct acpi_smb_hc *hc, u8 protocol, u8 address, u8 command, u8 *data)
 
 EXPORT_SYMBOL_GPL (acpi_smbus_read)
 
int acpi_smbus_write (struct acpi_smb_hc *hc, u8 protocol, u8 address, u8 command, u8 *data, u8 length)
 
 EXPORT_SYMBOL_GPL (acpi_smbus_write)
 
int acpi_smbus_register_callback (struct acpi_smb_hc *hc, smbus_alarm_callback callback, void *context)
 
 EXPORT_SYMBOL_GPL (acpi_smbus_register_callback)
 
int acpi_smbus_unregister_callback (struct acpi_smb_hc *hc)
 
 EXPORT_SYMBOL_GPL (acpi_smbus_unregister_callback)
 
int acpi_ec_add_query_handler (struct acpi_ec *ec, u8 query_bit, acpi_handle handle, acpi_ec_query_func func, void *data)
 
void acpi_ec_remove_query_handler (struct acpi_ec *ec, u8 query_bit)
 
 module_acpi_driver (acpi_smb_hc_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Alexey Starikovskiy")
 
 MODULE_DESCRIPTION ("ACPI SMBus HC driver")
 

Macro Definition Documentation

#define ACPI_SMB_HC_CLASS   "smbus_host_ctl"

Definition at line 22 of file sbshc.c.

#define ACPI_SMB_HC_DEVICE_NAME   "ACPI SMBus HC"

Definition at line 23 of file sbshc.c.

#define PREFIX   "ACPI: "

Definition at line 20 of file sbshc.c.

Typedef Documentation

typedef int(* acpi_ec_query_func)(void *data)

Definition at line 255 of file sbshc.c.

Enumeration Type Documentation

Enumerator:
ACPI_SMB_PROTOCOL 
ACPI_SMB_STATUS 
ACPI_SMB_ADDRESS 
ACPI_SMB_COMMAND 
ACPI_SMB_DATA 
ACPI_SMB_BLOCK_COUNT 
ACPI_SMB_ALARM_ADDRESS 
ACPI_SMB_ALARM_DATA 

Definition at line 80 of file sbshc.c.

Enumerator:
SMBUS_OK 
SMBUS_UNKNOWN_FAILURE 
SMBUS_DEVICE_ADDRESS_NACK 
SMBUS_DEVICE_ERROR 
SMBUS_DEVICE_COMMAND_ACCESS_DENIED 
SMBUS_UNKNOWN_ERROR 
SMBUS_DEVICE_ACCESS_DENIED 
SMBUS_TIMEOUT 
SMBUS_HOST_UNSUPPORTED_PROTOCOL 
SMBUS_BUSY 
SMBUS_PEC_ERROR 

Definition at line 66 of file sbshc.c.

Function Documentation

int acpi_ec_add_query_handler ( struct acpi_ec ec,
u8  query_bit,
acpi_handle  handle,
acpi_ec_query_func  func,
void data 
)

Definition at line 526 of file ec.c.

void acpi_ec_remove_query_handler ( struct acpi_ec ec,
u8  query_bit 
)

Definition at line 547 of file ec.c.

int acpi_smbus_read ( struct acpi_smb_hc hc,
u8  protocol,
u8  address,
u8  command,
u8 data 
)

Definition at line 180 of file sbshc.c.

int acpi_smbus_register_callback ( struct acpi_smb_hc hc,
smbus_alarm_callback  callback,
void context 
)

Definition at line 196 of file sbshc.c.

int acpi_smbus_unregister_callback ( struct acpi_smb_hc hc)

Definition at line 208 of file sbshc.c.

int acpi_smbus_write ( struct acpi_smb_hc hc,
u8  protocol,
u8  address,
u8  command,
u8 data,
u8  length 
)

Definition at line 188 of file sbshc.c.

EXPORT_SYMBOL_GPL ( acpi_smbus_read  )
EXPORT_SYMBOL_GPL ( acpi_smbus_write  )
EXPORT_SYMBOL_GPL ( acpi_smbus_register_callback  )
EXPORT_SYMBOL_GPL ( acpi_smbus_unregister_callback  )
module_acpi_driver ( acpi_smb_hc_driver  )
MODULE_AUTHOR ( "Alexey Starikovskiy"  )
MODULE_DESCRIPTION ( "ACPI SMBus HC driver )
MODULE_DEVICE_TABLE ( acpi  ,
sbs_device_ids   
)
MODULE_LICENSE ( "GPL"  )