Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
twl6030-usb.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/usb/musb-omap.h>
#include <linux/usb/phy_companion.h>
#include <linux/usb/omap_usb.h>
#include <linux/i2c/twl.h>
#include <linux/regulator/consumer.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/delay.h>

Go to the source code of this file.

Data Structures

struct  twl6030_usb
 

Macros

#define USB_VENDOR_ID_LSB   0x00
 
#define USB_VENDOR_ID_MSB   0x01
 
#define USB_PRODUCT_ID_LSB   0x02
 
#define USB_PRODUCT_ID_MSB   0x03
 
#define USB_VBUS_CTRL_SET   0x04
 
#define USB_VBUS_CTRL_CLR   0x05
 
#define USB_ID_CTRL_SET   0x06
 
#define USB_ID_CTRL_CLR   0x07
 
#define USB_VBUS_INT_SRC   0x08
 
#define USB_VBUS_INT_LATCH_SET   0x09
 
#define USB_VBUS_INT_LATCH_CLR   0x0A
 
#define USB_VBUS_INT_EN_LO_SET   0x0B
 
#define USB_VBUS_INT_EN_LO_CLR   0x0C
 
#define USB_VBUS_INT_EN_HI_SET   0x0D
 
#define USB_VBUS_INT_EN_HI_CLR   0x0E
 
#define USB_ID_INT_SRC   0x0F
 
#define USB_ID_INT_LATCH_SET   0x10
 
#define USB_ID_INT_LATCH_CLR   0x11
 
#define USB_ID_INT_EN_LO_SET   0x12
 
#define USB_ID_INT_EN_LO_CLR   0x13
 
#define USB_ID_INT_EN_HI_SET   0x14
 
#define USB_ID_INT_EN_HI_CLR   0x15
 
#define USB_OTG_ADP_CTRL   0x16
 
#define USB_OTG_ADP_HIGH   0x17
 
#define USB_OTG_ADP_LOW   0x18
 
#define USB_OTG_ADP_RISE   0x19
 
#define USB_OTG_REVISION   0x1A
 
#define TWL6030_MISC2   0xE5
 
#define TWL6030_CFG_LDO_PD2   0xF5
 
#define TWL6030_BACKUP_REG   0xFA
 
#define STS_HW_CONDITIONS   0x21
 
#define STS_HW_CONDITIONS   0x21
 
#define STS_USB_ID   BIT(2)
 
#define VUSB_CFG_TRANS   0x71
 
#define VUSB_CFG_STATE   0x72
 
#define VUSB_CFG_VOLTAGE   0x73
 
#define CHARGERUSB_CTRL1   0x8
 
#define CONTROLLER_STAT1   0x03
 
#define VBUS_DET   BIT(2)
 
#define comparator_to_twl(x)   container_of((x), struct twl6030_usb, comparator)
 

Functions

 subsys_initcall (twl6030_usb_init)
 
 module_exit (twl6030_usb_exit)
 
 MODULE_ALIAS ("platform:twl6030_usb")
 
 MODULE_AUTHOR ("Hema HK <[email protected]>")
 
 MODULE_DESCRIPTION ("TWL6030 USB transceiver driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CHARGERUSB_CTRL1   0x8

Definition at line 85 of file twl6030-usb.c.

#define comparator_to_twl (   x)    container_of((x), struct twl6030_usb, comparator)

Definition at line 111 of file twl6030-usb.c.

#define CONTROLLER_STAT1   0x03

Definition at line 87 of file twl6030-usb.c.

#define STS_HW_CONDITIONS   0x21

Definition at line 75 of file twl6030-usb.c.

#define STS_HW_CONDITIONS   0x21

Definition at line 75 of file twl6030-usb.c.

#define STS_USB_ID   BIT(2)

Definition at line 76 of file twl6030-usb.c.

#define TWL6030_BACKUP_REG   0xFA

Definition at line 70 of file twl6030-usb.c.

#define TWL6030_CFG_LDO_PD2   0xF5

Definition at line 69 of file twl6030-usb.c.

#define TWL6030_MISC2   0xE5

Definition at line 68 of file twl6030-usb.c.

#define USB_ID_CTRL_CLR   0x07

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

#define USB_ID_CTRL_SET   0x06

Definition at line 44 of file twl6030-usb.c.

#define USB_ID_INT_EN_HI_CLR   0x15

Definition at line 60 of file twl6030-usb.c.

#define USB_ID_INT_EN_HI_SET   0x14

Definition at line 59 of file twl6030-usb.c.

#define USB_ID_INT_EN_LO_CLR   0x13

Definition at line 58 of file twl6030-usb.c.

#define USB_ID_INT_EN_LO_SET   0x12

Definition at line 57 of file twl6030-usb.c.

#define USB_ID_INT_LATCH_CLR   0x11

Definition at line 55 of file twl6030-usb.c.

#define USB_ID_INT_LATCH_SET   0x10

Definition at line 54 of file twl6030-usb.c.

#define USB_ID_INT_SRC   0x0F

Definition at line 53 of file twl6030-usb.c.

#define USB_OTG_ADP_CTRL   0x16

Definition at line 61 of file twl6030-usb.c.

#define USB_OTG_ADP_HIGH   0x17

Definition at line 62 of file twl6030-usb.c.

#define USB_OTG_ADP_LOW   0x18

Definition at line 63 of file twl6030-usb.c.

#define USB_OTG_ADP_RISE   0x19

Definition at line 64 of file twl6030-usb.c.

#define USB_OTG_REVISION   0x1A

Definition at line 65 of file twl6030-usb.c.

#define USB_PRODUCT_ID_LSB   0x02

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

#define USB_PRODUCT_ID_MSB   0x03

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

#define USB_VBUS_CTRL_CLR   0x05

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

#define USB_VBUS_CTRL_SET   0x04

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

#define USB_VBUS_INT_EN_HI_CLR   0x0E

Definition at line 52 of file twl6030-usb.c.

#define USB_VBUS_INT_EN_HI_SET   0x0D

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

#define USB_VBUS_INT_EN_LO_CLR   0x0C

Definition at line 50 of file twl6030-usb.c.

#define USB_VBUS_INT_EN_LO_SET   0x0B

Definition at line 49 of file twl6030-usb.c.

#define USB_VBUS_INT_LATCH_CLR   0x0A

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

#define USB_VBUS_INT_LATCH_SET   0x09

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

#define USB_VBUS_INT_SRC   0x08

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

#define USB_VENDOR_ID_LSB   0x00

Definition at line 38 of file twl6030-usb.c.

#define USB_VENDOR_ID_MSB   0x01

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

#define VBUS_DET   BIT(2)

Definition at line 88 of file twl6030-usb.c.

#define VUSB_CFG_STATE   0x72

Definition at line 80 of file twl6030-usb.c.

#define VUSB_CFG_TRANS   0x71

Definition at line 79 of file twl6030-usb.c.

#define VUSB_CFG_VOLTAGE   0x73

Definition at line 81 of file twl6030-usb.c.

Function Documentation

MODULE_ALIAS ( "platform:twl6030_usb"  )
MODULE_AUTHOR ( "Hema HK <[email protected]>"  )
MODULE_DESCRIPTION ( "TWL6030 USB transceiver driver )
module_exit ( twl6030_usb_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( twl6030_usb_init  )