Linux Kernel
3.7.1
|
#include <linux/device.h>
Go to the source code of this file.
Data Structures | |
struct | superhyway_vcr_info |
struct | superhyway_ops |
struct | superhyway_bus |
struct | superhyway_device_id |
struct | superhyway_driver |
struct | superhyway_device |
Macros | |
#define | SUPERHYWAY_DEVICE_ID_SH5_DMAC 0x0183 |
#define | to_superhyway_driver(d) container_of((d), struct superhyway_driver, drv) |
#define | to_superhyway_device(d) container_of((d), struct superhyway_device, dev) |
#define | superhyway_get_drvdata(d) dev_get_drvdata(&(d)->dev) |
#define | superhyway_set_drvdata(d, p) dev_set_drvdata(&(d)->dev, (p)) |
Functions | |
int | superhyway_scan_bus (struct superhyway_bus *) |
int | superhyway_register_driver (struct superhyway_driver *) |
void | superhyway_unregister_driver (struct superhyway_driver *) |
int | superhyway_add_device (unsigned long base, struct superhyway_device *, struct superhyway_bus *) |
int | superhyway_add_devices (struct superhyway_bus *bus, struct superhyway_device **devices, int nr_devices) |
Variables | |
struct superhyway_bus | superhyway_channels [] |
struct bus_type | superhyway_bus_type |
struct device_attribute | superhyway_dev_attrs [] |
#define SUPERHYWAY_DEVICE_ID_SH5_DMAC 0x0183 |
Definition at line 20 of file superhyway.h.
#define superhyway_get_drvdata | ( | d | ) | dev_get_drvdata(&(d)->dev) |
Definition at line 78 of file superhyway.h.
Definition at line 79 of file superhyway.h.
#define to_superhyway_device | ( | d | ) | container_of((d), struct superhyway_device, dev) |
Definition at line 76 of file superhyway.h.
#define to_superhyway_driver | ( | d | ) | container_of((d), struct superhyway_driver, drv) |
Definition at line 60 of file superhyway.h.
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.
int superhyway_scan_bus | ( | struct superhyway_bus * | ) |
Definition at line 166 of file ops-sh4-202.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.
struct superhyway_bus superhyway_channels[] |
Definition at line 161 of file ops-sh4-202.c.
struct device_attribute superhyway_dev_attrs[] |
Definition at line 35 of file superhyway-sysfs.c.