/* * Caller ensures that tegra_set_wake (irq_set_wake callback) * is called for non-gpio wake sources only */ static int tegra_set_wake(struct irq_data *d, unsigned int enable) { int ret; int wake_size; int wake_list[PMC_MAX_WAKE_COUNT]; int i; int err = 0; tegra_irq_to_wake(d->irq, wake_list, &wake_size); for (i = 0; i < wake_size; i++) { /* pmc lp0 wake enable for non-gpio wake sources */ ret = tegra_pm_irq_set_wake(wake_list[i], enable); if (ret < 0) { pr_err("Failed lp0 wake %s for irq=%d, wake%d ret=%d\n", (enable ? "enable" : "disable"), d->irq, wake_list[i], ret); if (!err) err = ret; } } /* lp1 wake enable for wake sources */ ret = tegra_update_lp1_irq_wake(d->irq, enable); if (ret) pr_err("Failed lp1 wake %s for irq=%d\n", (enable ? "enable" : "disable"), d->irq); return ret; }
/* * Caller ensures that tegra_set_wake (irq_set_wake callback) * is called for non-gpio wake sources only */ static int tegra_set_wake(struct irq_data *d, unsigned int enable) { int wake = tegra_irq_to_wake(d->irq); int ret; /* pmc lp0 wake enable for non-gpio wake sources */ ret = tegra_pm_irq_set_wake(wake, enable); if (ret) pr_err("Failed lp0 wake %s for irq=%d\n", (enable ? "enable" : "disable"), d->irq); /* lp1 wake enable for wake sources */ ret = tegra_update_lp1_irq_wake(d->irq, enable); if (ret) pr_err("Failed lp1 wake %s for irq=%d\n", (enable ? "enable" : "disable"), d->irq); return ret; }
static int tegra_set_wake(struct irq_data *d, unsigned int enable) { return tegra_pm_irq_set_wake(d->irq, enable); }