/* * Copyright (C) 2014 Linaro Ltd * * Author: Ulf Hansson <ulf.hansson@linaro.org> * * License terms: GNU General Public License (GPL) version 2 * * MMC power sequence management */ #include <linux/kernel.h> #include <linux/err.h> #include <linux/module.h> #include <linux/of.h> #include <linux/mmc/host.h> #include "pwrseq.h" static DEFINE_MUTEX(pwrseq_list_mutex); static LIST_HEAD(pwrseq_list);
int mmc_pwrseq_alloc(struct mmc_host *host) { struct device_node *np; struct mmc_pwrseq *p; np = of_parse_phandle(host->parent->of_node, "mmc-pwrseq", 0); if (!np) return 0; mutex_lock(&pwrseq_list_mutex); list_for_each_entry(p, &pwrseq_list, pwrseq_node) { if (p->dev->of_node == np) { if (!try_module_get(p->owner)) dev_err(host->parent, "increasing module refcount failed\n"); else host->pwrseq = p; break; } } of_node_put(np); mutex_unlock(&pwrseq_list_mutex); if (!host->pwrseq) return -EPROBE_DEFER; dev_info(host->parent, "allocated mmc-pwrseq\n"); return 0; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ulf Hansson | 69 | 52.27% | 2 | 50.00% |
Srinivas Kandagatla | 53 | 40.15% | 1 | 25.00% |
Alexandre Courbot | 10 | 7.58% | 1 | 25.00% |
Total | 132 | 100.00% | 4 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ulf Hansson | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ulf Hansson | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ulf Hansson | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ulf Hansson | 23 | 60.53% | 1 | 50.00% |
Srinivas Kandagatla | 15 | 39.47% | 1 | 50.00% |
Total | 38 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Srinivas Kandagatla | 45 | 81.82% | 1 | 50.00% |
Ulf Hansson | 10 | 18.18% | 1 | 50.00% |
Total | 55 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Srinivas Kandagatla | 33 | 91.67% | 1 | 33.33% |
Alexandre Courbot | 2 | 5.56% | 1 | 33.33% |
Ulf Hansson | 1 | 2.78% | 1 | 33.33% |
Total | 36 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Ulf Hansson | 240 | 57.69% | 2 | 50.00% |
Srinivas Kandagatla | 164 | 39.42% | 1 | 25.00% |
Alexandre Courbot | 12 | 2.88% | 1 | 25.00% |
Total | 416 | 100.00% | 4 | 100.00% |