Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
i2c-pasemi.c File Reference
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/sched.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/io.h>

Go to the source code of this file.

Data Structures

struct  pasemi_smbus
 

Macros

#define REG_MTXFIFO   0x00
 
#define REG_MRXFIFO   0x04
 
#define REG_SMSTA   0x14
 
#define REG_CTL   0x1c
 
#define MTXFIFO_READ   0x00000400
 
#define MTXFIFO_STOP   0x00000200
 
#define MTXFIFO_START   0x00000100
 
#define MTXFIFO_DATA_M   0x000000ff
 
#define MRXFIFO_EMPTY   0x00000100
 
#define MRXFIFO_DATA_M   0x000000ff
 
#define SMSTA_XEN   0x08000000
 
#define SMSTA_MTN   0x00200000
 
#define CTL_MRR   0x00000400
 
#define CTL_MTR   0x00000200
 
#define CTL_CLK_M   0x000000ff
 
#define CLK_100K_DIV   84
 
#define CLK_400K_DIV   21
 
#define TXFIFO_WR(smbus, reg)   reg_write((smbus), REG_MTXFIFO, (reg))
 
#define RXFIFO_RD(smbus)   reg_read((smbus), REG_MRXFIFO)
 

Functions

 MODULE_DEVICE_TABLE (pci, pasemi_smb_ids)
 
 module_pci_driver (pasemi_smb_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Olof Johansson <[email protected]>")
 
 MODULE_DESCRIPTION ("PA Semi PWRficient SMBus driver")
 

Macro Definition Documentation

#define CLK_100K_DIV   84

Definition at line 61 of file i2c-pasemi.c.

#define CLK_400K_DIV   21

Definition at line 62 of file i2c-pasemi.c.

#define CTL_CLK_M   0x000000ff

Definition at line 59 of file i2c-pasemi.c.

#define CTL_MRR   0x00000400

Definition at line 57 of file i2c-pasemi.c.

#define CTL_MTR   0x00000200

Definition at line 58 of file i2c-pasemi.c.

#define MRXFIFO_DATA_M   0x000000ff

Definition at line 52 of file i2c-pasemi.c.

#define MRXFIFO_EMPTY   0x00000100

Definition at line 51 of file i2c-pasemi.c.

#define MTXFIFO_DATA_M   0x000000ff

Definition at line 49 of file i2c-pasemi.c.

#define MTXFIFO_READ   0x00000400

Definition at line 46 of file i2c-pasemi.c.

#define MTXFIFO_START   0x00000100

Definition at line 48 of file i2c-pasemi.c.

#define MTXFIFO_STOP   0x00000200

Definition at line 47 of file i2c-pasemi.c.

#define REG_CTL   0x1c

Definition at line 43 of file i2c-pasemi.c.

#define REG_MRXFIFO   0x04

Definition at line 41 of file i2c-pasemi.c.

#define REG_MTXFIFO   0x00

Definition at line 40 of file i2c-pasemi.c.

#define REG_SMSTA   0x14

Definition at line 42 of file i2c-pasemi.c.

#define RXFIFO_RD (   smbus)    reg_read((smbus), REG_MRXFIFO)

Definition at line 81 of file i2c-pasemi.c.

#define SMSTA_MTN   0x00200000

Definition at line 55 of file i2c-pasemi.c.

#define SMSTA_XEN   0x08000000

Definition at line 54 of file i2c-pasemi.c.

#define TXFIFO_WR (   smbus,
  reg 
)    reg_write((smbus), REG_MTXFIFO, (reg))

Definition at line 80 of file i2c-pasemi.c.

Function Documentation

MODULE_AUTHOR ( "Olof Johansson <[email protected]>"  )
MODULE_DESCRIPTION ( "PA Semi PWRficient SMBus driver )
MODULE_DEVICE_TABLE ( pci  ,
pasemi_smb_ids   
)
MODULE_LICENSE ( "GPL"  )
module_pci_driver ( pasemi_smb_driver  )