cregit-Linux how code gets into the kernel

Release 4.14 drivers/mmc/host/dw_mmc-pltfm.c

Directory: drivers/mmc/host
/*
 * Synopsys DesignWare Multimedia Card Interface driver
 *
 * Copyright (C) 2009 NXP Semiconductors
 * Copyright (C) 2009, 2010 Imagination Technologies Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/mmc/host.h>
#include <linux/mmc/mmc.h>
#include <linux/of.h>
#include <linux/clk.h>

#include "dw_mmc.h"
#include "dw_mmc-pltfm.h"


int dw_mci_pltfm_register(struct platform_device *pdev, const struct dw_mci_drv_data *drv_data) { struct dw_mci *host; struct resource *regs; host = devm_kzalloc(&pdev->dev, sizeof(struct dw_mci), GFP_KERNEL); if (!host) return -ENOMEM; host->irq = platform_get_irq(pdev, 0); if (host->irq < 0) return host->irq; host->drv_data = drv_data; host->dev = &pdev->dev; host->irq_flags = 0; host->pdata = pdev->dev.platform_data; regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->regs = devm_ioremap_resource(&pdev->dev, regs); if (IS_ERR(host->regs)) return PTR_ERR(host->regs); /* Get registers' physical base address */ host->phy_regs = regs->start; platform_set_drvdata(pdev, host); return dw_mci_probe(host); }

Contributors

PersonTokensPropCommitsCommitProp
Shashidhar Hiremath11466.28%110.00%
Thomas Abraham2615.12%440.00%
Andy Shevchenko126.98%220.00%
Thierry Reding105.81%110.00%
Jaehoon Chung95.23%110.00%
Arnd Bergmann10.58%110.00%
Total172100.00%10100.00%

EXPORT_SYMBOL_GPL(dw_mci_pltfm_register); const struct dev_pm_ops dw_mci_pltfm_pmops = { SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) SET_RUNTIME_PM_OPS(dw_mci_runtime_suspend, dw_mci_runtime_resume, NULL) }; EXPORT_SYMBOL_GPL(dw_mci_pltfm_pmops); static const struct of_device_id dw_mci_pltfm_match[] = { { .compatible = "snps,dw-mshc", }, { .compatible = "altr,socfpga-dw-mshc", }, { .compatible = "img,pistachio-dw-mshc", }, {}, }; MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
static int dw_mci_pltfm_probe(struct platform_device *pdev) { const struct dw_mci_drv_data *drv_data = NULL; const struct of_device_id *match; if (pdev->dev.of_node) { match = of_match_node(dw_mci_pltfm_match, pdev->dev.of_node); drv_data = match->data; } return dw_mci_pltfm_register(pdev, drv_data); }

Contributors

PersonTokensPropCommitsCommitProp
Heiko Stübner62100.00%2100.00%
Total62100.00%2100.00%


int dw_mci_pltfm_remove(struct platform_device *pdev) { struct dw_mci *host = platform_get_drvdata(pdev); dw_mci_remove(host); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Heiko Stübner28100.00%1100.00%
Total28100.00%1100.00%

EXPORT_SYMBOL_GPL(dw_mci_pltfm_remove); static struct platform_driver dw_mci_pltfm_driver = { .probe = dw_mci_pltfm_probe, .remove = dw_mci_pltfm_remove, .driver = { .name = "dw_mmc", .of_match_table = dw_mci_pltfm_match, .pm = &dw_mci_pltfm_pmops, }, }; module_platform_driver(dw_mci_pltfm_driver); MODULE_DESCRIPTION("DW Multimedia Card Interface driver"); MODULE_AUTHOR("NXP Semiconductor VietNam"); MODULE_AUTHOR("Imagination Technologies Ltd"); MODULE_LICENSE("GPL v2");

Overall Contributors

PersonTokensPropCommitsCommitProp
Shashidhar Hiremath20245.50%15.00%
Heiko Stübner9621.62%210.00%
Thomas Abraham6915.54%525.00%
Andy Shevchenko194.28%315.00%
Shawn Lin163.60%15.00%
Thierry Reding132.93%15.00%
Jaehoon Chung112.48%210.00%
Andrew Bresticker61.35%15.00%
Dinh Nguyen51.13%15.00%
Jingoo Han30.68%15.00%
addy ke30.68%15.00%
Arnd Bergmann10.23%15.00%
Total444100.00%20100.00%
Directory: drivers/mmc/host
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.