static int sh_tmu_enable(struct sh_tmu_channel *ch) { if (ch->enable_count++ > 0) return 0; pm_runtime_get_sync(&ch->tmu->pdev->dev); dev_pm_syscore_device(&ch->tmu->pdev->dev, true); return __sh_tmu_enable(ch); }
static int sh_tmu_enable(struct sh_tmu_priv *p) { if (p->enable_count++ > 0) return 0; pm_runtime_get_sync(&p->pdev->dev); dev_pm_syscore_device(&p->pdev->dev, true); return __sh_tmu_enable(p); }
static void sh_tmu_clocksource_resume(struct clocksource *cs) { struct sh_tmu_channel *ch = cs_to_sh_tmu(cs); if (!ch->cs_enabled) return; if (ch->enable_count++ == 0) { pm_genpd_syscore_poweron(&ch->tmu->pdev->dev); __sh_tmu_enable(ch); } }
static void sh_tmu_clocksource_resume(struct clocksource *cs) { struct sh_tmu_priv *p = cs_to_sh_tmu(cs); if (!p->cs_enabled) return; if (p->enable_count++ == 0) { pm_genpd_syscore_poweron(&p->pdev->dev); __sh_tmu_enable(p); } }