IPMUX1IPMUX2IPMUX3: minte module

RTL96xx (RTL9607,...)

minte module


详细描述

THE FORMAT is FOR DOXYGEN to Generate the document opulan.com.

作者:
[email protected]
版本:
v0.2
日期:
June-29-2007 date description
----------------------------------------------------------------- June-29-2007 mainly from the old version and rewrite the opulan_read function.
July-05-2007 distill the interrupt handle way from the old ipmux driver module.
July-09-2007 change transfer global g_opl_chip_irq_pending to get_irq_pending() and clear_irq_pending().


模块

组  function_description(opl_minte.c)
#define OPL_MINTE_MAJOR   120
#define OPL_MINTE_DEVICE   "opl_minte"

Macro definition

#define opl_minte_hw0_irqexit   ipmux_hw0_irqexit
#define opl_minte_hw0_irqinit   ipmux_hw0_irqinit
int ipmux_hw0_irqinit (void)
 description: request the ipmux irq and enable the its intr.
void ipmux_hw0_irqexit (void)
 description: free irq,and disable ipmux interrupt.

the variable and function imported.

u32 get_irq_pending (void)
void clear_irq_pending (void)
void ipmux_irq_enable (unsigned int irq)
void ipmux_irq_disable (unsigned int irq)

local function declaration

int opl_minte_open (struct inode *inode, struct file *filp)
int opl_minte_release (struct inode *inode, struct file *filp)
ssize_t opl_minte_read (struct file *filp, char *buffer, size_t length, loff_t *offset)
 description: copy the opl_chip_irq_pending(indicate which interrupt occured) to user App, which will handle its interrupt.if the no irq pending occured,the process will sleep until the isr wake up it.
ssize_t opl_minte_write (struct file *filp, const char *buffer, size_t length, loff_t *offset)
 description: because the enable irq or disable irq will be in atomic mode,so it should be operated in kernel mode is correct.

the global variable declaration and definition.

u32 g_opl_chip_irq_event = 0
wait_queue_head_t g_opl_chip_waitq

local variable declaration and definition

u32 opl_minte_open_count = 0
u32 opl_minte_is_open = 0
file_operations opl_minte_fops

宏定义文档

#define OPL_MINTE_DEVICE   "opl_minte"
 

在文件opl_minte.c36行定义。

参考自 opl_minte_exit()opl_minte_init().

#define opl_minte_hw0_irqexit   ipmux_hw0_irqexit
 

在文件opl_minte.h23行定义。

参考自 opl_minte_exit().

#define opl_minte_hw0_irqinit   ipmux_hw0_irqinit
 

在文件opl_minte.h24行定义。

参考自 opl_minte_init().

#define OPL_MINTE_MAJOR   120
 

在文件opl_minte.c35行定义。

参考自 opl_minte_exit()opl_minte_init().


函数文档

void clear_irq_pending void   ) 
 

参考自 opl_minte_read().

u32 get_irq_pending void   ) 
 

参考自 opl_minte_read().

void ipmux_hw0_irqexit void   ) 
 

description: free irq,and disable ipmux interrupt.

参数:
void 
返回:
NULL
参见:
ipmux_module_exit()
Deprecated:

在文件ipmux_interrupt.c165行定义。

参考 OPL_IPMUX_IRQREG_INT_EN_ATBREG_INT_EN_BRGREG_INT_EN_DNTMREG_INT_EN_IWFREG_INT_EN_MCREG_INT_EN_POS_UPTREG_INT_EN_PPEREG_INT_EN_UPTMturn_off_level2_intr().

int ipmux_hw0_irqinit void   ) 
 

description: request the ipmux irq and enable the its intr.

参数:
void 
返回值:
0 success
-1 failure
参见:
ipmux_module_init
Deprecated:

在文件ipmux_interrupt.c139行定义。

参考 intr_statusipmux_interrupt_handler()OPL_IPMUX_IRQREG_INT_EN_ATBREG_INT_EN_BRGREG_INT_EN_DNTMREG_INT_EN_IWFREG_INT_EN_MCREG_INT_EN_POS_UPTREG_INT_EN_PPEREG_INT_EN_UPTMturn_on_level2_intr().

void ipmux_irq_disable unsigned int  irq  ) 
 

参考自 opl_host_ioctl()opl_minte_write().

void ipmux_irq_enable unsigned int  irq  ) 
 

参考自 opl_host_ioctl()opl_minte_write().

int opl_minte_open struct inode *  inode,
struct file *  filp
[static]
 

在文件opl_minte.c163行定义。

参考 opl_minte_is_openopl_minte_open_count.

ssize_t opl_minte_read struct file *  filp,
char *  buffer,
size_t  length,
loff_t *  offset
[static]
 

description: copy the opl_chip_irq_pending(indicate which interrupt occured) to user App, which will handle its interrupt.if the no irq pending occured,the process will sleep until the isr wake up it.

参数:
struct file *filp
char *buffer
size_t length
loff_t offset
返回:
the length of bytes process read.
参见:
opl_minte_interrupt_handler
Deprecated:

在文件opl_minte.c109行定义。

参考 clear_irq_pending()g_opl_chip_irq_eventg_opl_chip_waitqget_irq_pending()opl_minte_is_openu32.

int opl_minte_release struct inode *  inode,
struct file *  filp
[static]
 

在文件opl_minte.c172行定义。

参考 opl_minte_is_openopl_minte_open_count.

ssize_t opl_minte_write struct file *  filp,
const char *  buffer,
size_t  length,
loff_t *  offset
[static]
 

description: because the enable irq or disable irq will be in atomic mode,so it should be operated in kernel mode is correct.

the value in user *buffer it is the enable or disable. 1. enable 0. disable if the value is enable, to enble the ipmux interrupt, call the function in malta_int.c

参数:
@param const char *buffer: contain the value(0-disable or 1-enable).
 
返回值:
0 is success
!0 failure. the device is not open or copy *buf from user to kernel fails.
参见:
Deprecated:

在文件opl_minte.c146行定义。

参考 ipmux_irq_disable()ipmux_irq_enable()OPL_IPMUX_IRQopl_minte_is_open.


变量文档

u32 g_opl_chip_irq_event = 0
 

在文件opl_minte.c61行定义。

参考自 ipmux_interrupt_handler()opl_minte_read().

wait_queue_head_t g_opl_chip_waitq
 

在文件opl_minte.c62行定义。

参考自 ipmux_interrupt_handler()opl_minte_init()opl_minte_read().

struct file_operations opl_minte_fops
 

初始化序列:

 {
  .read = opl_minte_read,
  .write = opl_minte_write,
  .open = opl_minte_open,
  .release = opl_minte_release, 
}

在文件opl_minte.c83行定义。

参考自 opl_minte_init().

u32 opl_minte_is_open = 0 [static]
 

在文件opl_minte.c82行定义。

参考自 opl_minte_open()opl_minte_read()opl_minte_release()opl_minte_write().

u32 opl_minte_open_count = 0 [static]
 

在文件opl_minte.c81行定义。

参考自 opl_minte_open()opl_minte_release().


Generated at Mon Jul 30 16:43:48 2007 for IPMUX1IPMUX2IPMUX3 by  doxygen 1.3.9.1