/* * 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 | ulf hansson | 69 | 52.27% | 2 | 50.00% |
srinivas kandagatla | srinivas kandagatla | 53 | 40.15% | 1 | 25.00% |
alexandre courbot | alexandre courbot | 10 | 7.58% | 1 | 25.00% |
Total | 132 | 100.00% | 4 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
ulf hansson | ulf hansson | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
ulf hansson | ulf hansson | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
ulf hansson | ulf hansson | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
ulf hansson | ulf hansson | 23 | 60.53% | 1 | 50.00% |
srinivas kandagatla | srinivas kandagatla | 15 | 39.47% | 1 | 50.00% |
Total | 38 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
srinivas kandagatla | srinivas kandagatla | 45 | 81.82% | 1 | 50.00% |
ulf hansson | ulf hansson | 10 | 18.18% | 1 | 50.00% |
Total | 55 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
srinivas kandagatla | srinivas kandagatla | 33 | 91.67% | 1 | 33.33% |
alexandre courbot | alexandre courbot | 2 | 5.56% | 1 | 33.33% |
ulf hansson | ulf hansson | 1 | 2.78% | 1 | 33.33% |
Total | 36 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
ulf hansson | ulf hansson | 240 | 57.69% | 2 | 50.00% |
srinivas kandagatla | srinivas kandagatla | 164 | 39.42% | 1 | 25.00% |
alexandre courbot | alexandre courbot | 12 | 2.88% | 1 | 25.00% |
Total | 416 | 100.00% | 4 | 100.00% |