Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hil_mlc.c File Reference
#include <linux/hil_mlc.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/list.h>

Go to the source code of this file.

Macros

#define PREFIX   "HIL MLC: "
 
#define HILSEN_SCHED   0x000100 /* Schedule the tasklet */
 
#define HILSEN_BREAK   0x000200 /* Wait until next pass */
 
#define HILSEN_UP   0x000400 /* relative node#, decrement */
 
#define HILSEN_DOWN   0x000800 /* relative node#, increment */
 
#define HILSEN_FOLLOW   0x001000 /* use retval as next node# */
 
#define HILSEN_MASK   0x0000ff
 
#define HILSEN_START   0
 
#define HILSEN_RESTART   1
 
#define HILSEN_DHR   9
 
#define HILSEN_DHR2   10
 
#define HILSEN_IFC   14
 
#define HILSEN_HEAL0   16
 
#define HILSEN_HEAL   18
 
#define HILSEN_ACF   21
 
#define HILSEN_ACF2   22
 
#define HILSEN_DISC0   25
 
#define HILSEN_DISC   27
 
#define HILSEN_MATCH   40
 
#define HILSEN_OPERATE   41
 
#define HILSEN_PROBE   44
 
#define HILSEN_DSR   52
 
#define HILSEN_REPOLL   55
 
#define HILSEN_IFCACF   58
 
#define HILSEN_END   60
 
#define HILSEN_NEXT   (HILSEN_DOWN | 1)
 
#define HILSEN_SAME   (HILSEN_DOWN | 0)
 
#define HILSEN_LAST   (HILSEN_UP | 1)
 
#define HILSEN_DOZE   (HILSEN_SAME | HILSEN_SCHED | HILSEN_BREAK)
 
#define HILSEN_SLEEP   (HILSEN_SAME | HILSEN_BREAK)
 
#define FUNC(funct, funct_arg, zero_rc, neg_rc, pos_rc)   { HILSE_FUNC, { .func = funct }, funct_arg, zero_rc, neg_rc, pos_rc },
 
#define OUT(pack)   { HILSE_OUT, { .packet = pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 },
 
#define CTS   { HILSE_CTS, { .packet = 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 },
 
#define EXPECT(comp, to, got, got_wrong, timed_out)   { HILSE_EXPECT, { .packet = comp }, to, got, got_wrong, timed_out },
 
#define EXPECT_LAST(comp, to, got, got_wrong, timed_out)   { HILSE_EXPECT_LAST, { .packet = comp }, to, got, got_wrong, timed_out },
 
#define EXPECT_DISC(comp, to, got, got_wrong, timed_out)   { HILSE_EXPECT_DISC, { .packet = comp }, to, got, got_wrong, timed_out },
 
#define IN(to, got, got_error, timed_out)   { HILSE_IN, { .packet = 0 }, to, got, got_error, timed_out },
 
#define OUT_DISC(pack)   { HILSE_OUT_DISC, { .packet = pack }, 0, 0, 0, 0 },
 
#define OUT_LAST(pack)   { HILSE_OUT_LAST, { .packet = pack }, 0, 0, 0, 0 },
 
#define TEST_PACKET(x)   (HIL_PKT_CMD | (x << HIL_PKT_ADDR_SHIFT) | x << 4 | x)
 

Functions

 MODULE_AUTHOR ("Brian S. Julin <[email protected]>")
 
 MODULE_DESCRIPTION ("HIL MLC serio")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
 EXPORT_SYMBOL (hil_mlc_register)
 
 EXPORT_SYMBOL (hil_mlc_unregister)
 
int hil_mlc_register (hil_mlc *mlc)
 
int hil_mlc_unregister (hil_mlc *mlc)
 
 module_init (hil_mlc_init)
 
 module_exit (hil_mlc_exit)
 

Macro Definition Documentation

#define CTS   { HILSE_CTS, { .packet = 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 },

Definition at line 448 of file hil_mlc.c.

#define EXPECT (   comp,
  to,
  got,
  got_wrong,
  timed_out 
)    { HILSE_EXPECT, { .packet = comp }, to, got, got_wrong, timed_out },

Definition at line 450 of file hil_mlc.c.

#define EXPECT_DISC (   comp,
  to,
  got,
  got_wrong,
  timed_out 
)    { HILSE_EXPECT_DISC, { .packet = comp }, to, got, got_wrong, timed_out },

Definition at line 454 of file hil_mlc.c.

#define EXPECT_LAST (   comp,
  to,
  got,
  got_wrong,
  timed_out 
)    { HILSE_EXPECT_LAST, { .packet = comp }, to, got, got_wrong, timed_out },

Definition at line 452 of file hil_mlc.c.

#define FUNC (   funct,
  funct_arg,
  zero_rc,
  neg_rc,
  pos_rc 
)    { HILSE_FUNC, { .func = funct }, funct_arg, zero_rc, neg_rc, pos_rc },

Definition at line 444 of file hil_mlc.c.

#define HILSEN_ACF   21

Definition at line 221 of file hil_mlc.c.

#define HILSEN_ACF2   22

Definition at line 222 of file hil_mlc.c.

#define HILSEN_BREAK   0x000200 /* Wait until next pass */

Definition at line 208 of file hil_mlc.c.

#define HILSEN_DHR   9

Definition at line 216 of file hil_mlc.c.

#define HILSEN_DHR2   10

Definition at line 217 of file hil_mlc.c.

#define HILSEN_DISC   27

Definition at line 224 of file hil_mlc.c.

#define HILSEN_DISC0   25

Definition at line 223 of file hil_mlc.c.

#define HILSEN_DOWN   0x000800 /* relative node#, increment */

Definition at line 210 of file hil_mlc.c.

#define HILSEN_DOZE   (HILSEN_SAME | HILSEN_SCHED | HILSEN_BREAK)

Definition at line 237 of file hil_mlc.c.

#define HILSEN_DSR   52

Definition at line 228 of file hil_mlc.c.

#define HILSEN_END   60

Definition at line 231 of file hil_mlc.c.

#define HILSEN_FOLLOW   0x001000 /* use retval as next node# */

Definition at line 211 of file hil_mlc.c.

#define HILSEN_HEAL   18

Definition at line 220 of file hil_mlc.c.

#define HILSEN_HEAL0   16

Definition at line 219 of file hil_mlc.c.

#define HILSEN_IFC   14

Definition at line 218 of file hil_mlc.c.

#define HILSEN_IFCACF   58

Definition at line 230 of file hil_mlc.c.

#define HILSEN_LAST   (HILSEN_UP | 1)

Definition at line 235 of file hil_mlc.c.

#define HILSEN_MASK   0x0000ff

Definition at line 213 of file hil_mlc.c.

#define HILSEN_MATCH   40

Definition at line 225 of file hil_mlc.c.

#define HILSEN_NEXT   (HILSEN_DOWN | 1)

Definition at line 233 of file hil_mlc.c.

#define HILSEN_OPERATE   41

Definition at line 226 of file hil_mlc.c.

#define HILSEN_PROBE   44

Definition at line 227 of file hil_mlc.c.

#define HILSEN_REPOLL   55

Definition at line 229 of file hil_mlc.c.

#define HILSEN_RESTART   1

Definition at line 215 of file hil_mlc.c.

#define HILSEN_SAME   (HILSEN_DOWN | 0)

Definition at line 234 of file hil_mlc.c.

#define HILSEN_SCHED   0x000100 /* Schedule the tasklet */

Definition at line 207 of file hil_mlc.c.

#define HILSEN_SLEEP   (HILSEN_SAME | HILSEN_BREAK)

Definition at line 238 of file hil_mlc.c.

#define HILSEN_START   0

Definition at line 214 of file hil_mlc.c.

#define HILSEN_UP   0x000400 /* relative node#, decrement */

Definition at line 209 of file hil_mlc.c.

#define IN (   to,
  got,
  got_error,
  timed_out 
)    { HILSE_IN, { .packet = 0 }, to, got, got_error, timed_out },

Definition at line 456 of file hil_mlc.c.

#define OUT (   pack)    { HILSE_OUT, { .packet = pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 },

Definition at line 446 of file hil_mlc.c.

#define OUT_DISC (   pack)    { HILSE_OUT_DISC, { .packet = pack }, 0, 0, 0, 0 },

Definition at line 458 of file hil_mlc.c.

#define OUT_LAST (   pack)    { HILSE_OUT_LAST, { .packet = pack }, 0, 0, 0, 0 },

Definition at line 460 of file hil_mlc.c.

#define PREFIX   "HIL MLC: "

Definition at line 72 of file hil_mlc.c.

#define TEST_PACKET (   x)    (HIL_PKT_CMD | (x << HIL_PKT_ADDR_SHIFT) | x << 4 | x)

Function Documentation

EXPORT_SYMBOL ( hil_mlc_register  )
EXPORT_SYMBOL ( hil_mlc_unregister  )
int hil_mlc_register ( hil_mlc mlc)

Definition at line 907 of file hil_mlc.c.

int hil_mlc_unregister ( hil_mlc mlc)

Definition at line 967 of file hil_mlc.c.

MODULE_AUTHOR ( "Brian S. Julin <[email protected]>"  )
MODULE_DESCRIPTION ( "HIL MLC serio )
module_exit ( hil_mlc_exit  )
module_init ( hil_mlc_init  )
MODULE_LICENSE ( "Dual BSD/GPL"  )