本文整理汇总了C++中pil_shutdown函数的典型用法代码示例。如果您正苦于以下问题:C++ pil_shutdown函数的具体用法?C++ pil_shutdown怎么用?C++ pil_shutdown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pil_shutdown函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: modem_stop
static void modem_stop(const struct subsys_desc *desc)
{
struct q6v4_modem *drv = desc_to_modem(desc);
if (drv->loadable) {
pil_shutdown(&drv->q6_sw.desc);
pil_shutdown(&drv->q6_fw.desc);
}
}
示例2: mss_stop
static void mss_stop(const struct subsys_desc *desc)
{
struct modem_data *drv = subsys_to_drv(desc);
if (desc->is_not_loadable)
return;
pil_shutdown(&drv->mba->desc);
pil_shutdown(&drv->q6->desc);
}
示例3: modem_shutdown
static int modem_shutdown(const struct subsys_desc *subsys)
{
struct modem_data *drv;
drv = container_of(subsys, struct modem_data, subsys_desc);
/*
* If the modem didn't already crash, setting SMSM_RESET here will help
* flush caches etc. The ignore_smsm_ack flag is set to ignore the
* SMSM_RESET notification that is generated due to the modem settings
* its own SMSM_RESET bit in response to the apps setting the apps
* SMSM_RESET bit.
*/
if (!(smsm_get_state(SMSM_MODEM_STATE) & SMSM_RESET)) {
drv->ignore_smsm_ack = 1;
smsm_reset_modem(SMSM_RESET);
}
/* Disable the modem watchdog to allow clean modem bootup */
writel_relaxed(0x0, drv->wdog + 0x8);
/*
* The write above needs to go through before the modem is powered up
* again.
*/
mb();
/* Wait here to allow the modem to clean up caches, etc. */
msleep(20);
pil_shutdown(&drv->pil_desc);
disable_irq_nosync(drv->irq);
return 0;
}
示例4: lpass_q6_stop
static void lpass_q6_stop(const struct subsys_desc *subsys)
{
struct q6v3_data *drv;
drv = container_of(subsys, struct q6v3_data, subsys_desc);
pil_shutdown(&drv->pil_desc);
}
示例5: pil_put
/**
* pil_put() - Inform PIL the peripheral no longer needs to be active
* @peripheral_handle: pointer from a previous call to pil_get()
*
* This doesn't imply that a peripheral is shutdown or in reset since another
* driver could be using the peripheral.
*/
void pil_put(void *peripheral_handle)
{
struct pil_device *pil_d, *pil = peripheral_handle;
if (IS_ERR_OR_NULL(pil))
return;
mutex_lock(&pil->lock);
if (WARN(!pil->count, "%s: %s: Reference count mismatch\n",
pil->desc->name, __func__))
goto err_out;
/* LGE_CHANGE */
#if CONFIG_MACH_LGE
//LGE_CHANES : Workaround code for pereventing watchdog reset.(QCT Patch)
if (!--pil->count){
if (!!strncmp("modem", pil->desc->name, 5)) //ALRAN : LG FX3 - allow pil_put only for not modem*
pil_shutdown(pil);
else{
pr_err("ALRAN: pil %s shutdown, but block it\n", pil->desc->name);
pil->count++;
}
}
#else
if (!--pil->count)
pil_shutdown(pil);
#endif
mutex_unlock(&pil->lock);
pil_d = find_peripheral(pil->desc->depends_on);
module_put(pil->owner);
if (pil_d) {
pil_put(pil_d);
put_device(&pil_d->dev);
}
put_device(&pil->dev);
return;
err_out:
mutex_unlock(&pil->lock);
return;
}
示例6: wcnss_shutdown
static int wcnss_shutdown(const struct subsys_desc *subsys)
{
struct pronto_data *drv = subsys_to_drv(subsys);
pil_shutdown(&drv->desc);
return 0;
}
示例7: riva_stop
static void riva_stop(const struct subsys_desc *desc)
{
struct riva_data *drv;
drv = container_of(desc, struct riva_data, subsys_desc);
pil_shutdown(&drv->pil_desc);
}
示例8: pil_put
/**
* pil_put() - Inform PIL the peripheral no longer needs to be active
* @peripheral_handle: pointer from a previous call to pil_get()
*
* This doesn't imply that a peripheral is shutdown or in reset since another
* driver could be using the peripheral.
*/
void pil_put(void *peripheral_handle)
{
struct pil_device *pil_d, *pil = peripheral_handle;
if (IS_ERR_OR_NULL(pil))
return;
mutex_lock(&pil->lock);
if (WARN(!pil->count, "%s: Reference count mismatch\n", __func__))
goto err_out;
if (!--pil->count)
pil_shutdown(pil);
mutex_unlock(&pil->lock);
pil_d = find_peripheral(pil->desc->depends_on);
module_put(pil->owner);
if (pil_d) {
pil_put(pil_d);
put_device(&pil_d->dev);
}
put_device(&pil->dev);
return;
err_out:
mutex_unlock(&pil->lock);
return;
}
示例9: modem_shutdown
static int modem_shutdown(const struct subsys_desc *subsys, bool force_stop)
{
struct modem_data *drv = subsys_to_drv(subsys);
unsigned long ret;
if (subsys->is_not_loadable)
return 0;
if (!subsys_get_crash_status(drv->subsys) && force_stop &&
subsys->force_stop_gpio) {
gpio_set_value(subsys->force_stop_gpio, 1);
ret = wait_for_completion_timeout(&drv->stop_ack,
msecs_to_jiffies(STOP_ACK_TIMEOUT_MS));
if (!ret)
pr_warn("Timed out on stop ack from modem.\n");
gpio_set_value(subsys->force_stop_gpio, 0);
}
if (drv->subsys_desc.ramdump_disable_gpio) {
drv->subsys_desc.ramdump_disable = gpio_get_value(
drv->subsys_desc.ramdump_disable_gpio);
pr_warn("Ramdump disable gpio value is %d\n",
drv->subsys_desc.ramdump_disable);
}
pil_shutdown(&drv->q6->desc);
return 0;
}
示例10: modem_stop
static void modem_stop(const struct subsys_desc *subsys)
{
struct modem_data *drv;
drv = container_of(subsys, struct modem_data, subsys_desc);
pil_shutdown(&drv->pil_desc);
}
示例11: modem_powerup
static int modem_powerup(const struct subsys_desc *subsys)
{
struct modem_data *drv = subsys_to_drv(subsys);
int ret;
#ifdef CONFIG_MACH_LGE
pr_info("%s : modem is powering up\n", __func__);
dump_stack();
#endif
if (subsys->is_not_loadable)
return 0;
/*
* At this time, the modem is shutdown. Therefore this function cannot
* run concurrently with either the watchdog bite error handler or the
* SMSM callback, making it safe to unset the flag below.
*/
INIT_COMPLETION(drv->stop_ack);
drv->ignore_errors = false;
/* START : subsys_modem_restart : testmode */
ignore_errors_by_subsys_modem_restart = false;
/* END : subsys_modem_restart : testmode */
ret = pil_boot(&drv->q6->desc);
if (ret)
return ret;
ret = pil_boot(&drv->mba->desc);
if (ret)
pil_shutdown(&drv->q6->desc);
return ret;
}
示例12: pil_put
void pil_put(void *peripheral_handle)
{
struct pil_device *pil_d, *pil = peripheral_handle;
if (IS_ERR_OR_NULL(pil))
return;
printk("%s: %s(%d) for %s\n", __func__, current->comm, current->pid, pil->desc->name);
mutex_lock(&pil->lock);
if (WARN(!pil->count, "%s: %s: Reference count mismatch\n",
pil->desc->name, __func__))
goto err_out;
#ifdef CONFIG_MACH_VILLEC2
if (pil->count == 1)
goto unlock;
#endif
if (!--pil->count)
pil_shutdown(pil);
#ifdef CONFIG_MACH_VILLEC2
unlock:
#endif
mutex_unlock(&pil->lock);
pil_d = find_peripheral(pil->desc->depends_on);
module_put(pil->owner);
if (pil_d) {
pil_put(pil_d);
put_device(&pil_d->dev);
}
put_device(&pil->dev);
return;
err_out:
mutex_unlock(&pil->lock);
return;
}
示例13: bcss_shutdown
static int bcss_shutdown(const struct subsys_desc *subsys, bool force_stop)
{
struct bcss_data *drv = subsys_to_drv(subsys);
pil_shutdown(&drv->desc);
return 0;
}
示例14: adsp_shutdown
static int adsp_shutdown(const struct subsys_desc *subsys, bool force_stop)
{
struct lpass_data *drv = subsys_to_lpass(subsys);
pil_shutdown(&drv->q6->desc);
pr_debug("ADSP is Down\n");
adsp_set_state("OFFLINE");
return 0;
}
示例15: modem_shutdown
static int modem_shutdown(const struct subsys_desc *subsys)
{
struct q6v4_modem *drv = desc_to_modem(subsys);
/* The watchdogs keep running even after the modem is shutdown */
writel_relaxed(0x0, drv->q6_fw.wdog_base + 0x24);
writel_relaxed(0x0, drv->q6_sw.wdog_base + 0x24);
mb();
if (drv->loadable) {
pil_shutdown(&drv->q6_sw.desc);
pil_shutdown(&drv->q6_fw.desc);
}
disable_irq_nosync(drv->q6_fw.wdog_irq);
disable_irq_nosync(drv->q6_sw.wdog_irq);
return 0;
}