home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / include / linux / usb / fsl_xcvr.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-09-09  |  1.1 KB  |  45 lines

  1. #ifndef __LINUX_USB_FSL_XCVR_H
  2. #define __LINUX_USB_FSL_XCVR_H
  3. #include <linux/platform_device.h>
  4. #include <linux/regulator/consumer.h>
  5.  
  6. struct fsl_usb2_platform_data;
  7.  
  8. enum usb_test_mode{
  9.     USB_TEST_J = 1,
  10.     USB_TEST_K = 2,
  11. };
  12.  
  13. /**
  14.  * @name: transceiver name
  15.  * @xcvr_type: one of PORTSC_PTS_{UTMI,SERIAL,ULPI}
  16.  * @init: transceiver- and board-specific initialization function
  17.  * @uninit: transceiver- and board-specific uninitialization function
  18.  * @set_host:
  19.  * @set_device:
  20.  * @pullup: enable or disable D+ pullup
  21.  *
  22.  */
  23. struct fsl_xcvr_ops {
  24.     char *name;
  25.     u32 xcvr_type;
  26.  
  27.     void (*init)(struct fsl_xcvr_ops *ops);
  28.     void (*uninit)(struct fsl_xcvr_ops *ops);
  29.     void (*suspend)(struct fsl_xcvr_ops *ops);
  30.     void (*set_host)(void);
  31.     void (*set_device)(void);
  32.     void (*set_vbus_power)(struct fsl_xcvr_ops *ops,
  33.                    struct fsl_usb2_platform_data *pdata, int on);
  34.     void (*set_remote_wakeup)(u32 *view);
  35.     void (*pullup)(int on);
  36.     void(*set_test_mode)(u32 *view, enum usb_test_mode mode);
  37. };
  38.  
  39. struct fsl_xcvr_power {
  40.     struct platform_device *usb_pdev;
  41.     struct regulator *regu1;
  42.     struct regulator *regu2;
  43. };
  44. #endif
  45.