|
Linux Kernel
3.7.1
|
#include <linux/kernel.h>#include <linux/device.h>#include <linux/init.h>#include <linux/module.h>#include <linux/types.h>#include <linux/list.h>#include <linux/superhyway.h>#include <linux/string.h>#include <linux/slab.h>Go to the source code of this file.
Functions | |
| int | superhyway_add_device (unsigned long base, struct superhyway_device *sdev, struct superhyway_bus *bus) |
| int | superhyway_add_devices (struct superhyway_bus *bus, struct superhyway_device **devices, int nr_devices) |
| postcore_initcall (superhyway_init) | |
| int | superhyway_register_driver (struct superhyway_driver *drv) |
| void | superhyway_unregister_driver (struct superhyway_driver *drv) |
| core_initcall (superhyway_bus_init) | |
| module_exit (superhyway_bus_exit) | |
| EXPORT_SYMBOL (superhyway_bus_type) | |
| EXPORT_SYMBOL (superhyway_add_device) | |
| EXPORT_SYMBOL (superhyway_add_devices) | |
| EXPORT_SYMBOL (superhyway_register_driver) | |
| EXPORT_SYMBOL (superhyway_unregister_driver) | |
| MODULE_LICENSE ("GPL") | |
Variables | |
| struct bus_type | superhyway_bus_type |
| core_initcall | ( | superhyway_bus_init | ) |
| EXPORT_SYMBOL | ( | superhyway_bus_type | ) |
| EXPORT_SYMBOL | ( | superhyway_add_device | ) |
| EXPORT_SYMBOL | ( | superhyway_add_devices | ) |
| EXPORT_SYMBOL | ( | superhyway_register_driver | ) |
| EXPORT_SYMBOL | ( | superhyway_unregister_driver | ) |
| module_exit | ( | superhyway_bus_exit | ) |
| MODULE_LICENSE | ( | "GPL" | ) |
| postcore_initcall | ( | superhyway_init | ) |
| int superhyway_add_device | ( | unsigned long | base, |
| struct superhyway_device * | sdev, | ||
| struct superhyway_bus * | bus | ||
| ) |
superhyway_add_device - Add a SuperHyway module : Physical address where module is mapped. : SuperHyway device to add, or NULL to allocate a new one. : Bus where SuperHyway module resides.
This is responsible for adding a new SuperHyway module. This sets up a new struct superhyway_device for the module being added if == NULL.
Devices are initially added in the order that they are scanned (from the top-down of the memory map), and are assigned an ID based on the order that they are added. Any manual addition of a module will thus get the ID after the devices already discovered regardless of where it resides in memory.
Further work can and should be done in superhyway_scan_bus(), to be sure that any new modules are properly discovered and subsequently registered.
Definition at line 53 of file superhyway.c.
| int superhyway_add_devices | ( | struct superhyway_bus * | bus, |
| struct superhyway_device ** | devices, | ||
| int | nr_devices | ||
| ) |
Definition at line 93 of file superhyway.c.
| int superhyway_register_driver | ( | struct superhyway_driver * | drv | ) |
superhyway_register_driver - Register a new SuperHyway driver : SuperHyway driver to register.
This registers the passed in . Any devices matching the id table will automatically be populated and handed off to the driver's specified probe routine.
Definition at line 174 of file superhyway.c.
| void superhyway_unregister_driver | ( | struct superhyway_driver * | drv | ) |
superhyway_unregister_driver - Unregister a SuperHyway driver : SuperHyway driver to unregister.
This cleans up after superhyway_register_driver(), and should be invoked in the exit path of any module drivers.
Definition at line 189 of file superhyway.c.
Definition at line 208 of file superhyway.c.
1.8.2