DevKit8500D/A User Manual - DMCS Pages for Students
DevKit8500D/A User Manual - DMCS Pages for Students
DevKit8500D/A User Manual - DMCS Pages for Students
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
goto fail2;<br />
}<br />
error = gpio_direction_input(button->gpio);<br />
if (error < 0) {<br />
dev_err(dev, "failed to configure"<br />
" direction <strong>for</strong> GPIO %d, error %d\n",<br />
button->gpio, error);<br />
goto fail3;<br />
}<br />
irq = gpio_to_irq(button->gpio);<br />
if (irq < 0) {<br />
error = irq;<br />
dev_err(dev, "Unable to get irq number <strong>for</strong> GPIO %d, error %d\n",<br />
button->gpio, error);<br />
goto fail3;<br />
}<br />
error = request_irq(irq, gpio_keys_isr,<br />
IRQF_SHARED |<br />
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,<br />
desc, bdata);<br />
if (error) {<br />
dev_err(dev, "Unable to claim irq %d; error %d\n",<br />
irq, error);<br />
goto fail3;<br />
}<br />
return 0;<br />
49