本文整理汇总了C++中xceiv_to_twl函数的典型用法代码示例。如果您正苦于以下问题:C++ xceiv_to_twl函数的具体用法?C++ xceiv_to_twl怎么用?C++ xceiv_to_twl使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xceiv_to_twl函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: phy_shutdown
static void phy_shutdown(struct otg_transceiver *x)
{
printk("%s\n",__func__);
struct twl6030_usb *twl = xceiv_to_twl(x);
set_phy_clk(x, 0);
__raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
regulator_disable(twl->vusb);
}
示例2: twl6030_phy_suspend
static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend)
{
struct twl6030_usb *twl = xceiv_to_twl(x);
struct device *dev = twl->dev;
struct twl4030_usb_data *pdata = dev->platform_data;
pdata->phy_suspend(dev, suspend);
return 0;
}
示例3: twl6030_phy_shutdown
static void twl6030_phy_shutdown(struct otg_transceiver *x)
{
struct twl6030_usb *twl;
struct device *dev;
struct twl4030_usb_data *pdata;
twl = xceiv_to_twl(x);
dev = twl->dev;
pdata = dev->platform_data;
pdata->phy_power(twl->dev, 0, 0);
}
示例4: twl6030_start_srp
static int twl6030_start_srp(struct otg_transceiver *x)
{
struct twl6030_usb *twl = xceiv_to_twl(x);
twl6030_writeb(twl, TWL_MODULE_USB, 0x24, USB_VBUS_CTRL_SET);
twl6030_writeb(twl, TWL_MODULE_USB, 0x84, USB_VBUS_CTRL_SET);
mdelay(100);
twl6030_writeb(twl, TWL_MODULE_USB, 0xa0, USB_VBUS_CTRL_CLR);
return 0;
}
示例5: twl6030_set_prevbus
int twl6030_set_prevbus(struct otg_transceiver *x,int on)
{
struct twl6030_usb *twl;
if (!x)
return -ENODEV;
twl = xceiv_to_twl(x);
twl->prev_vbus = on;
return 0;
}
示例6: twl6030_set_host
static int twl6030_set_host(struct otg_transceiver *x, struct usb_bus *host)
{
struct twl6030_usb *twl;
if (!x)
return -ENODEV;
twl = xceiv_to_twl(x);
twl->otg.host = host;
if (!host)
twl->otg.state = OTG_STATE_UNDEFINED;
return 0;
}
示例7: twl6030_set_peripheral
static int twl6030_set_peripheral(struct otg_transceiver *x,
struct usb_gadget *gadget)
{
struct twl6030_usb *twl;
if (!x)
return -ENODEV;
twl = xceiv_to_twl(x);
twl->otg.gadget = gadget;
if (!gadget)
twl->otg.state = OTG_STATE_UNDEFINED;
return 0;
}
示例8: twl6030_set_vbus
static int twl6030_set_vbus(struct otg_transceiver *x, bool enabled)
{
struct twl6030_usb *twl = xceiv_to_twl(x);
/*
* Start driving VBUS. Set OPA_MODE bit in CHARGERUSB_CTRL1
* register. This enables boost mode.
*/
if (enabled)
twl6030_writeb(twl, TWL_MODULE_MAIN_CHARGE , 0x40,
CHARGERUSB_CTRL1);
else
twl6030_writeb(twl, TWL_MODULE_MAIN_CHARGE , 0x00,
CHARGERUSB_CTRL1);
return 0;
}
示例9: twl6030_enable_irq
static int twl6030_enable_irq(struct otg_transceiver *x)
{
struct twl6030_usb *twl = xceiv_to_twl(x);
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET, 0x1);
twl6030_interrupt_unmask(0x05, REG_INT_MSK_LINE_C);
twl6030_interrupt_unmask(0x05, REG_INT_MSK_STS_C);
twl6030_interrupt_unmask(TWL6030_CHARGER_CTRL_INT_MASK,
REG_INT_MSK_LINE_C);
twl6030_interrupt_unmask(TWL6030_CHARGER_CTRL_INT_MASK,
REG_INT_MSK_STS_C);
twl6030_usb_irq(twl->irq2, twl);
twl6030_usbotg_irq(twl->irq1, twl);
return 0;
}
示例10: twl6030_set_input_current_limit
void twl6030_set_input_current_limit(struct otg_transceiver *x,unsigned mA)
{
struct twl6030_usb *twl = xceiv_to_twl(x);
int event=0;
switch(mA){
case 0:
event = USB_EVENT_LIMIT_0;
break;
case 100:
event = USB_EVENT_LIMIT_100;
break;
case 500:
event = USB_EVENT_LIMIT_500;
break;
}
blocking_notifier_call_chain(&twl->otg.notifier,event, twl->otg.gadget);
}
示例11: twl6030_phy_init
static int twl6030_phy_init(struct otg_transceiver *x)
{
struct twl6030_usb *twl;
struct device *dev;
struct twl4030_usb_data *pdata;
twl = xceiv_to_twl(x);
dev = twl->dev;
pdata = dev->platform_data;
if (twl->linkstat == USB_EVENT_ID)
pdata->phy_power(twl->dev, 1, 1);
else
pdata->phy_power(twl->dev, 0, 1);
return 0;
}
示例12: twl6030_phy_init
static int twl6030_phy_init(struct otg_transceiver *x)
{
u8 hw_state;
struct twl6030_usb *twl;
struct device *dev;
struct twl4030_usb_data *pdata;
twl = xceiv_to_twl(x);
dev = twl->dev;
pdata = dev->platform_data;
hw_state = twl6030_readb(twl, TWL6030_MODULE_ID0, STS_HW_CONDITIONS);
if (hw_state & STS_USB_ID)
pdata->phy_power(twl->dev, 1, 1);
else
pdata->phy_power(twl->dev, 0, 1);
return 0;
}