static int superior_hsmmc_late_init(struct device *dev) { int ret = 0; struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct omap_mmc_platform_data *pdata = dev->platform_data; /* Setting MMC1 Card detect IRQ */ if (pdev->id == 0) { ret = twl6030_mmc_card_detect_config(); if (ret) pr_err("(%s): failed configuring MMC1 card detect\n", __func__); pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE + MMCDETECT_INTR_OFFSET; pdata->slots[0].card_detect = twl6030_mmc_card_detect; if (sd_detection_cmd_dev == NULL) { /*create sysfs file for detect pin*/ sd_detection_cmd_dev = device_create(sec_class, NULL, 0, NULL, "sdcard"); if (IS_ERR(sd_detection_cmd_dev)) pr_err("Failed to create sdcard sysfs dev\n"); if (device_create_file(sd_detection_cmd_dev, &dev_attr_status) < 0) pr_err("Fail to create sysfs " "sdcard/status sysfs file\n"); } } return ret; }
static int omap4_twl6030_hsmmc_late_init(struct device *dev) { int ret = 0; struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct omap_mmc_platform_data *pdata = dev->platform_data; /* Setting MMC1 Card detect Irq */ if (pdev->id == 0) { ret = twl6030_mmc_card_detect_config(); if (ret) pr_err("Failed configuring MMC1 card detect\n"); pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE + MMCDETECT_INTR_OFFSET; pdata->slots[0].card_detect = twl6030_mmc_card_detect; } /* Setting MMC3 SDIO card .built-in variable * This is to make sure that if WiFi driver is not loaded * at all, then the MMC/SD/SDIO driver does not keep * turning on/off the voltage to the SDIO card */ if (pdev->id == 2) { ret = 0; pdata->slots[0].mmc_data.built_in = 1; } return ret; }
static int omap4_twl6030_hsmmc_late_init(struct device *dev) { int ret = 0; struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct omap_mmc_platform_data *pdata = dev->platform_data; /* Setting MMC1 Card detect Irq */ if (pdev->id == 0) { ret = twl6030_mmc_card_detect_config(); if (ret) pr_err("Failed configuring MMC1 card detect\n"); pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE + MMCDETECT_INTR_OFFSET; pdata->slots[0].card_detect = twl6030_mmc_card_detect; } return ret; }
static int omap4_twl6030_hsmmc_late_init(struct device *dev) { int irq = 0; struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct omap_mmc_platform_data *pdata = dev->platform_data; /* Setting MMC1 Card detect Irq */ if (pdev->id == 0) { irq = twl6030_mmc_card_detect_config(); if (irq < 0) { pr_err("Failed configuring MMC1 card detect\n"); return irq; } pdata->slots[0].card_detect_irq = irq; pdata->slots[0].card_detect = twl6030_mmc_card_detect; } return 0; }
static int omap4_twl6030_hsmmc_late_init(struct device *dev) { int ret = 0; struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct omap_mmc_platform_data *pdata = dev->platform_data; if (!pdata) { dev_err(dev, "%s: NULL platform data\n", __func__); return -EINVAL; } /* Setting MMC1 Card detect Irq */ if (pdev->id == 0) { ret = twl6030_mmc_card_detect_config(); if (ret) dev_err(dev, "%s: Error card detect config(%d)\n", __func__, ret); else pdata->slots[0].card_detect = twl6030_mmc_card_detect; } return ret; }
static int omap4_twl6030_hsmmc_late_init(struct device *dev) { int irq = 0; struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct omap_mmc_platform_data *pdata = dev->platform_data; if (!pdata) { dev_err(dev, "%s: NULL platform data\n", __func__); return -EINVAL; } if (pdev->id == 0) { irq = twl6030_mmc_card_detect_config(); if (irq < 0) { dev_err(dev, "%s: Error card detect config(%d)\n", __func__, irq); return irq; } pdata->slots[0].card_detect = twl6030_mmc_card_detect; } return 0; }