type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | void msm_chg_enable_aca_intr(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
if (!aca_enabled())
return;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
/* Enable ACA Detection interrupt (on any RID change) */
ulpi_write(phy, 0x01, 0x94);
break;
default:
break;
} |
functions | void msm_chg_disable_aca_intr(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
if (!aca_enabled())
return;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
ulpi_write(phy, 0x01, 0x95);
break;
default:
break;
} |
functions | bool msm_chg_check_aca_intr(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
bool ret = false;
if (!aca_enabled())
return ret;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
if (ulpi_read(phy, 0x91) & 1) {
dev_dbg(phy->dev, "RID change\n");
ulpi_write(phy, 0x01, 0x92);
ret = msm_chg_a... |
functions | void msm_otg_id_timer_func(unsigned long data)
{
struct msm_otg *motg = (struct msm_otg *) data;
if (!aca_enabled())
return;
if (atomic_read(&motg->in_lpm)) {
dev_dbg(motg->phy.dev, "timer: in lpm\n");
msm_otg_dbg_log_event(&motg->phy, "ID TIMER: IN LPM",
motg->phy.state, 0);
return;
} |
functions | bool msm_chg_check_secondary_det(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
u32 chg_det;
bool ret = false;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
case SNPS_FEMTO_PHY:
chg_det = ulpi_read(phy, 0x87);
ret = chg_det & 1;
break;
default:
break;
} |
functions | void msm_chg_enable_secondary_det(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
case SNPS_FEMTO_PHY:
/*
* Configure DM as current source, DP as current sink
* and enable battery charging comparators.
*/
ulpi_write(phy, 0x8, 0x85);
ulpi... |
functions | bool msm_chg_check_primary_det(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
u32 chg_det;
bool ret = false;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
case SNPS_FEMTO_PHY:
chg_det = ulpi_read(phy, 0x87);
ret = chg_det & 1;
/* Turn off VDP_SRC */
ulpi_write(phy, 0x3, 0x86);
msleep(... |
functions | void msm_chg_enable_primary_det(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
case SNPS_FEMTO_PHY:
/*
* Configure DP as current source, DM as current sink
* and enable battery charging comparators.
*/
ulpi_write(phy, 0x2, 0x85);
ulpi_w... |
functions | bool msm_chg_check_dcd(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
u32 line_state;
bool ret = false;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
case SNPS_FEMTO_PHY:
line_state = ulpi_read(phy, 0x87);
ret = line_state & 2;
break;
default:
break;
} |
functions | void msm_chg_disable_dcd(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
ulpi_write(phy, 0x10, 0x86);
break;
case SNPS_FEMTO_PHY:
ulpi_write(phy, 0x10, 0x86);
/*
* Disable the Rdm_down after
* the DCD is completed.
*/
ulpi_write(phy,... |
functions | void msm_chg_enable_dcd(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
/* Data contact detection enable */
ulpi_write(phy, 0x10, 0x85);
break;
case SNPS_FEMTO_PHY:
/*
* Idp_src and Rdm_down are de-coupled
* on Femto PHY. If Idp_src alone... |
functions | void msm_chg_block_on(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
u32 func_ctrl;
/* put the controller in non-driving mode */
func_ctrl = ulpi_read(phy, ULPI_FUNC_CTRL);
func_ctrl &= ~ULPI_FUNC_CTRL_OPMODE_MASK;
func_ctrl |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING;
ulpi_write(phy, func_ctrl, ULPI_FUNC_CT... |
functions | void msm_chg_block_off(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
u32 func_ctrl;
switch (motg->pdata->phy_type) {
case SNPS_PICO_PHY:
case SNPS_FEMTO_PHY:
/* Clear charger detecting control bits */
ulpi_write(phy, 0x3F, 0x86);
/* Clear alt interrupt latch and enable bits */
ulpi_write(phy, ... |
functions | void msm_chg_detect_work(struct work_struct *w)
{
struct msm_otg *motg = container_of(w, struct msm_otg, chg_work.work);
struct usb_phy *phy = &motg->phy;
bool is_dcd = false, tmout, vout, is_aca;
static bool dcd;
u32 line_state, dm_vlgc;
unsigned long delay;
dev_dbg(phy->dev, "chg detection work\n");
msm_otg_... |
functions | void msm_otg_init_sm(struct msm_otg *motg)
{
struct msm_otg_platform_data *pdata = motg->pdata;
u32 otgsc = readl(USB_OTGSC);
int ret;
switch (pdata->mode) {
case USB_OTG:
if (pdata->otg_control == OTG_USER_CONTROL) {
if (pdata->default_mode == USB_HOST) {
clear_bit(ID, &motg->inputs);
} |
functions | else if (pdata->default_mode == USB_PERIPHERAL) {
set_bit(ID, &motg->inputs);
set_bit(B_SESS_VLD, &motg->inputs);
} |
functions | else if (pdata->otg_control == OTG_PHY_CONTROL) {
if (otgsc & OTGSC_ID) {
set_bit(ID, &motg->inputs);
} |
functions | else if (pdata->otg_control == OTG_PMIC_CONTROL) {
if (pdata->pmic_id_irq) {
if (msm_otg_read_pmic_id_state(motg))
set_bit(ID, &motg->inputs);
else
clear_bit(ID, &motg->inputs);
} |
functions | else if (motg->ext_id_irq) {
if (gpio_get_value(pdata->usb_id_gpio))
set_bit(ID, &motg->inputs);
else
clear_bit(ID, &motg->inputs);
} |
functions | else if (motg->phy_irq) {
if (msm_otg_read_phy_id_state(motg))
set_bit(ID, &motg->inputs);
else
clear_bit(ID, &motg->inputs);
} |
functions | else if (pdata->otg_control == OTG_PMIC_CONTROL) {
/*
* VBUS initial state is reported after PMIC
* driver initialization. Wait for it.
*/
ret = wait_for_completion_timeout(&pmic_vbus_init,
VBUS_INIT_TIMEOUT);
if (!ret) {
dev_dbg(motg->phy.dev, "%s: timeout waiting for PMIC VBUS\n",
... |
functions | else if (pdata->otg_control == OTG_USER_CONTROL) {
set_bit(ID, &motg->inputs);
set_bit(B_SESS_VLD, &motg->inputs);
} |
functions | void msm_otg_wait_for_ext_chg_done(struct msm_otg *motg)
{
struct usb_phy *phy = &motg->phy;
unsigned long t;
/*
* Defer next cable connect event till external charger
* detection is completed.
*/
if (motg->ext_chg_active == ACTIVE) {
do_wait:
pr_debug("before msm_otg ext chg wait\n");
msm_otg_dbg_log_... |
functions | void msm_otg_sm_work(struct work_struct *w)
{
struct msm_otg *motg = container_of(w, struct msm_otg, sm_work);
struct usb_otg *otg = motg->phy.otg;
bool work = 0, srp_reqd, dcp;
pm_runtime_resume(otg->phy->dev);
if (motg->pm_done) {
msm_otg_dbg_log_event(&motg->phy, "PM RUNTIME: USBCONN GET",
get_pm_runtime_... |
functions | void msm_otg_suspend_work(struct work_struct *w)
{
struct msm_otg *motg =
container_of(w, struct msm_otg, suspend_work.work);
/* This work is only for device bus suspend */
if (test_bit(A_BUS_SUSPEND, &motg->inputs))
msm_otg_sm_work(&motg->sm_work);
} |
functions | irqreturn_t msm_otg_irq(int irq, void *data)
{
struct msm_otg *motg = data;
struct usb_otg *otg = motg->phy.otg;
u32 otgsc = 0, usbsts, pc;
bool work = 0;
irqreturn_t ret = IRQ_HANDLED;
if (atomic_read(&motg->in_lpm)) {
pr_debug("OTG IRQ: %d in LPM\n", irq);
msm_otg_dbg_log_event(&motg->phy, "OTG IRQ IS IN L... |
functions | else if (otgsc & OTGSC_DPIS) {
pr_debug("DPIS detected\n");
writel_relaxed(otgsc, USB_OTGSC);
set_bit(A_SRP_DET, &motg->inputs);
set_bit(A_BUS_REQ, &motg->inputs);
work = 1;
} |
functions | else if (usbsts & STS_PCI) {
pc = readl_relaxed(USB_PORTSC);
pr_debug("portsc = %x\n", pc);
msm_otg_dbg_log_event(&motg->phy, "PORTSC",
motg->inputs, otg->phy->state);
ret = IRQ_NONE;
/*
* HCD Acks PCI interrupt. We use this to switch
* between different OTG states.
*/
work = 1;
switch (otg->... |
functions | else if (usbsts & STS_URI) {
ret = IRQ_NONE;
switch (otg->phy->state) {
case OTG_STATE_A_PERIPHERAL:
/*
* A-peripheral observed activity on bus.
* clear A_BIDL_ADIS timer.
*/
msm_otg_del_timer(motg);
work = 0;
break;
default:
work = 0;
break;
} |
functions | else if (usbsts & STS_SLI) {
ret = IRQ_NONE;
work = 0;
switch (otg->phy->state) {
case OTG_STATE_B_PERIPHERAL:
if (otg->gadget->b_hnp_enable) {
set_bit(A_BUS_SUSPEND, &motg->inputs);
set_bit(B_BUS_REQ, &motg->inputs);
work = 1;
} |
functions | void msm_otg_set_vbus_state(int online)
{
struct msm_otg *motg = the_msm_otg;
static bool init;
motg->vbus_state = online;
if (motg->err_event_seen)
return;
if (online) {
pr_debug("PMIC: BSV set\n");
msm_otg_dbg_log_event(&motg->phy, "PMIC: BSV SET",
init, motg->inputs);
if (test_and_set_bit(B_SESS_... |
functions | else if (!motg->sm_work_pending) {
/* process event only if previous one is not pending */
queue_work(motg->otg_wq, &motg->sm_work);
} |
functions | void msm_id_status_w(struct work_struct *w)
{
struct msm_otg *motg = container_of(w, struct msm_otg,
id_status_work.work);
int work = 0;
dev_dbg(motg->phy.dev, "ID status_w\n");
if (motg->pdata->pmic_id_irq)
motg->id_state = msm_otg_read_pmic_id_state(motg);
else if (motg->ext_id_irq)
motg->id_state = ... |
functions | else if (!motg->sm_work_pending) {
/* process event only if previous one is not pending */
queue_work(motg->otg_wq, &motg->sm_work);
} |
functions | irqreturn_t msm_id_irq(int irq, void *data)
{
struct msm_otg *motg = data;
if (test_bit(MHL, &motg->inputs) ||
mhl_det_in_progress) {
pr_debug("PMIC: Id interrupt ignored in MHL\n");
return IRQ_HANDLED;
} |
functions | int msm_otg_pm_notify(struct notifier_block *notify_block,
unsigned long mode, void *unused)
{
struct msm_otg *motg = container_of(
notify_block, struct msm_otg, pm_notify);
dev_dbg(motg->phy.dev, "OTG PM notify:%lx, sm_pending:%u\n", mode,
motg->sm_work_pending);
msm_otg_dbg_log_event(&motg->phy, "PM N... |
functions | int msm_otg_mode_show(struct seq_file *s, void *unused)
{
struct msm_otg *motg = s->private;
struct usb_otg *otg = motg->phy.otg;
switch (otg->phy->state) {
case OTG_STATE_A_WAIT_BCON:
case OTG_STATE_A_HOST:
case OTG_STATE_A_SUSPEND:
seq_printf(s, "host\n");
break;
case OTG_STATE_B_IDLE:
case OTG_STATE_B_P... |
functions | int msm_otg_mode_open(struct inode *inode, struct file *file)
{
return single_open(file, msm_otg_mode_show, inode->i_private);
} |
functions | ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
size_t count, loff_t *ppos)
{
struct seq_file *s = file->private_data;
struct msm_otg *motg = s->private;
char buf[16];
struct usb_phy *phy = &motg->phy;
int status = count;
enum usb_mode_type req_mode;
memset(buf, 0x00, sizeof(buf));
... |
functions | int msm_otg_show_otg_state(struct seq_file *s, void *unused)
{
struct msm_otg *motg = s->private;
struct usb_phy *phy = &motg->phy;
seq_printf(s, "%s\n", usb_otg_state_string(phy->state));
return 0;
} |
functions | int msm_otg_otg_state_open(struct inode *inode, struct file *file)
{
return single_open(file, msm_otg_show_otg_state, inode->i_private);
} |
functions | int msm_otg_show_chg_type(struct seq_file *s, void *unused)
{
struct msm_otg *motg = s->private;
seq_printf(s, "%s\n", chg_to_string(motg->chg_type));
return 0;
} |
functions | int msm_otg_chg_open(struct inode *inode, struct file *file)
{
return single_open(file, msm_otg_show_chg_type, inode->i_private);
} |
functions | int msm_otg_aca_show(struct seq_file *s, void *unused)
{
if (debug_aca_enabled)
seq_printf(s, "enabled\n");
else
seq_printf(s, "disabled\n");
return 0;
} |
functions | int msm_otg_aca_open(struct inode *inode, struct file *file)
{
return single_open(file, msm_otg_aca_show, inode->i_private);
} |
functions | ssize_t msm_otg_aca_write(struct file *file, const char __user *ubuf,
size_t count, loff_t *ppos)
{
char buf[8];
struct msm_otg *motg = the_msm_otg;
if (motg->pdata->phy_type == SNPS_FEMTO_PHY) {
pr_err("ACA is not supported on Femto PHY\n");
return -ENODEV;
} |
functions | int msm_otg_bus_show(struct seq_file *s, void *unused)
{
if (debug_bus_voting_enabled)
seq_printf(s, "enabled\n");
else
seq_printf(s, "disabled\n");
return 0;
} |
functions | int msm_otg_bus_open(struct inode *inode, struct file *file)
{
return single_open(file, msm_otg_bus_show, inode->i_private);
} |
functions | ssize_t msm_otg_bus_write(struct file *file, const char __user *ubuf,
size_t count, loff_t *ppos)
{
char buf[8];
struct seq_file *s = file->private_data;
struct msm_otg *motg = s->private;
memset(buf, 0x00, sizeof(buf));
if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
return -EFAULT;... |
functions | int msm_otg_dbg_buff_show(struct seq_file *s, void *unused)
{
struct msm_otg *motg = s->private;
unsigned long flags;
unsigned i;
read_lock_irqsave(&motg->dbg_lock, flags);
i = motg->dbg_idx;
if (strnlen(motg->buf[i], DEBUG_MSG_LEN))
seq_printf(s, "%s\n", motg->buf[i]);
for (dbg_inc(&i); i != motg->dbg_idx; ... |
functions | int msm_otg_dbg_buff_open(struct inode *inode, struct file *file)
{
return single_open(file, msm_otg_dbg_buff_show, inode->i_private);
} |
functions | int
otg_get_prop_usbin_voltage_now(struct msm_otg *motg)
{
int rc = 0;
struct qpnp_vadc_result results;
if (IS_ERR_OR_NULL(motg->vadc_dev)) {
motg->vadc_dev = qpnp_get_vadc(motg->phy.dev, "usbin");
if (IS_ERR(motg->vadc_dev))
return PTR_ERR(motg->vadc_dev);
} |
functions | int msm_otg_pmic_dp_dm(struct msm_otg *motg, int value)
{
int ret = 0;
switch (value) {
case POWER_SUPPLY_DP_DM_DPF_DMF:
if (!motg->rm_pulldown) {
ret = msm_hsusb_ldo_enable(motg, USB_PHY_REG_ON);
if (!ret) {
motg->rm_pulldown = true;
msm_otg_dbg_log_event(&motg->phy, "RM Pulldown",
motg->rm_p... |
functions | int otg_power_get_property_usb(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{
struct msm_otg *motg = container_of(psy, struct msm_otg, usb_psy);
switch (psp) {
case POWER_SUPPLY_PROP_SCOPE:
if (motg->host_mode)
val->intval = POWER_SUPPLY_SCOPE_SYSTEM;
... |
functions | int otg_power_set_property_usb(struct power_supply *psy,
enum power_supply_property psp,
const union power_supply_propval *val)
{
struct msm_otg *motg = container_of(psy, struct msm_otg, usb_psy);
msm_otg_dbg_log_event(&motg->phy, "SET PWR PROPERTY", psp, psy->type);
switch (psp) {
case POWER_SUPPLY_PR... |
functions | int otg_power_property_is_writeable_usb(struct power_supply *psy,
enum power_supply_property psp)
{
switch (psp) {
case POWER_SUPPLY_PROP_HEALTH:
case POWER_SUPPLY_PROP_PRESENT:
case POWER_SUPPLY_PROP_ONLINE:
case POWER_SUPPLY_PROP_VOLTAGE_MAX:
case POWER_SUPPLY_PROP_CURRENT_MAX:
case POWER_SUPPLY_PROP_DP_... |
functions | int msm_otg_debugfs_init(struct msm_otg *motg)
{
struct dentry *msm_otg_dentry;
struct msm_otg_platform_data *pdata = motg->pdata;
msm_otg_dbg_root = debugfs_create_dir("msm_otg", NULL);
if (!msm_otg_dbg_root || IS_ERR(msm_otg_dbg_root))
return -ENODEV;
if ((pdata->mode == USB_OTG || pdata->mode == USB_PERIPH... |
functions | void msm_otg_debugfs_cleanup(void)
{
debugfs_remove_recursive(msm_otg_dbg_root);
} |
functions | void msm_otg_pnoc_errata_fix(struct msm_otg *motg)
{
int ret;
struct msm_otg_platform_data *pdata = motg->pdata;
struct msm_otg_scm_cmd_buf cmd_buf;
if (!pdata->pnoc_errata_fix)
return;
dev_dbg(motg->phy.dev, "applying fix for pnoc h/w issue\n");
cmd_buf.device_id = MSM_OTG_DEVICE_ID;
cmd_buf.vmid_idx = MSM... |
functions | int msm_otg_setup_devices(struct platform_device *ofdev,
enum usb_mode_type mode, bool init)
{
const char *gadget_name = "msm_hsusb";
const char *host_name = "msm_hsusb_host";
static struct platform_device *gadget_pdev;
static struct platform_device *host_pdev;
int retval = 0;
if (!init) {
if (gadget_pdev)
... |
functions | int msm_otg_register_power_supply(struct platform_device *pdev,
struct msm_otg *motg)
{
int ret;
ret = power_supply_register(&pdev->dev, &motg->usb_psy);
if (ret < 0) {
dev_err(motg->phy.dev,
"%s:power_supply_register usb failed\n",
__func__);
return ret;
} |
functions | int msm_otg_ext_chg_open(struct inode *inode, struct file *file)
{
struct msm_otg *motg = the_msm_otg;
pr_debug("msm_otg ext chg open\n");
msm_otg_dbg_log_event(&motg->phy, "EXT CHG: OPEN",
motg->inputs, motg->phy.state);
motg->ext_chg_opened = true;
file->private_data = (void *)motg;
return 0;
} |
functions | long
msm_otg_ext_chg_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct msm_otg *motg = file->private_data;
struct msm_usb_chg_info info = {0} |
functions | int msm_otg_ext_chg_mmap(struct file *file, struct vm_area_struct *vma)
{
struct msm_otg *motg = file->private_data;
unsigned long vsize = vma->vm_end - vma->vm_start;
int ret;
if (vma->vm_pgoff || vsize > PAGE_SIZE)
return -EINVAL;
vma->vm_pgoff = __phys_to_pfn(motg->io_res->start);
vma->vm_page_prot = pgpro... |
functions | int msm_otg_ext_chg_release(struct inode *inode, struct file *file)
{
struct msm_otg *motg = file->private_data;
pr_debug("msm_otg ext chg release\n");
msm_otg_dbg_log_event(&motg->phy, "EXT CHG: RELEASE",
motg->inputs, motg->phy.state);
motg->ext_chg_opened = false;
return 0;
} |
functions | int msm_otg_setup_ext_chg_cdev(struct msm_otg *motg)
{
int ret;
if (motg->pdata->enable_sec_phy || motg->pdata->mode == USB_HOST ||
motg->pdata->otg_control != OTG_PMIC_CONTROL ||
psy != &motg->usb_psy) {
pr_debug("usb ext chg is not supported by msm otg\n");
return -ENODEV;
} |
functions | ssize_t dpdm_pulldown_enable_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct msm_otg *motg = the_msm_otg;
struct msm_otg_platform_data *pdata = motg->pdata;
return snprintf(buf, PAGE_SIZE, "%s\n", pdata->dpdm_pulldown_added ?
"enabled" : "disabled");
} |
functions | ssize_t dpdm_pulldown_enable_store(struct device *dev,
struct device_attribute *attr, const char
*buf, size_t size)
{
struct msm_otg *motg = the_msm_otg;
struct msm_otg_platform_data *pdata = motg->pdata;
if (!strnicmp(buf, "enable", 6)) {
pdata->dpdm_pulldown_added = true;
return size;
} |
functions | int msm_otg_probe(struct platform_device *pdev)
{
int ret = 0;
int len = 0;
u32 tmp[3];
struct resource *res;
struct msm_otg *motg;
struct usb_phy *phy;
struct msm_otg_platform_data *pdata;
void __iomem *tcsr;
int id_irq = 0;
dev_info(&pdev->dev, "msm_otg probe\n");
motg = kzalloc(sizeof(struct msm_otg), G... |
functions | else if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "No platform data given. Bailing out\n");
ret = -ENODEV;
goto disable_phy_csr_clk;
} |
functions | else if (motg->pdata->pmic_id_irq) {
id_irq = motg->pdata->pmic_id_irq;
} |
functions | int msm_otg_remove(struct platform_device *pdev)
{
struct msm_otg *motg = platform_get_drvdata(pdev);
struct usb_phy *phy = &motg->phy;
int cnt = 0;
if (phy->otg->host || phy->otg->gadget)
return -EBUSY;
unregister_pm_notifier(&motg->pm_notify);
if (!motg->ext_chg_device) {
device_destroy(motg->ext_chg_cla... |
functions | void msm_otg_shutdown(struct platform_device *pdev)
{
struct msm_otg *motg = platform_get_drvdata(pdev);
dev_dbg(&pdev->dev, "OTG shutdown\n");
#ifdef CONFIG_MACH_XIAOMI_KENZO
if (vbus_otg && regulator_is_enabled(vbus_otg)) {
msm_hsusb_vbus_power(motg, 0);
msleep(500);
dev_dbg(&pdev->dev, "OTG Vbus vreg disab... |
functions | int msm_otg_runtime_idle(struct device *dev)
{
struct msm_otg *motg = dev_get_drvdata(dev);
struct usb_phy *phy = &motg->phy;
dev_dbg(dev, "OTG runtime idle\n");
msm_otg_dbg_log_event(phy, "RUNTIME IDLE",
phy->state, motg->ext_chg_active);
if (phy->state == OTG_STATE_UNDEFINED)
return -EAGAIN;
if (motg->e... |
functions | int msm_otg_runtime_suspend(struct device *dev)
{
struct msm_otg *motg = dev_get_drvdata(dev);
dev_dbg(dev, "OTG runtime suspend\n");
msm_otg_dbg_log_event(&motg->phy, "RUNTIME SUSPEND",
get_pm_runtime_counter(dev), 0);
return msm_otg_suspend(motg);
} |
functions | int msm_otg_runtime_resume(struct device *dev)
{
struct msm_otg *motg = dev_get_drvdata(dev);
dev_dbg(dev, "OTG runtime resume\n");
msm_otg_dbg_log_event(&motg->phy, "RUNTIME RESUME",
get_pm_runtime_counter(dev), motg->pm_done);
pm_runtime_get_noresume(dev);
motg->pm_done = 0;
msm_otg_dbg_log_event(&motg->phy... |
functions | int msm_otg_pm_suspend(struct device *dev)
{
int ret = 0;
struct msm_otg *motg = dev_get_drvdata(dev);
dev_dbg(dev, "OTG PM suspend\n");
msm_otg_dbg_log_event(&motg->phy, "PM SUSPEND START",
get_pm_runtime_counter(dev),
atomic_read(&motg->pm_suspended));
atomic_set(&motg->pm_suspended, 1);
ret = msm_otg_s... |
functions | int msm_otg_pm_resume(struct device *dev)
{
int ret = 0;
struct msm_otg *motg = dev_get_drvdata(dev);
dev_dbg(dev, "OTG PM resume\n");
msm_otg_dbg_log_event(&motg->phy, "PM RESUME START",
get_pm_runtime_counter(dev), motg->pm_done);
motg->pm_done = 0;
if (motg->async_int || motg->sm_work_pending ||
motg-... |
includes |
#include <linux/module.h> |
includes | #include <linux/moduleparam.h> |
includes | #include <linux/init.h> |
includes | #include <linux/async.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/pm.h> |
includes | #include <linux/bitops.h> |
includes | #include <linux/platform_device.h> |
includes | #include <linux/jiffies.h> |
includes | #include <linux/debugfs.h> |
includes | #include <linux/pm_runtime.h> |
includes | #include <linux/regulator/consumer.h> |
includes | #include <linux/slab.h> |
includes | #include <sound/core.h> |
includes | #include <sound/pcm.h> |
includes | #include <sound/pcm_params.h> |
includes | #include <sound/soc.h> |
includes | #include <sound/initval.h> |
includes |
#include <trace/events/asoc.h> |
defines |
#define DAPM_UPDATE_STAT(widget, val) widget->dapm->card->dapm_stats.val++; |
functions | void pop_wait(u32 pop_time)
{
if (pop_time)
schedule_timeout_uninterruptible(msecs_to_jiffies(pop_time));
} |
functions | void pop_dbg(struct device *dev, u32 pop_time, const char *fmt, ...)
{
va_list args;
char *buf;
if (!pop_time)
return;
buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
if (buf == NULL)
return;
va_start(args, fmt);
vsnprintf(buf, PAGE_SIZE, fmt, args);
dev_info(dev, "%s", buf);
va_end(args);
kfree(buf);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.