标签:static int col hot and 参数 lin nes 驱动
1 ret = gpio_request(linux_gpio, "xxxx_gpio"); //一个参数是linux内部的gpio编号
1 irq = gpio_to_irq(linux_gpio);
request_irq(data->hpd_irq, NULL,irq_handle_fun, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING | IRQF_ONESHOT, "lt8912-hpd-isr", data);
static irqreturn_t irq_handle_fun(int irq, void *data) { struct lt8912_private *pdata = data; if (gpio_is_valid(pdata->hpd_gpio)) { int hpd = gpio_get_value(pdata->hpd_gpio); /* Fixme: do something while hdmi plugin */ } return IRQ_HANDLED; }
标签:static int col hot and 参数 lin nes 驱动
原文地址:https://www.cnblogs.com/oncethings/p/14719010.html