Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ab8500-usb.c File Reference
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/usb/otg.h>
#include <linux/slab.h>
#include <linux/notifier.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/mfd/abx500.h>
#include <linux/mfd/abx500/ab8500.h>

Go to the source code of this file.

Data Structures

struct  ab8500_usb
 

Macros

#define AB8500_MAIN_WD_CTRL_REG   0x01
 
#define AB8500_USB_LINE_STAT_REG   0x80
 
#define AB8500_USB_PHY_CTRL_REG   0x8A
 
#define AB8500_BIT_OTG_STAT_ID   (1 << 0)
 
#define AB8500_BIT_PHY_CTRL_HOST_EN   (1 << 0)
 
#define AB8500_BIT_PHY_CTRL_DEVICE_EN   (1 << 1)
 
#define AB8500_BIT_WD_CTRL_ENABLE   (1 << 0)
 
#define AB8500_BIT_WD_CTRL_KICK   (1 << 1)
 
#define AB8500_V1x_LINK_STAT_WAIT   (HZ/10)
 
#define AB8500_WD_KICK_DELAY_US   100 /* usec */
 
#define AB8500_WD_V11_DISABLE_DELAY_US   100 /* usec */
 
#define AB8500_WD_V10_DISABLE_DELAY_MS   100 /* ms */
 
#define ab8500_usb_host_phy_en(ab)   ab8500_usb_phy_ctrl(ab, true, true)
 
#define ab8500_usb_host_phy_dis(ab)   ab8500_usb_phy_ctrl(ab, true, false)
 
#define ab8500_usb_peri_phy_en(ab)   ab8500_usb_phy_ctrl(ab, false, true)
 
#define ab8500_usb_peri_phy_dis(ab)   ab8500_usb_phy_ctrl(ab, false, false)
 

Enumerations

enum  ab8500_usb_link_status {
  USB_LINK_NOT_CONFIGURED = 0, USB_LINK_STD_HOST_NC, USB_LINK_STD_HOST_C_NS, USB_LINK_STD_HOST_C_S,
  USB_LINK_HOST_CHG_NM, USB_LINK_HOST_CHG_HS, USB_LINK_HOST_CHG_HS_CHIRP, USB_LINK_DEDICATED_CHG,
  USB_LINK_ACA_RID_A, USB_LINK_ACA_RID_B, USB_LINK_ACA_RID_C_NM, USB_LINK_ACA_RID_C_HS,
  USB_LINK_ACA_RID_C_HS_CHIRP, USB_LINK_HM_IDGND, USB_LINK_RESERVED, USB_LINK_NOT_VALID_LINK
}
 

Functions

 subsys_initcall (ab8500_usb_init)
 
 module_exit (ab8500_usb_exit)
 
 MODULE_ALIAS ("platform:ab8500_usb")
 
 MODULE_AUTHOR ("ST-Ericsson AB")
 
 MODULE_DESCRIPTION ("AB8500 usb transceiver driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AB8500_BIT_OTG_STAT_ID   (1 << 0)

Definition at line 39 of file ab8500-usb.c.

#define AB8500_BIT_PHY_CTRL_DEVICE_EN   (1 << 1)

Definition at line 41 of file ab8500-usb.c.

#define AB8500_BIT_PHY_CTRL_HOST_EN   (1 << 0)

Definition at line 40 of file ab8500-usb.c.

#define AB8500_BIT_WD_CTRL_ENABLE   (1 << 0)

Definition at line 42 of file ab8500-usb.c.

#define AB8500_BIT_WD_CTRL_KICK   (1 << 1)

Definition at line 43 of file ab8500-usb.c.

#define AB8500_MAIN_WD_CTRL_REG   0x01

Definition at line 35 of file ab8500-usb.c.

#define ab8500_usb_host_phy_dis (   ab)    ab8500_usb_phy_ctrl(ab, true, false)

Definition at line 147 of file ab8500-usb.c.

#define ab8500_usb_host_phy_en (   ab)    ab8500_usb_phy_ctrl(ab, true, true)

Definition at line 146 of file ab8500-usb.c.

#define AB8500_USB_LINE_STAT_REG   0x80

Definition at line 36 of file ab8500-usb.c.

#define ab8500_usb_peri_phy_dis (   ab)    ab8500_usb_phy_ctrl(ab, false, false)

Definition at line 149 of file ab8500-usb.c.

#define ab8500_usb_peri_phy_en (   ab)    ab8500_usb_phy_ctrl(ab, false, true)

Definition at line 148 of file ab8500-usb.c.

#define AB8500_USB_PHY_CTRL_REG   0x8A

Definition at line 37 of file ab8500-usb.c.

#define AB8500_V1x_LINK_STAT_WAIT   (HZ/10)

Definition at line 45 of file ab8500-usb.c.

#define AB8500_WD_KICK_DELAY_US   100 /* usec */

Definition at line 46 of file ab8500-usb.c.

#define AB8500_WD_V10_DISABLE_DELAY_MS   100 /* ms */

Definition at line 48 of file ab8500-usb.c.

#define AB8500_WD_V11_DISABLE_DELAY_US   100 /* usec */

Definition at line 47 of file ab8500-usb.c.

Enumeration Type Documentation

Enumerator:
USB_LINK_NOT_CONFIGURED 
USB_LINK_STD_HOST_NC 
USB_LINK_STD_HOST_C_NS 
USB_LINK_STD_HOST_C_S 
USB_LINK_HOST_CHG_NM 
USB_LINK_HOST_CHG_HS 
USB_LINK_HOST_CHG_HS_CHIRP 
USB_LINK_DEDICATED_CHG 
USB_LINK_ACA_RID_A 
USB_LINK_ACA_RID_B 
USB_LINK_ACA_RID_C_NM 
USB_LINK_ACA_RID_C_HS 
USB_LINK_ACA_RID_C_HS_CHIRP 
USB_LINK_HM_IDGND 
USB_LINK_RESERVED 
USB_LINK_NOT_VALID_LINK 

Definition at line 51 of file ab8500-usb.c.

Function Documentation

MODULE_ALIAS ( "platform:ab8500_usb"  )
MODULE_AUTHOR ( "ST-Ericsson AB )
MODULE_DESCRIPTION ( "AB8500 usb transceiver driver )
module_exit ( ab8500_usb_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( ab8500_usb_init  )