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

Go to the source code of this file.

Data Structures

struct  usbhsh_request
 
struct  usbhsh_device
 
struct  usbhsh_ep
 
struct  usbhsh_hpriv
 

Macros

#define USBHSH_DEVICE_MAX   10 /* see DEVADDn / DCPMAXP / PIPEMAXP */
 
#define USBHSH_PORT_MAX   7 /* see DEVADDn :: HUBPORT */
 
#define usbhsh_priv_to_hpriv(priv)   container_of(usbhs_mod_get(priv, USBHS_HOST), struct usbhsh_hpriv, mod)
 
#define __usbhsh_for_each_udev(start, pos, h, i)
 
#define usbhsh_for_each_udev(pos, hpriv, i)   __usbhsh_for_each_udev(1, pos, hpriv, i)
 
#define usbhsh_for_each_udev_with_dev0(pos, hpriv, i)   __usbhsh_for_each_udev(0, pos, hpriv, i)
 
#define usbhsh_hcd_to_hpriv(h)   (struct usbhsh_hpriv *)((h)->hcd_priv)
 
#define usbhsh_hcd_to_dev(h)   ((h)->self.controller)
 
#define usbhsh_hpriv_to_priv(h)   ((h)->mod.priv)
 
#define usbhsh_hpriv_to_dcp(h)   ((h)->dcp)
 
#define usbhsh_hpriv_to_hcd(h)   container_of((void *)h, struct usb_hcd, hcd_priv)
 
#define usbhsh_ep_to_uep(u)   ((u)->hcpriv)
 
#define usbhsh_uep_to_pipe(u)   ((u)->pipe)
 
#define usbhsh_uep_to_udev(u)   ((u)->udev)
 
#define usbhsh_uep_to_ep(u)   ((u)->ep)
 
#define usbhsh_urb_to_ureq(u)   ((u)->hcpriv)
 
#define usbhsh_urb_to_usbv(u)   ((u)->dev)
 
#define usbhsh_usbv_to_udev(d)   dev_get_drvdata(&(d)->dev)
 
#define usbhsh_udev_to_usbv(h)   ((h)->usbv)
 
#define usbhsh_udev_is_used(h)   usbhsh_udev_to_usbv(h)
 
#define usbhsh_pipe_to_uep(p)   ((p)->mod_private)
 
#define usbhsh_device_parent(d)   (usbhsh_usbv_to_udev((d)->usbv->parent))
 
#define usbhsh_device_hubport(d)   ((d)->usbv->portnum)
 
#define usbhsh_device_number(h, d)   ((int)((d) - (h)->udev))
 
#define usbhsh_device_nth(h, d)   ((h)->udev + d)
 
#define usbhsh_device0(h)   usbhsh_device_nth(h, 0)
 
#define usbhsh_port_stat_init(h)   ((h)->port_stat = 0)
 
#define usbhsh_port_stat_set(h, s)   ((h)->port_stat |= (s))
 
#define usbhsh_port_stat_clear(h, s)   ((h)->port_stat &= ~(s))
 
#define usbhsh_port_stat_get(h)   ((h)->port_stat)
 
#define usbhsh_pkt_to_ureq(p)   container_of((void *)p, struct usbhsh_request, pkt)
 

Functions

int usbhs_mod_host_probe (struct usbhs_priv *priv)
 
int usbhs_mod_host_remove (struct usbhs_priv *priv)
 

Macro Definition Documentation

#define __usbhsh_for_each_udev (   start,
  pos,
  h,
  i 
)
Value:
for (i = start, pos = (h)->udev + i; \
i++, pos = (h)->udev + i)

Definition at line 112 of file mod_host.c.

#define usbhsh_device0 (   h)    usbhsh_device_nth(h, 0)

Definition at line 150 of file mod_host.c.

#define usbhsh_device_hubport (   d)    ((d)->usbv->portnum)

Definition at line 147 of file mod_host.c.

#define USBHSH_DEVICE_MAX   10 /* see DEVADDn / DCPMAXP / PIPEMAXP */

Definition at line 90 of file mod_host.c.

#define usbhsh_device_nth (   h,
  d 
)    ((h)->udev + d)

Definition at line 149 of file mod_host.c.

#define usbhsh_device_number (   h,
  d 
)    ((int)((d) - (h)->udev))

Definition at line 148 of file mod_host.c.

#define usbhsh_device_parent (   d)    (usbhsh_usbv_to_udev((d)->usbv->parent))

Definition at line 146 of file mod_host.c.

#define usbhsh_ep_to_uep (   u)    ((u)->hcpriv)

Definition at line 131 of file mod_host.c.

#define usbhsh_for_each_udev (   pos,
  hpriv,
  i 
)    __usbhsh_for_each_udev(1, pos, hpriv, i)

Definition at line 117 of file mod_host.c.

#define usbhsh_for_each_udev_with_dev0 (   pos,
  hpriv,
  i 
)    __usbhsh_for_each_udev(0, pos, hpriv, i)

Definition at line 120 of file mod_host.c.

#define usbhsh_hcd_to_dev (   h)    ((h)->self.controller)

Definition at line 124 of file mod_host.c.

#define usbhsh_hcd_to_hpriv (   h)    (struct usbhsh_hpriv *)((h)->hcd_priv)

Definition at line 123 of file mod_host.c.

#define usbhsh_hpriv_to_dcp (   h)    ((h)->dcp)

Definition at line 127 of file mod_host.c.

#define usbhsh_hpriv_to_hcd (   h)    container_of((void *)h, struct usb_hcd, hcd_priv)

Definition at line 128 of file mod_host.c.

#define usbhsh_hpriv_to_priv (   h)    ((h)->mod.priv)

Definition at line 126 of file mod_host.c.

#define usbhsh_pipe_to_uep (   p)    ((p)->mod_private)

Definition at line 144 of file mod_host.c.

#define usbhsh_pkt_to_ureq (   p)    container_of((void *)p, struct usbhsh_request, pkt)

Definition at line 157 of file mod_host.c.

#define USBHSH_PORT_MAX   7 /* see DEVADDn :: HUBPORT */

Definition at line 91 of file mod_host.c.

#define usbhsh_port_stat_clear (   h,
  s 
)    ((h)->port_stat &= ~(s))

Definition at line 154 of file mod_host.c.

#define usbhsh_port_stat_get (   h)    ((h)->port_stat)

Definition at line 155 of file mod_host.c.

#define usbhsh_port_stat_init (   h)    ((h)->port_stat = 0)

Definition at line 152 of file mod_host.c.

#define usbhsh_port_stat_set (   h,
  s 
)    ((h)->port_stat |= (s))

Definition at line 153 of file mod_host.c.

#define usbhsh_priv_to_hpriv (   priv)    container_of(usbhs_mod_get(priv, USBHS_HOST), struct usbhsh_hpriv, mod)

Definition at line 109 of file mod_host.c.

#define usbhsh_udev_is_used (   h)    usbhsh_udev_to_usbv(h)

Definition at line 142 of file mod_host.c.

#define usbhsh_udev_to_usbv (   h)    ((h)->usbv)

Definition at line 141 of file mod_host.c.

#define usbhsh_uep_to_ep (   u)    ((u)->ep)

Definition at line 134 of file mod_host.c.

#define usbhsh_uep_to_pipe (   u)    ((u)->pipe)

Definition at line 132 of file mod_host.c.

#define usbhsh_uep_to_udev (   u)    ((u)->udev)

Definition at line 133 of file mod_host.c.

#define usbhsh_urb_to_ureq (   u)    ((u)->hcpriv)

Definition at line 136 of file mod_host.c.

#define usbhsh_urb_to_usbv (   u)    ((u)->dev)

Definition at line 137 of file mod_host.c.

#define usbhsh_usbv_to_udev (   d)    dev_get_drvdata(&(d)->dev)

Definition at line 139 of file mod_host.c.

Function Documentation

int usbhs_mod_host_probe ( struct usbhs_priv priv)

Definition at line 1517 of file mod_host.c.

int usbhs_mod_host_remove ( struct usbhs_priv priv)

Definition at line 1565 of file mod_host.c.