linux下查看设备的接口,linux 查看sdio接口有哪些设备?

static struct pxamci_platform_data luther_mci_platform_data = {

.detect_delay = 20,//检测到sd设备插入之后,延时detect_delay个tick之后,执行函数

.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,

.init = luther_mci_init,

.setpower = luther_mci_setpower,

.exit = luther_mci_exit,

};

在luther_init()->

//luther_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_CFG_PIN(GPIO8_GPIO_MMC_DETECT));

所以设置GPIO8作为sd卡插入的中断检测IO

//pxamci_probe()->该函数是和platform的设备匹配上之后,会立即调用的probe

//host->pdata->init(&pdev->dev, pxamci_detect_irq, mmc); 将mmc作为devid的传递参数

//就是调用设备函数luther_mci_platform_data->luther_mci_init()

//request_irq(cd_irq, luther_detect_int,IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,"MMC card detect", data);

//这样将中断注册到了物理硬件系统

当GPIO8检测到电平变化,将触发pxamci_detect_irq()中断处理函数,

该函数会继续调用mmc_detect_change()->mmc_schedule_delayed_work(&host->detect, delay);调度该host的自动检测函数

你可能感兴趣的:(linux下查看设备的接口)