Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
common.c File Reference
#include <linux/io.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include "common.h"

Go to the source code of this file.

Macros

#define USBHSF_RUNTIME_PWCTRL   (1 << 0)
 
#define usbhsc_flags_init(p)   do {(p)->flags = 0; } while (0)
 
#define usbhsc_flags_set(p, b)   ((p)->flags |= (b))
 
#define usbhsc_flags_clr(p, b)   ((p)->flags &= ~(b))
 
#define usbhsc_flags_has(p, b)   ((p)->flags & (b))
 
#define usbhs_platform_call(priv, func, args...)
 

Functions

u16 usbhs_read (struct usbhs_priv *priv, u32 reg)
 
void usbhs_write (struct usbhs_priv *priv, u32 reg, u16 data)
 
void usbhs_bset (struct usbhs_priv *priv, u32 reg, u16 mask, u16 data)
 
struct usbhs_privusbhs_pdev_to_priv (struct platform_device *pdev)
 
void usbhs_sys_host_ctrl (struct usbhs_priv *priv, int enable)
 
void usbhs_sys_function_ctrl (struct usbhs_priv *priv, int enable)
 
void usbhs_sys_set_test_mode (struct usbhs_priv *priv, u16 mode)
 
int usbhs_frame_get_num (struct usbhs_priv *priv)
 
void usbhs_usbreq_get_val (struct usbhs_priv *priv, struct usb_ctrlrequest *req)
 
void usbhs_usbreq_set_val (struct usbhs_priv *priv, struct usb_ctrlrequest *req)
 
void usbhs_bus_send_sof_enable (struct usbhs_priv *priv)
 
void usbhs_bus_send_reset (struct usbhs_priv *priv)
 
int usbhs_bus_get_speed (struct usbhs_priv *priv)
 
int usbhs_vbus_ctrl (struct usbhs_priv *priv, int enable)
 
int usbhs_set_device_config (struct usbhs_priv *priv, int devnum, u16 upphub, u16 hubport, u16 speed)
 
 module_platform_driver (renesas_usbhs_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("Renesas USB driver")
 
 MODULE_AUTHOR ("Kuninori Morimoto <[email protected]>")
 

Macro Definition Documentation

#define usbhs_platform_call (   priv,
  func,
  args... 
)
Value:
(!(priv) ? -ENODEV : \
!((priv)->pfunc.func) ? 0 : \
(priv)->pfunc.func(args))

Definition at line 62 of file common.c.

#define usbhsc_flags_clr (   p,
  b 
)    ((p)->flags &= ~(b))

Definition at line 52 of file common.c.

#define usbhsc_flags_has (   p,
  b 
)    ((p)->flags & (b))

Definition at line 53 of file common.c.

#define usbhsc_flags_init (   p)    do {(p)->flags = 0; } while (0)

Definition at line 50 of file common.c.

#define usbhsc_flags_set (   p,
  b 
)    ((p)->flags |= (b))

Definition at line 51 of file common.c.

#define USBHSF_RUNTIME_PWCTRL   (1 << 0)

Definition at line 47 of file common.c.

Function Documentation

MODULE_AUTHOR ( "Kuninori Morimoto <[email protected]>"  )
MODULE_DESCRIPTION ( "Renesas USB driver )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( renesas_usbhs_driver  )
void usbhs_bset ( struct usbhs_priv priv,
u32  reg,
u16  mask,
u16  data 
)

Definition at line 80 of file common.c.

int usbhs_bus_get_speed ( struct usbhs_priv priv)

Definition at line 194 of file common.c.

void usbhs_bus_send_reset ( struct usbhs_priv priv)

Definition at line 189 of file common.c.

void usbhs_bus_send_sof_enable ( struct usbhs_priv priv)

Definition at line 177 of file common.c.

int usbhs_frame_get_num ( struct usbhs_priv priv)

Definition at line 143 of file common.c.

struct usbhs_priv* usbhs_pdev_to_priv ( struct platform_device pdev)
read

Definition at line 90 of file common.c.

u16 usbhs_read ( struct usbhs_priv priv,
u32  reg 
)

Definition at line 70 of file common.c.

int usbhs_set_device_config ( struct usbhs_priv priv,
int  devnum,
u16  upphub,
u16  hubport,
u16  speed 
)

Definition at line 227 of file common.c.

void usbhs_sys_function_ctrl ( struct usbhs_priv priv,
int  enable 
)

Definition at line 121 of file common.c.

void usbhs_sys_host_ctrl ( struct usbhs_priv priv,
int  enable 
)

Definition at line 103 of file common.c.

void usbhs_sys_set_test_mode ( struct usbhs_priv priv,
u16  mode 
)

Definition at line 135 of file common.c.

void usbhs_usbreq_get_val ( struct usbhs_priv priv,
struct usb_ctrlrequest req 
)

Definition at line 151 of file common.c.

void usbhs_usbreq_set_val ( struct usbhs_priv priv,
struct usb_ctrlrequest req 
)

Definition at line 164 of file common.c.

int usbhs_vbus_ctrl ( struct usbhs_priv priv,
int  enable 
)

Definition at line 210 of file common.c.

void usbhs_write ( struct usbhs_priv priv,
u32  reg,
u16  data 
)

Definition at line 75 of file common.c.