Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
cs.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/major.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/device.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <asm/irq.h>
#include <pcmcia/ss.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/ds.h>
#include "cs_internal.h"

Go to the source code of this file.

Macros

#define INT_MODULE_PARM(n, v)   static int n = v; module_param(n, int, 0444)
 
#define PCMCIA_SOCKET_CLASS_PM_OPS   NULL
 

Functions

 MODULE_AUTHOR ("David Hinds <[email protected]>")
 
 MODULE_DESCRIPTION ("Linux Kernel Card Services")
 
 MODULE_LICENSE ("GPL")
 
 INT_MODULE_PARM (setup_delay, 10)
 
 INT_MODULE_PARM (resume_delay, 20)
 
 INT_MODULE_PARM (shutdown_delay, 3)
 
 INT_MODULE_PARM (vcc_settle, 40)
 
 INT_MODULE_PARM (reset_time, 10)
 
 INT_MODULE_PARM (unreset_delay, 10)
 
 INT_MODULE_PARM (unreset_check, 10)
 
 INT_MODULE_PARM (unreset_limit, 30)
 
 INT_MODULE_PARM (cis_speed, 300)
 
 EXPORT_SYMBOL (dead_socket)
 
 LIST_HEAD (pcmcia_socket_list)
 
 EXPORT_SYMBOL (pcmcia_socket_list)
 
 DECLARE_RWSEM (pcmcia_socket_list_rwsem)
 
 EXPORT_SYMBOL (pcmcia_socket_list_rwsem)
 
struct pcmcia_socketpcmcia_get_socket (struct pcmcia_socket *skt)
 
 EXPORT_SYMBOL (pcmcia_get_socket)
 
void pcmcia_put_socket (struct pcmcia_socket *skt)
 
 EXPORT_SYMBOL (pcmcia_put_socket)
 
int pcmcia_register_socket (struct pcmcia_socket *socket)
 
 EXPORT_SYMBOL (pcmcia_register_socket)
 
void pcmcia_unregister_socket (struct pcmcia_socket *socket)
 
 EXPORT_SYMBOL (pcmcia_unregister_socket)
 
struct pcmcia_socketpcmcia_get_socket_by_nr (unsigned int nr)
 
 EXPORT_SYMBOL (pcmcia_get_socket_by_nr)
 
void pcmcia_parse_events (struct pcmcia_socket *s, u_int events)
 
 EXPORT_SYMBOL (pcmcia_parse_events)
 
void pcmcia_parse_uevents (struct pcmcia_socket *s, u_int events)
 
 EXPORT_SYMBOL (pcmcia_parse_uevents)
 
int pccard_register_pcmcia (struct pcmcia_socket *s, struct pcmcia_callback *c)
 
 EXPORT_SYMBOL (pccard_register_pcmcia)
 
int pcmcia_reset_card (struct pcmcia_socket *skt)
 
 EXPORT_SYMBOL (pcmcia_reset_card)
 
 EXPORT_SYMBOL (pcmcia_socket_class)
 
 subsys_initcall (init_pcmcia_cs)
 
 module_exit (exit_pcmcia_cs)
 

Variables

socket_state_t dead_socket
 
struct class pcmcia_socket_class
 

Macro Definition Documentation

#define INT_MODULE_PARM (   n,
  v 
)    static int n = v; module_param(n, int, 0444)

Definition at line 47 of file cs.c.

#define PCMCIA_SOCKET_CLASS_PM_OPS   NULL

Definition at line 871 of file cs.c.

Function Documentation

DECLARE_RWSEM ( pcmcia_socket_list_rwsem  )
EXPORT_SYMBOL ( dead_socket  )
EXPORT_SYMBOL ( pcmcia_socket_list  )
EXPORT_SYMBOL ( pcmcia_socket_list_rwsem  )
EXPORT_SYMBOL ( pcmcia_get_socket  )
EXPORT_SYMBOL ( pcmcia_put_socket  )
EXPORT_SYMBOL ( pcmcia_register_socket  )
EXPORT_SYMBOL ( pcmcia_unregister_socket  )
EXPORT_SYMBOL ( pcmcia_get_socket_by_nr  )
EXPORT_SYMBOL ( pcmcia_parse_events  )
EXPORT_SYMBOL ( pcmcia_parse_uevents  )
EXPORT_SYMBOL ( pccard_register_pcmcia  )
EXPORT_SYMBOL ( pcmcia_reset_card  )
EXPORT_SYMBOL ( pcmcia_socket_class  )
INT_MODULE_PARM ( setup_delay  ,
10   
)
INT_MODULE_PARM ( resume_delay  ,
20   
)
INT_MODULE_PARM ( shutdown_delay  ,
 
)
INT_MODULE_PARM ( vcc_settle  ,
40   
)
INT_MODULE_PARM ( reset_time  ,
10   
)
INT_MODULE_PARM ( unreset_delay  ,
10   
)
INT_MODULE_PARM ( unreset_check  ,
10   
)
INT_MODULE_PARM ( unreset_limit  ,
30   
)
INT_MODULE_PARM ( cis_speed  ,
300   
)
LIST_HEAD ( pcmcia_socket_list  )
MODULE_AUTHOR ( "David Hinds <[email protected]>"  )
MODULE_DESCRIPTION ( "Linux Kernel Card Services"  )
module_exit ( exit_pcmcia_cs  )
MODULE_LICENSE ( "GPL"  )
int pccard_register_pcmcia ( struct pcmcia_socket s,
struct pcmcia_callback c 
)

Definition at line 727 of file cs.c.

struct pcmcia_socket* pcmcia_get_socket ( struct pcmcia_socket skt)
read

Definition at line 76 of file cs.c.

struct pcmcia_socket* pcmcia_get_socket_by_nr ( unsigned int  nr)
read

Definition at line 235 of file cs.c.

void pcmcia_parse_events ( struct pcmcia_socket s,
u_int  events 
)

Definition at line 686 of file cs.c.

void pcmcia_parse_uevents ( struct pcmcia_socket s,
u_int  events 
)

pcmcia_parse_uevents() - tell pccardd to issue manual commands : the PCMCIA socket we wan't to command : events to pass to pccardd

userspace-issued insert, eject, suspend and resume commands must be handled by pccardd to avoid any sysfs-related deadlocks. Valid events are PCMCIA_UEVENT_EJECT (for eject), PCMCIA_UEVENT__INSERT (for insert), PCMCIA_UEVENT_RESUME (for resume), PCMCIA_UEVENT_SUSPEND (for suspend) and PCMCIA_UEVENT_REQUERY (for re-querying the PCMCIA card).

Definition at line 711 of file cs.c.

void pcmcia_put_socket ( struct pcmcia_socket skt)

Definition at line 86 of file cs.c.

int pcmcia_register_socket ( struct pcmcia_socket socket)

pcmcia_register_socket - add a new pcmcia socket device : the &socket to register

Definition at line 106 of file cs.c.

int pcmcia_reset_card ( struct pcmcia_socket skt)

Definition at line 760 of file cs.c.

void pcmcia_unregister_socket ( struct pcmcia_socket socket)

pcmcia_unregister_socket - remove a pcmcia socket device : the &socket to unregister

Definition at line 209 of file cs.c.

subsys_initcall ( init_pcmcia_cs  )

Variable Documentation

socket_state_t dead_socket
Initial value:
= {
.csc_mask = SS_DETECT,
}

Definition at line 62 of file cs.c.

struct class pcmcia_socket_class
Initial value:
= {
.name = "pcmcia_socket",
.dev_uevent = pcmcia_socket_uevent,
.dev_release = pcmcia_release_socket,
.class_release = pcmcia_release_socket_class,
}

Definition at line 875 of file cs.c.