Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
umc.h File Reference
#include <linux/device.h>
#include <linux/pci.h>

Go to the source code of this file.

Data Structures

struct  umc_dev
 
struct  umc_driver
 

Macros

#define UMC_CAP_ID_WHCI_RC   0x00 /* radio controller */
 
#define UMC_CAP_ID_WHCI_WUSB_HC   0x01 /* WUSB host controller */
 
#define to_umc_dev(d)   container_of(d, struct umc_dev, dev)
 
#define to_umc_driver(d)   container_of(d, struct umc_driver, driver)
 
#define umc_driver_register(umc_drv)   __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME)
 

Functions

struct umc_devumc_device_create (struct device *parent, int n)
 
int __must_check umc_device_register (struct umc_dev *umc)
 
void umc_device_unregister (struct umc_dev *umc)
 
int __must_check __umc_driver_register (struct umc_driver *umc_drv, struct module *mod, const char *mod_name)
 
void umc_driver_unregister (struct umc_driver *umc_drv)
 
int umc_match_pci_id (struct umc_driver *umc_drv, struct umc_dev *umc)
 
int umc_controller_reset (struct umc_dev *umc)
 

Variables

struct umc_dev __attribute__
 
struct bus_type umc_bus_type
 

Macro Definition Documentation

#define to_umc_dev (   d)    container_of(d, struct umc_dev, dev)

Definition at line 73 of file umc.h.

#define to_umc_driver (   d)    container_of(d, struct umc_driver, driver)

Definition at line 98 of file umc.h.

#define UMC_CAP_ID_WHCI_RC   0x00 /* radio controller */

Definition at line 52 of file umc.h.

#define UMC_CAP_ID_WHCI_WUSB_HC   0x01 /* WUSB host controller */

Definition at line 53 of file umc.h.

#define umc_driver_register (   umc_drv)    __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME)

umc_driver_register - register a UMC capabiltity driver. : pointer to the driver.

Definition at line 114 of file umc.h.

Function Documentation

int __must_check __umc_driver_register ( struct umc_driver umc_drv,
struct module mod,
const char mod_name 
)

Definition at line 12 of file umc-drv.c.

int umc_controller_reset ( struct umc_dev umc)

umc_controller_reset - reset the whole UMC controller : the UMC device for the radio controller.

Drivers or all capabilities of the controller will have their pre_reset methods called or be unbound from their device. Then all post_reset methods will be called or the drivers will be rebound.

Radio controllers must provide pre_reset and post_reset methods and reset the hardware in their start method.

If this is called while a probe() or remove() is in progress it will return -EAGAIN and not perform the reset.

Definition at line 61 of file umc-bus.c.

struct umc_dev* umc_device_create ( struct device parent,
int  n 
)
read

umc_device_create - allocate a child UMC device : parent of the new UMC device.
: index of the new device.

The new UMC device will have a bus ID of the parent with '-n' appended.

Definition at line 28 of file umc-dev.c.

int __must_check umc_device_register ( struct umc_dev umc)

umc_device_register - register a UMC device : pointer to the UMC device

The memory resource for the UMC device is acquired and the device registered with the system.

Definition at line 52 of file umc-dev.c.

void umc_device_unregister ( struct umc_dev umc)

umc_device_unregister - unregister a UMC device : pointer to the UMC device

First we unregister the device, make sure the driver can do it's resource release thing and then we try to release any left over resources. We take a ref to the device, to make sure it doesn't disappear under our feet.

Definition at line 84 of file umc-dev.c.

void umc_driver_unregister ( struct umc_driver umc_drv)

umc_driver_register - unregister a UMC capabiltity driver. : pointer to the driver.

Definition at line 28 of file umc-drv.c.

int umc_match_pci_id ( struct umc_driver umc_drv,
struct umc_dev umc 
)

umc_match_pci_id - match a UMC driver to a UMC device's parent PCI device. : umc driver with match_data pointing to a zero-terminated table of pci_device_id's. : umc device whose parent is to be matched.

Definition at line 83 of file umc-bus.c.

Variable Documentation

struct bus_type umc_bus_type

Definition at line 218 of file umc-bus.c.