mbgtools-lx  4.2.8
mbg_lx.h File Reference
#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h>
#include <linux/param.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <linux/sched/task_stack.h>
#include <linux/cdev.h>
#include <linux/kthread.h>

Go to the source code of this file.

Macros

#define clock()   jiffies
 
#define _MBG_INIT_CODE_ATTR   __init
 
#define __devinit
 
#define __devinitdata
 
#define __devexit
 
#define __devexit_p(_x)   _x
 
#define _DEFAULT_MBG_TGT_LINUX_USE_PCI_PNP   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 ) )
 
#define _DEFAULT_MBG_TGT_LINUX_USE_USB
 
#define _USE_LINUX_SYSFS   ( defined( CONFIG_SYSFS ) )
 
#define _USE_LINUX_DEVFS   ( defined( CONFIG_DEVFS_FS ) )
 
#define _USE_LINUX_DEVFS_26
 
#define _USE_LINUX_DEVFS_24
 
#define _PCPS_CHK_BUFFER_DMA_CAPABLE   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 27 ) )
 
#define _pcps_buffer_is_dma_capable(_b)   ( !is_vmalloc_addr( _b ) && !object_is_on_stack( _b ) )
 
#define _PCPS_USB_TIMEOUT_IS_MS   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 12 ) )
 
#define _PCPS_USB_FULL_CYCLIC_INTV   ( LINUX_VERSION_CODE < KERNEL_VERSION( 2, 6, 11 ) )
 
#define _PCPS_USE_LINUX_KTHREAD   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 10 ) )
 
#define NEW_FASYNC   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 18 ) )
 
#define NEW_FASYNC2   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 ) )
 
#define NEW_WAIT_QUEUE   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 18 ) )
 
#define NEW_FILE_OPS   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 ) )
 
#define USE_WAIT_EVENT   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 20 ) )
 
#define ESPIPE_BY_VFS   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 8 ) )
 
#define FLUSH_WITH_LOCK_OWNER_ID
 
#define REQUEST_IRQ_WO_REGS
 
#define IRQ_NONE
 
#define IRQ_HANDLED
 
#define GENERIC_GPIO_SUPPORTED   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 34 ) )
 
#define _PCPS_MUST_UPDATE_USE_COUNT   ( LINUX_VERSION_CODE < KERNEL_VERSION( 2, 6, 0 ) )
 
#define _PCPS_HAVE_LINUX_CLASS   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 0 ) )
 
#define _PCPS_HAVE_LINUX_CLASS_SIMPLE   ( _PCPS_HAVE_LINUX_CLASS && ( LINUX_VERSION_CODE < KERNEL_VERSION( 2, 6, 13 ) ) )
 
#define _PCPS_HAVE_LINUX_CLASS_CREATE   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 13 ) )
 
#define _PCPS_CLASS_DEVICE_CREATE_WITH_PARENT   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 14 ) )
 
#define _PCPS_CLASS_DEV_OBSOLETED   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 26 ) )
 
#define _PCPS_DEVICE_CREATE_WITH_DEV_DATA   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 27 ) )
 
#define STRUCT_USB_DEVICE_HAS_SERIAL   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 12 ) )
 
#define STRUCT_USB_DEVICE_HAS_STATIC_SERIAL   0
 
#define VMA_HAS_VM_PGOFF   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 0 ) )
 
#define _PCPS_HAS_REMAP_PFN   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 10 ) )
 
#define NEED_IMINOR   ( LINUX_VERSION_CODE < KERNEL_VERSION( 2, 4, 0 ) )
 

Typedefs

typedef void irqreturn_t
 

Variables

unsigned long volatile jiffies
 

Macro Definition Documentation

◆ __devexit

#define __devexit

Definition at line 106 of file mbg_lx.h.

◆ __devexit_p

#define __devexit_p (   _x)    _x

Definition at line 114 of file mbg_lx.h.

◆ __devinit

#define __devinit

Definition at line 98 of file mbg_lx.h.

◆ __devinitdata

#define __devinitdata

Definition at line 102 of file mbg_lx.h.

◆ _DEFAULT_MBG_TGT_LINUX_USE_PCI_PNP

#define _DEFAULT_MBG_TGT_LINUX_USE_PCI_PNP   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 ) )

Definition at line 119 of file mbg_lx.h.

◆ _DEFAULT_MBG_TGT_LINUX_USE_USB

#define _DEFAULT_MBG_TGT_LINUX_USE_USB
Value:
( ( defined( CONFIG_USB ) || defined( CONFIG_USB_MODULE ) ) && \
( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 0 ) ) )

Definition at line 122 of file mbg_lx.h.

◆ _MBG_INIT_CODE_ATTR

#define _MBG_INIT_CODE_ATTR   __init

Definition at line 92 of file mbg_lx.h.

◆ _pcps_buffer_is_dma_capable

#define _pcps_buffer_is_dma_capable (   _b)    ( !is_vmalloc_addr( _b ) && !object_is_on_stack( _b ) )

Definition at line 164 of file mbg_lx.h.

◆ _PCPS_CHK_BUFFER_DMA_CAPABLE

#define _PCPS_CHK_BUFFER_DMA_CAPABLE   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 27 ) )

Definition at line 152 of file mbg_lx.h.

◆ _PCPS_CLASS_DEV_OBSOLETED

#define _PCPS_CLASS_DEV_OBSOLETED   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 26 ) )

Definition at line 292 of file mbg_lx.h.

◆ _PCPS_CLASS_DEVICE_CREATE_WITH_PARENT

#define _PCPS_CLASS_DEVICE_CREATE_WITH_PARENT   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 14 ) )

Definition at line 289 of file mbg_lx.h.

◆ _PCPS_DEVICE_CREATE_WITH_DEV_DATA

#define _PCPS_DEVICE_CREATE_WITH_DEV_DATA   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 27 ) )

Definition at line 295 of file mbg_lx.h.

◆ _PCPS_HAS_REMAP_PFN

#define _PCPS_HAS_REMAP_PFN   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 10 ) )

Definition at line 398 of file mbg_lx.h.

◆ _PCPS_HAVE_LINUX_CLASS

#define _PCPS_HAVE_LINUX_CLASS   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 0 ) )

Definition at line 280 of file mbg_lx.h.

◆ _PCPS_HAVE_LINUX_CLASS_CREATE

#define _PCPS_HAVE_LINUX_CLASS_CREATE   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 13 ) )

Definition at line 286 of file mbg_lx.h.

◆ _PCPS_HAVE_LINUX_CLASS_SIMPLE

#define _PCPS_HAVE_LINUX_CLASS_SIMPLE   ( _PCPS_HAVE_LINUX_CLASS && ( LINUX_VERSION_CODE < KERNEL_VERSION( 2, 6, 13 ) ) )

Definition at line 283 of file mbg_lx.h.

◆ _PCPS_MUST_UPDATE_USE_COUNT

#define _PCPS_MUST_UPDATE_USE_COUNT   ( LINUX_VERSION_CODE < KERNEL_VERSION( 2, 6, 0 ) )

Definition at line 277 of file mbg_lx.h.

◆ _PCPS_USB_FULL_CYCLIC_INTV

#define _PCPS_USB_FULL_CYCLIC_INTV   ( LINUX_VERSION_CODE < KERNEL_VERSION( 2, 6, 11 ) )

Definition at line 183 of file mbg_lx.h.

◆ _PCPS_USB_TIMEOUT_IS_MS

#define _PCPS_USB_TIMEOUT_IS_MS   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 12 ) )

Definition at line 171 of file mbg_lx.h.

◆ _PCPS_USE_LINUX_KTHREAD

#define _PCPS_USE_LINUX_KTHREAD   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 10 ) )

Definition at line 190 of file mbg_lx.h.

◆ _USE_LINUX_DEVFS

#define _USE_LINUX_DEVFS   ( defined( CONFIG_DEVFS_FS ) )

Definition at line 129 of file mbg_lx.h.

◆ _USE_LINUX_DEVFS_24

#define _USE_LINUX_DEVFS_24
Value:
( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 ) ) )
#define _USE_LINUX_DEVFS
Definition: mbg_lx.h:129

Definition at line 136 of file mbg_lx.h.

◆ _USE_LINUX_DEVFS_26

#define _USE_LINUX_DEVFS_26
Value:
( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 0 ) ) )
#define _USE_LINUX_DEVFS
Definition: mbg_lx.h:129

Definition at line 132 of file mbg_lx.h.

◆ _USE_LINUX_SYSFS

#define _USE_LINUX_SYSFS   ( defined( CONFIG_SYSFS ) )

Definition at line 126 of file mbg_lx.h.

◆ clock

#define clock ( )    jiffies

Definition at line 89 of file mbg_lx.h.

Referenced by pcps_wait_busy().

◆ ESPIPE_BY_VFS

#define ESPIPE_BY_VFS   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 8 ) )

Definition at line 230 of file mbg_lx.h.

◆ FLUSH_WITH_LOCK_OWNER_ID

#define FLUSH_WITH_LOCK_OWNER_ID
Value:
( ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 18 ) ) \
|| defined( FL_CLOSE ) )

Definition at line 241 of file mbg_lx.h.

◆ GENERIC_GPIO_SUPPORTED

#define GENERIC_GPIO_SUPPORTED   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 34 ) )

Definition at line 270 of file mbg_lx.h.

◆ IRQ_HANDLED

#define IRQ_HANDLED

Definition at line 262 of file mbg_lx.h.

Referenced by mbgclock_irq_handler().

◆ IRQ_NONE

#define IRQ_NONE

Definition at line 261 of file mbg_lx.h.

Referenced by mbgclock_irq_handler().

◆ NEED_IMINOR

#define NEED_IMINOR   ( LINUX_VERSION_CODE < KERNEL_VERSION( 2, 4, 0 ) )

Definition at line 413 of file mbg_lx.h.

◆ NEW_FASYNC

#define NEW_FASYNC   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 18 ) )

Definition at line 203 of file mbg_lx.h.

◆ NEW_FASYNC2

#define NEW_FASYNC2   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 ) )

Definition at line 208 of file mbg_lx.h.

◆ NEW_FILE_OPS

#define NEW_FILE_OPS   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 0 ) )

Definition at line 219 of file mbg_lx.h.

◆ NEW_WAIT_QUEUE

#define NEW_WAIT_QUEUE   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 2, 18 ) )

Definition at line 213 of file mbg_lx.h.

◆ REQUEST_IRQ_WO_REGS

#define REQUEST_IRQ_WO_REGS
Value:
( ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 19 ) \
|| defined( _LINUX_BH_H ) ) )

Definition at line 252 of file mbg_lx.h.

◆ STRUCT_USB_DEVICE_HAS_SERIAL

#define STRUCT_USB_DEVICE_HAS_SERIAL   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 12 ) )

Definition at line 378 of file mbg_lx.h.

◆ STRUCT_USB_DEVICE_HAS_STATIC_SERIAL

#define STRUCT_USB_DEVICE_HAS_STATIC_SERIAL   0

Definition at line 383 of file mbg_lx.h.

◆ USE_WAIT_EVENT

#define USE_WAIT_EVENT   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 4, 20 ) )

Definition at line 225 of file mbg_lx.h.

◆ VMA_HAS_VM_PGOFF

#define VMA_HAS_VM_PGOFF   ( LINUX_VERSION_CODE >= KERNEL_VERSION( 2, 6, 0 ) )

Definition at line 389 of file mbg_lx.h.

Typedef Documentation

◆ irqreturn_t

typedef void irqreturn_t

Definition at line 260 of file mbg_lx.h.

Variable Documentation

◆ jiffies

unsigned long volatile jiffies