cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/platform/intel-mid/device_libs/platform_mrfld_sd.c

/*
 * SDHCI platform data initilisation file
 *
 * (C) Copyright 2016 Intel Corporation
 * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 *
 * 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; version 2
 * of the License.
 */

#include <linux/init.h>
#include <linux/pci.h>

#include <linux/mmc/sdhci-pci-data.h>

#include <asm/intel-mid.h>


#define INTEL_MRFLD_SD			2

#define INTEL_MRFLD_SD_CD_GPIO		77


static struct sdhci_pci_data mrfld_sdhci_pci_data = {
	.rst_n_gpio	= -EINVAL,
	.cd_gpio	= INTEL_MRFLD_SD_CD_GPIO,
};


static struct sdhci_pci_data * mrfld_sdhci_pci_get_data(struct pci_dev *pdev, int slotno) { unsigned int func = PCI_FUNC(pdev->devfn); if (func == INTEL_MRFLD_SD) return &mrfld_sdhci_pci_data; return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Andy Shevchenko40100.00%1100.00%
Total40100.00%1100.00%


static int __init mrfld_sd_init(void) { if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER) return -ENODEV; sdhci_pci_get_data = mrfld_sdhci_pci_get_data; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Andy Shevchenko27100.00%1100.00%
Total27100.00%1100.00%

arch_initcall(mrfld_sd_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Andy Shevchenko111100.00%1100.00%
Total111100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.