Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
otg.c File Reference
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/err.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/usb/otg.h>

Go to the source code of this file.

Functions

struct usb_phydevm_usb_get_phy (struct device *dev, enum usb_phy_type type)
 
 EXPORT_SYMBOL (devm_usb_get_phy)
 
struct usb_phyusb_get_phy (enum usb_phy_type type)
 
 EXPORT_SYMBOL (usb_get_phy)
 
void devm_usb_put_phy (struct device *dev, struct usb_phy *phy)
 
 EXPORT_SYMBOL (devm_usb_put_phy)
 
void usb_put_phy (struct usb_phy *x)
 
 EXPORT_SYMBOL (usb_put_phy)
 
int usb_add_phy (struct usb_phy *x, enum usb_phy_type type)
 
 EXPORT_SYMBOL (usb_add_phy)
 
void usb_remove_phy (struct usb_phy *x)
 
 EXPORT_SYMBOL (usb_remove_phy)
 
const charotg_state_string (enum usb_otg_state state)
 
 EXPORT_SYMBOL (otg_state_string)
 

Function Documentation

struct usb_phy* devm_usb_get_phy ( struct device dev,
enum usb_phy_type  type 
)
read

devm_usb_get_phy - find the USB PHY - device that requests this phy - the type of the phy the controller requires

Gets the phy using usb_get_phy(), and associates a device with it using devres. On driver detach, release function is invoked on the devres data, then, devres data is freed.

For use by USB host and peripheral drivers.

Definition at line 61 of file otg.c.

void devm_usb_put_phy ( struct device dev,
struct usb_phy phy 
)

devm_usb_put_phy - release the USB PHY - device that wants to release this phy - the phy returned by devm_usb_get_phy()

destroys the devres associated with this phy and invokes usb_put_phy to release the phy.

For use by USB host and peripheral drivers.

Definition at line 123 of file otg.c.

EXPORT_SYMBOL ( devm_usb_get_phy  )
EXPORT_SYMBOL ( usb_get_phy  )
EXPORT_SYMBOL ( devm_usb_put_phy  )
EXPORT_SYMBOL ( usb_put_phy  )
EXPORT_SYMBOL ( usb_add_phy  )
EXPORT_SYMBOL ( usb_remove_phy  )
EXPORT_SYMBOL ( otg_state_string  )
const char* otg_state_string ( enum usb_otg_state  state)

Definition at line 204 of file otg.c.

int usb_add_phy ( struct usb_phy x,
enum usb_phy_type  type 
)

usb_add_phy - declare the USB PHY : the USB phy to be used; or NULL - the type of this PHY

This call is exclusively for use by phy drivers, which coordinate the activities of drivers for host and peripheral controllers, and in some cases for VBUS current regulation.

Definition at line 156 of file otg.c.

struct usb_phy* usb_get_phy ( enum usb_phy_type  type)
read

usb_get_phy - find the USB PHY - the type of the phy the controller requires

Returns the phy driver, after getting a refcount to it; or -ENODEV if there is no such phy. The caller is responsible for calling usb_put_phy() to release that count.

For use by USB host and peripheral drivers.

Definition at line 90 of file otg.c.

void usb_put_phy ( struct usb_phy x)

usb_put_phy - release the USB PHY : the phy returned by usb_get_phy()

Releases a refcount the caller received from usb_get_phy().

For use by USB host and peripheral drivers.

Definition at line 140 of file otg.c.

void usb_remove_phy ( struct usb_phy x)

usb_remove_phy - remove the OTG PHY : the USB OTG PHY to be removed;

This reverts the effects of usb_add_phy

Definition at line 193 of file otg.c.