mbgtools-lx  4.2.8
mbgclock_main.c File Reference
#include <mbgclock.h>
#include <mbgversion.h>
#include <mbgioctl.h>
#include <pcpsirq.h>
#include <mbgddmsg.h>
#include <stddef.h>
#include <linux/termios.h>
#include <linux/pci.h>
#include <macioctl.h>
#include <lx-shared.h>

Go to the source code of this file.

Macros

#define EXPORT_SYMTAB
 
#define _MBGCLOCK
 
#define MBG_COPYRIGHT   "(c) Meinberg 2001-" MBG_CURRENT_COPYRIGHT_YEAR_STR
 
#define MBG_DRVR_NAME   "mbgclock"
 
#define MBGCLOCK_MAX_DEVS   20
 
#define DEBUG_IRQ_LATENCY   0
 
#define DEBUG_IRQ_TIMING   0
 
#define DEBUG_SYS_IRQS   0
 
#define OMIT_PRIV_CHECKING   0
 
#define DRV_NAME   MBG_DRVR_NAME
 
#define MBG_SIZE_TLG   33
 
#define _min(_a, _b)   ( ( (_b) < (_a) ) ? (_b) : (_a) )
 
#define CYCLIC_TIMEOUT   ( (ulong) 2 * HZ )
 
#define _kill_fasync(_fa, _sig, _band)   kill_fasync( *(_fa), _sig )
 
#define __exit
 
#define DEBUG_HW_LPT   0
 
#define _mbg_dbg_hw_lpt_vars
 
#define _mbg_dbg_hw_lpt_set_bit(_b)   ;
 
#define _mbg_dbg_hw_lpt_clr_bit(_b)   ;
 
#define _usb_read_thread_should_stop()   signal_pending( current )
 
#define _usb_read_thread_exit(_pddev, _v)   complete_and_exit( &pddev->usb_read_thread.exit, (_v) )
 
#define _usb_read_thread_started(_pddev)   ( (_pddev)->usb_read_thread.pid != 0 )
 
#define _usb_read_thread_start(_fnc, _pddev)
 
#define _usb_read_thread_failed_to_start(_pddev)   ( (_pddev)->usb_read_thread.pid == 0 )
 
#define _usb_read_thread_set_unused(_pddev)   (_pddev)->usb_read_thread.pid = 0;
 
#define _usb_read_thread_stop(_pddev)
 
#define _usb_read_thread_daemonize(_pddev)
 

Functions

static void mbgdrvr_delete_device (PCPS_DDEV *pddev)
 
static void ddev_list_free (void)
 
static int ddev_list_alloc (void)
 
static PCPS_DDEV ** ddev_list_locate_minor (unsigned int minor)
 
static PCPS_DDEV ** ddev_list_locate_device (PCPS_BUS_FLAGS bus_flags, PCPS_DEV_ID dev_id, PCPS_SN_STR sernum)
 
static int ddev_list_remove_entry (PCPS_DDEV *pddev)
 
static int ddev_list_add_entry (PCPS_DDEV *pddev)
 
static void pcps_time_to_time_str (const PCPS_TIME *t, char *s, size_t max_len)
 
static irqreturn_t mbgclock_irq_handler (int hw_irq, void *arg, struct pt_regs *regs)
 
__mbg_inline int get_cyclic_lock (PCPS_DDEV *pddev, unsigned long *p_flags, const char *fnc_name)
 
__mbg_inline void release_cyclic_lock (PCPS_DDEV *pddev, unsigned long *p_flags, const char *fnc_name)
 
static int mbgdrvr_disable_cyclic (PCPS_DDEV *pddev)
 
static int mbgdrvr_enable_cyclic (PCPS_DDEV *pddev, unsigned int force)
 
static unsigned int mbgclock_poll (struct file *filp, poll_table *pt)
 
static int mbgclock_fasync (int fd, struct file *filp, int on)
 
static int mbgclock_flush (struct file *filp)
 
static int mbgclock_open (struct inode *inode, struct file *filp)
 
static int mbgclock_release (struct inode *inode, struct file *filp)
 
static ssize_t mbgclock_read (struct file *filp, char *buffer, size_t count, loff_t *ppos)
 
static ssize_t mbgclock_write (struct file *filp, const char *buffer, size_t count, loff_t *ppos)
 
static int mbgdrvr_ioctl_emu_serial (struct file *filp, unsigned int cmd, unsigned long arg)
 
static long mbgclock_unlocked_ioctl (struct file *filp, unsigned int cmd, unsigned long arg)
 
static int mbgclock_ioctl (struct inode *not_used, struct file *filp, unsigned int cmd, unsigned long arg)
 
static int mbgclock_mmap (struct file *filp, struct vm_area_struct *vma)
 
int __init mbgclock_init_module (void)
 
int mbgclock_default_get_fast_hr_timestamp (PCPS_TIME_STAMP *p_ts)
 Read a high resolution PCPS_TIME_STAMP structure via memory mapped access. More...
 
 EXPORT_SYMBOL (mbgclock_default_get_fast_hr_timestamp)
 
int mbgclock_default_get_fast_hr_timestamp_cycles (PCPS_TIME_STAMP_CYCLES *p_ts_cyc)
 Read a high resolution PCPS_TIME_STAMP_CYCLES structure via memory mapped access. More...
 
 EXPORT_SYMBOL (mbgclock_default_get_fast_hr_timestamp_cycles)
 
int mbgclock_default_clr_ucap_buff (void)
 Clear the on-board user capture FIFO buffer. More...
 
 EXPORT_SYMBOL (mbgclock_default_clr_ucap_buff)
 
int mbgclock_default_get_ucap_entries (PCPS_UCAP_ENTRIES *p)
 Read user capture FIFO information. More...
 
 EXPORT_SYMBOL (mbgclock_default_get_ucap_entries)
 
int mbgclock_default_get_ucap_event (PCPS_HR_TIME *p)
 Retrieve single time capture event. More...
 
 EXPORT_SYMBOL (mbgclock_default_get_ucap_event)
 

Variables

PCPS_DRVR_INFO drvr_info
 
int pretend_sync
 
static PCPS_DDEVdefault_fast_hr_time_pddev
 
static PCPS_DDEVdefault_ucap_pddev
 
static int io [PCPS_MAX_ISA_CARDS]
 
static int irq [PCPS_MAX_ISA_CARDS]
 
static int major = 0
 
static int minor = 0
 
static int max_devs = 20
 
static int ddev_list_alloc_size
 
static PCPS_DDEV ** ddev_list
 
static struct semaphore sem_fops
 
struct file_operations mbgclock_fops
 
MBGCLOCK_DEFAULT_GET_FAST_HR_TIMESTAMP_FNC get_fast_hr_timestamp_fnc = mbgclock_default_get_fast_hr_timestamp
 
MBGCLOCK_DEFAULT_GET_FAST_HR_TIMESTAMP_CYCLES_FNC get_fast_hr_timestamp_cycles_fnc = mbgclock_default_get_fast_hr_timestamp_cycles
 
MBGCLOCK_DEFAULT_CLR_UCAP_BUFF_FNC clr_ucap_buff_fnc = mbgclock_default_clr_ucap_buff
 
MBGCLOCK_DEFAULT_GET_UCAP_ENTRIES_FNC get_ucap_entries_fnc = mbgclock_default_get_ucap_entries
 
MBGCLOCK_DEFAULT_GET_UCAP_EVENT_FNC get_ucap_event_fnc = mbgclock_default_get_ucap_event
 

Macro Definition Documentation

◆ __exit

#define __exit

Definition at line 384 of file mbgclock_main.c.

◆ _kill_fasync

#define _kill_fasync (   _fa,
  _sig,
  _band 
)    kill_fasync( *(_fa), _sig )

Definition at line 378 of file mbgclock_main.c.

Referenced by mbgclock_irq_handler(), and release_cyclic_lock().

◆ _mbg_dbg_hw_lpt_clr_bit

#define _mbg_dbg_hw_lpt_clr_bit (   _b)    ;

◆ _mbg_dbg_hw_lpt_set_bit

#define _mbg_dbg_hw_lpt_set_bit (   _b)    ;

◆ _mbg_dbg_hw_lpt_vars

#define _mbg_dbg_hw_lpt_vars

◆ _MBGCLOCK

#define _MBGCLOCK

Definition at line 172 of file mbgclock_main.c.

◆ _min

#define _min (   _a,
  _b 
)    ( ( (_b) < (_a) ) ? (_b) : (_a) )

Definition at line 367 of file mbgclock_main.c.

Referenced by mbgclock_read().

◆ _usb_read_thread_daemonize

#define _usb_read_thread_daemonize (   _pddev)
Value:
snprintf( (_pddev)->usb_read_thread.name, sizeof( (_pddev)->usb_read_thread.name ), \
"%s%d", driver_name, MINOR( (_pddev)->lx_dev ) ); \
daemonize( (_pddev)->usb_read_thread.name ); \
allow_signal( SIGKILL )
const char driver_name[]

Definition at line 535 of file mbgclock_main.c.

Referenced by release_cyclic_lock().

◆ _usb_read_thread_exit

#define _usb_read_thread_exit (   _pddev,
  _v 
)    complete_and_exit( &pddev->usb_read_thread.exit, (_v) )

Definition at line 515 of file mbgclock_main.c.

Referenced by release_cyclic_lock().

◆ _usb_read_thread_failed_to_start

#define _usb_read_thread_failed_to_start (   _pddev)    ( (_pddev)->usb_read_thread.pid == 0 )

Definition at line 525 of file mbgclock_main.c.

Referenced by mbgdrvr_enable_cyclic().

◆ _usb_read_thread_set_unused

#define _usb_read_thread_set_unused (   _pddev)    (_pddev)->usb_read_thread.pid = 0;

Definition at line 528 of file mbgclock_main.c.

Referenced by mbgdrvr_enable_cyclic(), and release_cyclic_lock().

◆ _usb_read_thread_should_stop

#define _usb_read_thread_should_stop ( )    signal_pending( current )

Definition at line 512 of file mbgclock_main.c.

Referenced by release_cyclic_lock().

◆ _usb_read_thread_start

#define _usb_read_thread_start (   _fnc,
  _pddev 
)
Value:
init_completion( &(_pddev)->usb_read_thread.exit ); \
(_pddev)->usb_read_thread.pid = kernel_thread( (_fnc), (_pddev), CLONE_KERNEL );

Definition at line 521 of file mbgclock_main.c.

Referenced by mbgdrvr_enable_cyclic().

◆ _usb_read_thread_started

#define _usb_read_thread_started (   _pddev)    ( (_pddev)->usb_read_thread.pid != 0 )

Definition at line 518 of file mbgclock_main.c.

Referenced by mbgdrvr_disable_cyclic(), and mbgdrvr_enable_cyclic().

◆ _usb_read_thread_stop

#define _usb_read_thread_stop (   _pddev)
Value:
kill_proc( (_pddev)->usb_read_thread.pid, SIGKILL, 1 ); \
wait_for_completion( &(_pddev)->usb_read_thread.exit )

Definition at line 531 of file mbgclock_main.c.

Referenced by mbgdrvr_disable_cyclic().

◆ CYCLIC_TIMEOUT

#define CYCLIC_TIMEOUT   ( (ulong) 2 * HZ )

Definition at line 369 of file mbgclock_main.c.

Referenced by mbgclock_poll(), and mbgclock_read().

◆ DEBUG_HW_LPT

#define DEBUG_HW_LPT   0

Definition at line 395 of file mbgclock_main.c.

◆ DEBUG_IRQ_LATENCY

#define DEBUG_IRQ_LATENCY   0

Definition at line 201 of file mbgclock_main.c.

◆ DEBUG_IRQ_TIMING

#define DEBUG_IRQ_TIMING   0

Definition at line 209 of file mbgclock_main.c.

◆ DEBUG_SYS_IRQS

#define DEBUG_SYS_IRQS   0

Definition at line 217 of file mbgclock_main.c.

◆ DRV_NAME

#define DRV_NAME   MBG_DRVR_NAME

Definition at line 363 of file mbgclock_main.c.

◆ EXPORT_SYMTAB

#define EXPORT_SYMTAB

Definition at line 170 of file mbgclock_main.c.

◆ MBG_COPYRIGHT

#define MBG_COPYRIGHT   "(c) Meinberg 2001-" MBG_CURRENT_COPYRIGHT_YEAR_STR

Definition at line 190 of file mbgclock_main.c.

Referenced by mbgclock_init_module().

◆ MBG_DRVR_NAME

#define MBG_DRVR_NAME   "mbgclock"

Definition at line 192 of file mbgclock_main.c.

Referenced by pcps_init_ddev(), and pcps_probe_device().

◆ MBG_SIZE_TLG

#define MBG_SIZE_TLG   33

Definition at line 365 of file mbgclock_main.c.

Referenced by mbgclock_read().

◆ MBGCLOCK_MAX_DEVS

#define MBGCLOCK_MAX_DEVS   20

Definition at line 195 of file mbgclock_main.c.

◆ OMIT_PRIV_CHECKING

#define OMIT_PRIV_CHECKING   0

Definition at line 225 of file mbgclock_main.c.

Function Documentation

◆ ddev_list_add_entry()

static int ddev_list_add_entry ( PCPS_DDEV pddev)
static

Definition at line 673 of file mbgclock_main.c.

References max_devs, mbg_kdd_msg(), and MBG_LOG_WARN.

◆ ddev_list_alloc()

static int ddev_list_alloc ( void  )
static

◆ ddev_list_free()

static void ddev_list_free ( void  )
static

Definition at line 548 of file mbgclock_main.c.

References _mbgddmsg_0, _pcps_kfree, ddev_list_alloc_size, DEBUG_DRVR, and MBG_LOG_INFO.

◆ ddev_list_locate_device()

static PCPS_DDEV** ddev_list_locate_device ( PCPS_BUS_FLAGS  bus_flags,
PCPS_DEV_ID  dev_id,
PCPS_SN_STR  sernum 
)
static

◆ ddev_list_locate_minor()

static PCPS_DDEV** ddev_list_locate_minor ( unsigned int  minor)
static

Definition at line 587 of file mbgclock_main.c.

References max_devs, mbg_kdd_msg(), and MBG_LOG_WARN.

Referenced by mbgclock_open().

◆ ddev_list_remove_entry()

static int ddev_list_remove_entry ( PCPS_DDEV pddev)
static

Definition at line 648 of file mbgclock_main.c.

References PCPS_DDEV_s::lx_dev, max_devs, mbg_kdd_msg(), and MBG_LOG_WARN.

◆ EXPORT_SYMBOL() [1/5]

◆ EXPORT_SYMBOL() [2/5]

◆ EXPORT_SYMBOL() [3/5]

EXPORT_SYMBOL ( mbgclock_default_clr_ucap_buff  )

◆ EXPORT_SYMBOL() [4/5]

EXPORT_SYMBOL ( mbgclock_default_get_ucap_entries  )

◆ EXPORT_SYMBOL() [5/5]

EXPORT_SYMBOL ( mbgclock_default_get_ucap_event  )

◆ get_cyclic_lock()

__mbg_inline int get_cyclic_lock ( PCPS_DDEV pddev,
unsigned long *  p_flags,
const char *  fnc_name 
)

Definition at line 842 of file mbgclock_main.c.

References _down_interruptible_pddev, and _pcps_ddev_is_usb.

Referenced by mbgclock_poll(), and mbgclock_read().

◆ mbgclock_default_clr_ucap_buff()

int mbgclock_default_clr_ucap_buff ( void  )

Clear the on-board user capture FIFO buffer.

This function can be called from other kernel drivers to clear the user capture FIFO buffer on the first device registered by the driver which supports this call.

Returns
MBG_SUCCESS on success, or MBG_ERR_NOT_SUPP_BY_DEV if no device supports this call, or MBG_ERR_IRQ_UNSAFE if called on a device where such calls are unsafe if IRQs are enabled.
See also
mbgclock_default_get_ucap_entries
mbgclock_default_get_ucap_event

Definition at line 2781 of file mbgclock_main.c.

References _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit, _mbgddmsg_fnc_exit_err_dec, _pcps_sem_dec, _pcps_sem_inc_safe, _pcps_write_byte, EXPORT_SYMBOL(), MBG_ERR_IRQ_UNSAFE, MBG_ERR_NOT_SUPP_BY_DEV, and PCPS_CLR_UCAP_BUFF.

◆ mbgclock_default_get_fast_hr_timestamp()

int mbgclock_default_get_fast_hr_timestamp ( PCPS_TIME_STAMP p_ts)

Read a high resolution PCPS_TIME_STAMP structure via memory mapped access.

This function can be called from other kernel drivers to read a timestamp of the current time from the first device registered by the driver which supports this call.

Parameters
*p_tsPointer to a PCPS_TIME_STAMP structure to be filled up
Returns
MBG_SUCCESS on success, or MBG_ERR_NOT_SUPP_BY_DEV if no device supports this call
See also
mbgclock_default_get_fast_hr_timestamp_cycles

Definition at line 2708 of file mbgclock_main.c.

References _mbg_swab_pcps_time_stamp, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit, do_get_fast_hr_timestamp_safe(), EXPORT_SYMBOL(), MBG_ERR_NOT_SUPP_BY_DEV, and MBG_SUCCESS.

◆ mbgclock_default_get_fast_hr_timestamp_cycles()

int mbgclock_default_get_fast_hr_timestamp_cycles ( PCPS_TIME_STAMP_CYCLES p_ts_cyc)

Read a high resolution PCPS_TIME_STAMP_CYCLES structure via memory mapped access.

This function can be called from other kernel drivers to read a timestamp of the current time from the first device registered by the driver which supports this call. The returned structure also contains an associated cycles counter value which can be used to determine the latency.

Parameters
*p_ts_cycPointer to a PCPS_TIME_STAMP_CYCLES structure to be filled up
Returns
MBG_SUCCESS on success, or:: MBG_ERR_NOT_SUPP_BY_DEV if no device supports this call
See also
mbgclock_default_get_fast_hr_timestamp

Definition at line 2745 of file mbgclock_main.c.

References _mbg_swab_pcps_time_stamp_cycles, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit, do_get_fast_hr_timestamp_cycles_safe(), EXPORT_SYMBOL(), MBG_ERR_NOT_SUPP_BY_DEV, and MBG_SUCCESS.

◆ mbgclock_default_get_ucap_entries()

int mbgclock_default_get_ucap_entries ( PCPS_UCAP_ENTRIES p)

Read user capture FIFO information.

Read a PCPS_UCAP_ENTRIES structure to retrieve the number of saved user capture events and the maximum capture buffer size from the first device registered by the driver which supports this call.

Returns
MBG_SUCCESS on success, or MBG_ERR_NOT_SUPP_BY_DEV if no device supports this call, or MBG_ERR_IRQ_UNSAFE if called on a device where such calls are unsafe if IRQs are enabled.
See also
mbgclock_default_clr_ucap_buff
mbgclock_default_get_ucap_event

Definition at line 2823 of file mbgclock_main.c.

References _mbg_swab_pcps_ucap_entries, _mbgddmsg_4, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit_err_dec, _pcps_read_var, _pcps_sem_dec, _pcps_sem_inc_safe, EXPORT_SYMBOL(), PCPS_UCAP_ENTRIES::max, MBG_ERR_IRQ_UNSAFE, MBG_ERR_NOT_SUPP_BY_DEV, MBG_LOG_FMT_LEAVING, MBG_LOG_INFO, PCPS_GIVE_UCAP_ENTRIES, and PCPS_UCAP_ENTRIES::used.

◆ mbgclock_default_get_ucap_event()

int mbgclock_default_get_ucap_event ( PCPS_HR_TIME p)

Retrieve single time capture event.

Retrieve a single time capture event from the on-board FIFO buffer of the first device registered by the driver which supports this call. The captured event time is returned in a PCPS_HR_TIME structure. The oldest entry of the FIFO is retrieved and then removed from the FIFO. If no capture event is available in the FIFO buffer then both the seconds and the fractions of the returned timestamp are 0.

Returns
MBG_SUCCESS on success, or MBG_ERR_NOT_SUPP_BY_DEV if no device supports this call, or MBG_ERR_IRQ_UNSAFE called on a device where such calls are unsafe if IRQs are enabled.
See also
mbgclock_default_clr_ucap_buff
mbgclock_default_get_ucap_entries

Definition at line 2871 of file mbgclock_main.c.

References _mbg_swab_pcps_hr_time, _mbgddmsg_4, _mbgddmsg_fnc_entry, _mbgddmsg_fnc_exit_err_dec, _pcps_read_var, _pcps_sem_dec, _pcps_sem_inc_safe, EXPORT_SYMBOL(), PCPS_TIME_STAMP::frac, MBG_ERR_IRQ_UNSAFE, MBG_ERR_NOT_SUPP_BY_DEV, MBG_LOG_FMT_LEAVING, MBG_LOG_INFO, PCPS_GIVE_UCAP_EVENT, PCPS_TIME_STAMP::sec, and PCPS_HR_TIME::tstamp.

◆ mbgclock_fasync()

static int mbgclock_fasync ( int  fd,
struct file *  filp,
int  on 
)
static

Definition at line 1260 of file mbgclock_main.c.

References PCPS_DDEV_s::fasyncptr, mbgclock_flush(), and mbgdrvr_get_pddev().

◆ mbgclock_flush()

static int mbgclock_flush ( struct file *  filp)
static

Definition at line 1283 of file mbgclock_main.c.

References PCPS_DDEV_s::data_avail, and mbgdrvr_get_pddev().

Referenced by mbgclock_fasync().

◆ mbgclock_init_module()

◆ mbgclock_ioctl()

static int mbgclock_ioctl ( struct inode *  not_used,
struct file *  filp,
unsigned int  cmd,
unsigned long  arg 
)
static

Definition at line 1841 of file mbgclock_main.c.

References _mbgddmsg_1, DEBUG_DRVR, MBG_LOG_INFO, and mbgclock_unlocked_ioctl().

◆ mbgclock_irq_handler()

◆ mbgclock_mmap()

static int mbgclock_mmap ( struct file *  filp,
struct vm_area_struct *  vma 
)
static

◆ mbgclock_open()

static int mbgclock_open ( struct inode *  inode,
struct file *  filp 
)
static

◆ mbgclock_poll()

◆ mbgclock_read()

◆ mbgclock_release()

◆ mbgclock_unlocked_ioctl()

◆ mbgclock_write()

static ssize_t mbgclock_write ( struct file *  filp,
const char *  buffer,
size_t  count,
loff_t *  ppos 
)
static

Definition at line 1622 of file mbgclock_main.c.

References _mbgddmsg_1, and MBG_LOG_WARN.

◆ mbgdrvr_delete_device()

static void mbgdrvr_delete_device ( PCPS_DDEV pddev)
static

Referenced by mbgclock_release().

◆ mbgdrvr_disable_cyclic()

◆ mbgdrvr_enable_cyclic()

◆ mbgdrvr_ioctl_emu_serial()

static int mbgdrvr_ioctl_emu_serial ( struct file *  filp,
unsigned int  cmd,
unsigned long  arg 
)
static

◆ pcps_time_to_time_str()

static void pcps_time_to_time_str ( const PCPS_TIME t,
char *  s,
size_t  max_len 
)
static

◆ release_cyclic_lock()

Variable Documentation

◆ clr_ucap_buff_fnc

◆ ddev_list

PCPS_DDEV** ddev_list
static

Definition at line 387 of file mbgclock_main.c.

◆ ddev_list_alloc_size

int ddev_list_alloc_size
static

Definition at line 258 of file mbgclock_main.c.

Referenced by ddev_list_alloc(), and ddev_list_free().

◆ default_fast_hr_time_pddev

PCPS_DDEV* default_fast_hr_time_pddev
static

Definition at line 238 of file mbgclock_main.c.

◆ default_ucap_pddev

PCPS_DDEV* default_ucap_pddev
static

Definition at line 239 of file mbgclock_main.c.

◆ drvr_info

PCPS_DRVR_INFO drvr_info
Initial value:
= { ( ( 4 << 8 ) | 2 ) ,
0, "mbgclock" " v" STRINGIFY( 4 ) "." STRINGIFY( 2 ) "." STRINGIFY( 6 ) }
#define STRINGIFY(x)
Make a string from a constant definition.
Definition: words.h:695

Definition at line 230 of file mbgclock_main.c.

Referenced by ioctl_switch().

◆ get_fast_hr_timestamp_cycles_fnc

◆ get_fast_hr_timestamp_fnc

◆ get_ucap_entries_fnc

◆ get_ucap_event_fnc

◆ io

int io[PCPS_MAX_ISA_CARDS]
static

Definition at line 251 of file mbgclock_main.c.

Referenced by mbgclock_init_module().

◆ irq

int irq[PCPS_MAX_ISA_CARDS]
static

Definition at line 252 of file mbgclock_main.c.

Referenced by mbgclock_init_module(), and pcps_cleanup_device().

◆ major

int major = 0
static

Definition at line 255 of file mbgclock_main.c.

Referenced by mbg_snprint_revision(), and mbgclock_init_module().

◆ max_devs

◆ mbgclock_fops

struct file_operations mbgclock_fops
Initial value:
=
{
release: mbgclock_release,
fasync: mbgclock_fasync,
llseek: NULL
}
static int mbgclock_flush(struct file *filp)
static int mbgclock_ioctl(struct inode *not_used, struct file *filp, unsigned int cmd, unsigned long arg)
static int mbgclock_open(struct inode *inode, struct file *filp)
static ssize_t mbgclock_write(struct file *filp, const char *buffer, size_t count, loff_t *ppos)
static unsigned int mbgclock_poll(struct file *filp, poll_table *pt)
static ssize_t mbgclock_read(struct file *filp, char *buffer, size_t count, loff_t *ppos)
static int mbgclock_release(struct inode *inode, struct file *filp)
static int mbgclock_mmap(struct file *filp, struct vm_area_struct *vma)
static int mbgclock_fasync(int fd, struct file *filp, int on)

Definition at line 1917 of file mbgclock_main.c.

◆ minor

int minor = 0
static

◆ pretend_sync

int pretend_sync

Definition at line 233 of file mbgclock_main.c.

Referenced by mbgclock_init_module(), and pcps_time_to_time_str().

◆ sem_fops

struct semaphore sem_fops
static