Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
isp1301_omap.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/usb.h>
#include <linux/usb/otg.h>
#include <linux/i2c.h>
#include <linux/workqueue.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <mach/mux.h>
#include <mach/usb.h>

Go to the source code of this file.

Data Structures

struct  isp1301
 

Macros

#define DRIVER_VERSION   "24 August 2004"
 
#define DRIVER_NAME   (isp1301_driver.driver.name)
 
#define WORK_UPDATE_ISP   0 /* update ISP from OTG */
 
#define WORK_UPDATE_OTG   1 /* update OTG from ISP */
 
#define WORK_HOST_RESUME   4 /* resume host */
 
#define WORK_TIMER   6 /* timer fired */
 
#define WORK_STOP   7 /* don't resubmit */
 
#define OTG_XCEIV_OUTPUTS   (OTG_ASESSVLD|OTG_BSESSEND|OTG_BSESSVLD|OTG_VBUSVLD|OTG_ID)
 
#define OTG_XCEIV_INPUTS   (OTG_PULLDOWN|OTG_PULLUP|OTG_DRV_VBUS|OTG_PD_VBUS|OTG_PU_VBUS|OTG_PU_ID)
 
#define OTG_CTRL_BITS   (OTG_A_BUSREQ|OTG_A_SETB_HNPEN|OTG_B_BUSREQ|OTG_B_HNPEN|OTG_BUSDROP)
 
#define OTG_CTRL_MASK
 
#define ISP1301_VENDOR_ID   0x00 /* u16 read */
 
#define ISP1301_PRODUCT_ID   0x02 /* u16 read */
 
#define ISP1301_BCD_DEVICE   0x14 /* u16 read */
 
#define I2C_VENDOR_ID_PHILIPS   0x04cc
 
#define I2C_PRODUCT_ID_PHILIPS_1301   0x1301
 
#define ISP1301_MODE_CONTROL_1   0x04 /* u8 read, set, +1 clear */
 
#define MC1_SPEED   (1 << 0)
 
#define MC1_SUSPEND   (1 << 1)
 
#define MC1_DAT_SE0   (1 << 2)
 
#define MC1_TRANSPARENT   (1 << 3)
 
#define MC1_BDIS_ACON_EN   (1 << 4)
 
#define MC1_OE_INT_EN   (1 << 5)
 
#define MC1_UART_EN   (1 << 6)
 
#define MC1_MASK   0x7f
 
#define ISP1301_MODE_CONTROL_2   0x12 /* u8 read, set, +1 clear */
 
#define MC2_GLOBAL_PWR_DN   (1 << 0)
 
#define MC2_SPD_SUSP_CTRL   (1 << 1)
 
#define MC2_BI_DI   (1 << 2)
 
#define MC2_TRANSP_BDIR0   (1 << 3)
 
#define MC2_TRANSP_BDIR1   (1 << 4)
 
#define MC2_AUDIO_EN   (1 << 5)
 
#define MC2_PSW_EN   (1 << 6)
 
#define MC2_EN2V7   (1 << 7)
 
#define ISP1301_OTG_CONTROL_1   0x06 /* u8 read, set, +1 clear */
 
#define OTG1_DP_PULLUP   (1 << 0)
 
#define OTG1_DM_PULLUP   (1 << 1)
 
#define OTG1_DP_PULLDOWN   (1 << 2)
 
#define OTG1_DM_PULLDOWN   (1 << 3)
 
#define OTG1_ID_PULLDOWN   (1 << 4)
 
#define OTG1_VBUS_DRV   (1 << 5)
 
#define OTG1_VBUS_DISCHRG   (1 << 6)
 
#define OTG1_VBUS_CHRG   (1 << 7)
 
#define ISP1301_OTG_STATUS   0x10 /* u8 readonly */
 
#define OTG_B_SESS_END   (1 << 6)
 
#define OTG_B_SESS_VLD   (1 << 7)
 
#define ISP1301_INTERRUPT_SOURCE   0x08 /* u8 read */
 
#define ISP1301_INTERRUPT_LATCH   0x0A /* u8 read, set, +1 clear */
 
#define ISP1301_INTERRUPT_FALLING   0x0C /* u8 read, set, +1 clear */
 
#define ISP1301_INTERRUPT_RISING   0x0E /* u8 read, set, +1 clear */
 
#define INTR_VBUS_VLD   (1 << 0)
 
#define INTR_SESS_VLD   (1 << 1)
 
#define INTR_DP_HI   (1 << 2)
 
#define INTR_ID_GND   (1 << 3)
 
#define INTR_DM_HI   (1 << 4)
 
#define INTR_ID_FLOAT   (1 << 5)
 
#define INTR_BDIS_ACON   (1 << 6)
 
#define INTR_CR_INT   (1 << 7)
 
#define NO_HOST_SUSPEND
 
#define TIMER_MINUTES   10
 
#define TIMER_JIFFIES   (TIMER_MINUTES * 60 * HZ)
 

Functions

 MODULE_DESCRIPTION ("ISP1301 USB OTG Transceiver Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (i2c, isp1301_id)
 
 subsys_initcall (isp_init)
 
 module_exit (isp_exit)
 

Macro Definition Documentation

#define DRIVER_NAME   (isp1301_driver.driver.name)

Definition at line 49 of file isp1301_omap.c.

#define DRIVER_VERSION   "24 August 2004"

Definition at line 48 of file isp1301_omap.c.

#define I2C_PRODUCT_ID_PHILIPS_1301   0x1301

Definition at line 185 of file isp1301_omap.c.

#define I2C_VENDOR_ID_PHILIPS   0x04cc

Definition at line 184 of file isp1301_omap.c.

#define INTR_BDIS_ACON   (1 << 6)

Definition at line 232 of file isp1301_omap.c.

#define INTR_CR_INT   (1 << 7)

Definition at line 233 of file isp1301_omap.c.

#define INTR_DM_HI   (1 << 4)

Definition at line 230 of file isp1301_omap.c.

#define INTR_DP_HI   (1 << 2)

Definition at line 228 of file isp1301_omap.c.

#define INTR_ID_FLOAT   (1 << 5)

Definition at line 231 of file isp1301_omap.c.

#define INTR_ID_GND   (1 << 3)

Definition at line 229 of file isp1301_omap.c.

#define INTR_SESS_VLD   (1 << 1)

Definition at line 227 of file isp1301_omap.c.

#define INTR_VBUS_VLD   (1 << 0)

Definition at line 226 of file isp1301_omap.c.

#define ISP1301_BCD_DEVICE   0x14 /* u16 read */

Definition at line 182 of file isp1301_omap.c.

#define ISP1301_INTERRUPT_FALLING   0x0C /* u8 read, set, +1 clear */

Definition at line 222 of file isp1301_omap.c.

#define ISP1301_INTERRUPT_LATCH   0x0A /* u8 read, set, +1 clear */

Definition at line 220 of file isp1301_omap.c.

#define ISP1301_INTERRUPT_RISING   0x0E /* u8 read, set, +1 clear */

Definition at line 223 of file isp1301_omap.c.

#define ISP1301_INTERRUPT_SOURCE   0x08 /* u8 read */

Definition at line 219 of file isp1301_omap.c.

#define ISP1301_MODE_CONTROL_1   0x04 /* u8 read, set, +1 clear */

Definition at line 188 of file isp1301_omap.c.

#define ISP1301_MODE_CONTROL_2   0x12 /* u8 read, set, +1 clear */

Definition at line 197 of file isp1301_omap.c.

#define ISP1301_OTG_CONTROL_1   0x06 /* u8 read, set, +1 clear */

Definition at line 206 of file isp1301_omap.c.

#define ISP1301_OTG_STATUS   0x10 /* u8 readonly */

Definition at line 215 of file isp1301_omap.c.

#define ISP1301_PRODUCT_ID   0x02 /* u16 read */

Definition at line 181 of file isp1301_omap.c.

#define ISP1301_VENDOR_ID   0x00 /* u16 read */

Definition at line 180 of file isp1301_omap.c.

#define MC1_BDIS_ACON_EN   (1 << 4)

Definition at line 193 of file isp1301_omap.c.

#define MC1_DAT_SE0   (1 << 2)

Definition at line 191 of file isp1301_omap.c.

#define MC1_MASK   0x7f

Definition at line 196 of file isp1301_omap.c.

#define MC1_OE_INT_EN   (1 << 5)

Definition at line 194 of file isp1301_omap.c.

#define MC1_SPEED   (1 << 0)

Definition at line 189 of file isp1301_omap.c.

#define MC1_SUSPEND   (1 << 1)

Definition at line 190 of file isp1301_omap.c.

#define MC1_TRANSPARENT   (1 << 3)

Definition at line 192 of file isp1301_omap.c.

#define MC1_UART_EN   (1 << 6)

Definition at line 195 of file isp1301_omap.c.

#define MC2_AUDIO_EN   (1 << 5)

Definition at line 203 of file isp1301_omap.c.

#define MC2_BI_DI   (1 << 2)

Definition at line 200 of file isp1301_omap.c.

#define MC2_EN2V7   (1 << 7)

Definition at line 205 of file isp1301_omap.c.

#define MC2_GLOBAL_PWR_DN   (1 << 0)

Definition at line 198 of file isp1301_omap.c.

#define MC2_PSW_EN   (1 << 6)

Definition at line 204 of file isp1301_omap.c.

#define MC2_SPD_SUSP_CTRL   (1 << 1)

Definition at line 199 of file isp1301_omap.c.

#define MC2_TRANSP_BDIR0   (1 << 3)

Definition at line 201 of file isp1301_omap.c.

#define MC2_TRANSP_BDIR1   (1 << 4)

Definition at line 202 of file isp1301_omap.c.

#define NO_HOST_SUSPEND

Definition at line 274 of file isp1301_omap.c.

#define OTG1_DM_PULLDOWN   (1 << 3)

Definition at line 210 of file isp1301_omap.c.

#define OTG1_DM_PULLUP   (1 << 1)

Definition at line 208 of file isp1301_omap.c.

#define OTG1_DP_PULLDOWN   (1 << 2)

Definition at line 209 of file isp1301_omap.c.

#define OTG1_DP_PULLUP   (1 << 0)

Definition at line 207 of file isp1301_omap.c.

#define OTG1_ID_PULLDOWN   (1 << 4)

Definition at line 211 of file isp1301_omap.c.

#define OTG1_VBUS_CHRG   (1 << 7)

Definition at line 214 of file isp1301_omap.c.

#define OTG1_VBUS_DISCHRG   (1 << 6)

Definition at line 213 of file isp1301_omap.c.

#define OTG1_VBUS_DRV   (1 << 5)

Definition at line 212 of file isp1301_omap.c.

#define OTG_B_SESS_END   (1 << 6)

Definition at line 216 of file isp1301_omap.c.

#define OTG_B_SESS_VLD   (1 << 7)

Definition at line 217 of file isp1301_omap.c.

Definition at line 84 of file isp1301_omap.c.

#define OTG_CTRL_MASK
Value:
OTG_XCEIV_OUTPUTS|OTG_XCEIV_INPUTS| \
OTG_CTRL_BITS)

Definition at line 88 of file isp1301_omap.c.

Definition at line 82 of file isp1301_omap.c.

#define OTG_XCEIV_OUTPUTS   (OTG_ASESSVLD|OTG_BSESSEND|OTG_BSESSVLD|OTG_VBUSVLD|OTG_ID)

Definition at line 80 of file isp1301_omap.c.

#define TIMER_JIFFIES   (TIMER_MINUTES * 60 * HZ)

Definition at line 320 of file isp1301_omap.c.

#define TIMER_MINUTES   10

Definition at line 319 of file isp1301_omap.c.

#define WORK_HOST_RESUME   4 /* resume host */

Definition at line 72 of file isp1301_omap.c.

#define WORK_STOP   7 /* don't resubmit */

Definition at line 74 of file isp1301_omap.c.

#define WORK_TIMER   6 /* timer fired */

Definition at line 73 of file isp1301_omap.c.

#define WORK_UPDATE_ISP   0 /* update ISP from OTG */

Definition at line 70 of file isp1301_omap.c.

#define WORK_UPDATE_OTG   1 /* update OTG from ISP */

Definition at line 71 of file isp1301_omap.c.

Function Documentation

MODULE_DESCRIPTION ( "ISP1301 USB OTG Transceiver Driver"  )
MODULE_DEVICE_TABLE ( i2c  ,
isp1301_id   
)
module_exit ( isp_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( isp_init  )