Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
driver.c File Reference
#include <linux/device.h>
#include <linux/module.h>
#include <linux/rwsem.h>
#include <linux/i2o.h>
#include <linux/workqueue.h>
#include <linux/string.h>
#include <linux/slab.h>
#include "core.h"

Go to the source code of this file.

Macros

#define OSM_NAME   "i2o"
 

Functions

 module_param_named (max_drivers, i2o_max_drivers, uint, 0)
 
 MODULE_PARM_DESC (max_drivers,"maximum number of OSM's to support")
 
int i2o_driver_register (struct i2o_driver *drv)
 
void i2o_driver_unregister (struct i2o_driver *drv)
 
int i2o_driver_dispatch (struct i2o_controller *c, u32 m)
 
void i2o_driver_notify_controller_add_all (struct i2o_controller *c)
 
void i2o_driver_notify_controller_remove_all (struct i2o_controller *c)
 
void i2o_driver_notify_device_add_all (struct i2o_device *i2o_dev)
 
void i2o_driver_notify_device_remove_all (struct i2o_device *i2o_dev)
 
int __init i2o_driver_init (void)
 
void i2o_driver_exit (void)
 
 EXPORT_SYMBOL (i2o_driver_register)
 
 EXPORT_SYMBOL (i2o_driver_unregister)
 
 EXPORT_SYMBOL (i2o_driver_notify_controller_add_all)
 
 EXPORT_SYMBOL (i2o_driver_notify_controller_remove_all)
 
 EXPORT_SYMBOL (i2o_driver_notify_device_add_all)
 
 EXPORT_SYMBOL (i2o_driver_notify_device_remove_all)
 

Variables

struct bus_type i2o_bus_type
 

Macro Definition Documentation

#define OSM_NAME   "i2o"

Definition at line 25 of file driver.c.

Function Documentation

EXPORT_SYMBOL ( i2o_driver_register  )
EXPORT_SYMBOL ( i2o_driver_unregister  )
EXPORT_SYMBOL ( i2o_driver_notify_device_add_all  )
int i2o_driver_dispatch ( struct i2o_controller c,
u32  m 
)

i2o_driver_dispatch - dispatch an I2O reply message : I2O controller of the message : I2O message number

The reply is delivered to the driver from which the original message was. This function is only called from interrupt context.

Returns 0 on success and the message should not be flushed. Returns > 0 on success and if the message should be flushed afterwords. Returns negative error code on failure (the message will be flushed too).

Definition at line 185 of file driver.c.

void i2o_driver_exit ( void  )

i2o_driver_exit - clean up I2O drivers (OSMs)

Unregisters the I2O bus and frees driver array.

Definition at line 367 of file driver.c.

int __init i2o_driver_init ( void  )

i2o_driver_init - initialize I2O drivers (OSMs)

Registers the I2O bus and allocate memory for the array of OSMs.

Returns 0 on success or negative error code on failure.

Definition at line 336 of file driver.c.

void i2o_driver_notify_controller_add_all ( struct i2o_controller c)

i2o_driver_notify_controller_add_all - Send notify of added controller : newly added controller

Send notifications to all registered drivers that a new controller was added.

Definition at line 258 of file driver.c.

void i2o_driver_notify_controller_remove_all ( struct i2o_controller c)

i2o_driver_notify_controller_remove_all - Send notify of removed controller : controller that is being removed

Send notifications to all registered drivers that a controller was removed.

Definition at line 278 of file driver.c.

void i2o_driver_notify_device_add_all ( struct i2o_device i2o_dev)

i2o_driver_notify_device_add_all - Send notify of added device : newly added I2O device

Send notifications to all registered drivers that a device was added.

Definition at line 297 of file driver.c.

void i2o_driver_notify_device_remove_all ( struct i2o_device i2o_dev)

i2o_driver_notify_device_remove_all - Send notify of removed device : device that is being removed

Send notifications to all registered drivers that a device was removed.

Definition at line 316 of file driver.c.

int i2o_driver_register ( struct i2o_driver drv)

i2o_driver_register - Register a I2O driver (OSM) in the I2O core : I2O driver which should be registered

Registers the OSM drv in the I2O core and creates an event queues if necessary.

Returns 0 on success or negative error code on failure.

Definition at line 77 of file driver.c.

void i2o_driver_unregister ( struct i2o_driver drv)

i2o_driver_unregister - Unregister a I2O driver (OSM) from the I2O core : I2O driver which should be unregistered

Unregisters the OSM drv from the I2O core and cleanup event queues if necessary.

Definition at line 144 of file driver.c.

module_param_named ( max_drivers  ,
i2o_max_drivers  ,
uint  ,
 
)
MODULE_PARM_DESC ( max_drivers  ,
"maximum number of OSM's to support  
)

Variable Documentation

struct bus_type i2o_bus_type
Initial value:
= {
.name = "i2o",
.match = i2o_bus_match,
.dev_attrs = i2o_device_attrs
}

Definition at line 62 of file driver.c.