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的自动检测函数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值