Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
scx200_acb.c File Reference
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/scx200.h>

Go to the source code of this file.

Data Structures

struct  scx200_acb_iface
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define MAX_DEVICES   4
 
#define POLL_TIMEOUT   (HZ/5)
 
#define ACBSDA   (iface->base + 0)
 
#define ACBST   (iface->base + 1)
 
#define ACBST_SDAST   0x40 /* SDA Status */
 
#define ACBST_BER   0x20
 
#define ACBST_NEGACK   0x10 /* Negative Acknowledge */
 
#define ACBST_STASTR   0x08 /* Stall After Start */
 
#define ACBST_MASTER   0x02
 
#define ACBCST   (iface->base + 2)
 
#define ACBCST_BB   0x02
 
#define ACBCTL1   (iface->base + 3)
 
#define ACBCTL1_STASTRE   0x80
 
#define ACBCTL1_NMINTE   0x40
 
#define ACBCTL1_ACK   0x10
 
#define ACBCTL1_STOP   0x02
 
#define ACBCTL1_START   0x01
 
#define ACBADDR   (iface->base + 4)
 
#define ACBCTL2   (iface->base + 5)
 
#define ACBCTL2_ENABLE   0x01
 

Enumerations

enum  scx200_acb_state {
  state_idle, state_address, state_command, state_repeat_start,
  state_quick, state_read, state_write
}
 

Functions

 MODULE_AUTHOR ("Christer Weinigel <[email protected]>")
 
 MODULE_DESCRIPTION ("NatSemi SCx200 ACCESS.bus Driver")
 
 MODULE_ALIAS ("platform:cs5535-smb")
 
 MODULE_LICENSE ("GPL")
 
 module_param_array (base, int, NULL, 0)
 
 MODULE_PARM_DESC (base,"Base addresses for the ACCESS.bus controllers")
 
 module_init (scx200_acb_init)
 
 module_exit (scx200_acb_cleanup)
 

Macro Definition Documentation

#define ACBADDR   (iface->base + 4)

Definition at line 107 of file scx200_acb.c.

#define ACBCST   (iface->base + 2)

Definition at line 99 of file scx200_acb.c.

#define ACBCST_BB   0x02

Definition at line 100 of file scx200_acb.c.

#define ACBCTL1   (iface->base + 3)

Definition at line 101 of file scx200_acb.c.

#define ACBCTL1_ACK   0x10

Definition at line 104 of file scx200_acb.c.

#define ACBCTL1_NMINTE   0x40

Definition at line 103 of file scx200_acb.c.

#define ACBCTL1_START   0x01

Definition at line 106 of file scx200_acb.c.

#define ACBCTL1_STASTRE   0x80

Definition at line 102 of file scx200_acb.c.

#define ACBCTL1_STOP   0x02

Definition at line 105 of file scx200_acb.c.

#define ACBCTL2   (iface->base + 5)

Definition at line 108 of file scx200_acb.c.

#define ACBCTL2_ENABLE   0x01

Definition at line 109 of file scx200_acb.c.

#define ACBSDA   (iface->base + 0)

Definition at line 92 of file scx200_acb.c.

#define ACBST   (iface->base + 1)

Definition at line 93 of file scx200_acb.c.

#define ACBST_BER   0x20

Definition at line 95 of file scx200_acb.c.

#define ACBST_MASTER   0x02

Definition at line 98 of file scx200_acb.c.

#define ACBST_NEGACK   0x10 /* Negative Acknowledge */

Definition at line 96 of file scx200_acb.c.

#define ACBST_SDAST   0x40 /* SDA Status */

Definition at line 94 of file scx200_acb.c.

#define ACBST_STASTR   0x08 /* Stall After Start */

Definition at line 97 of file scx200_acb.c.

#define MAX_DEVICES   4

Definition at line 47 of file scx200_acb.c.

#define POLL_TIMEOUT   (HZ/5)

Definition at line 52 of file scx200_acb.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 26 of file scx200_acb.c.

Enumeration Type Documentation

Enumerator:
state_idle 
state_address 
state_command 
state_repeat_start 
state_quick 
state_read 
state_write 

Definition at line 54 of file scx200_acb.c.

Function Documentation

MODULE_ALIAS ( "platform:cs5535-smb"  )
MODULE_AUTHOR ( "Christer Weinigel <[email protected]>"  )
MODULE_DESCRIPTION ( "NatSemi SCx200 ACCESS.bus Driver"  )
module_exit ( scx200_acb_cleanup  )
module_init ( scx200_acb_init  )
MODULE_LICENSE ( "GPL"  )
module_param_array ( base  ,
int  ,
NULL  ,
 
)
MODULE_PARM_DESC ( base  ,
"Base addresses for the ACCESS.bus controllers"   
)