On Thu, 30 Apr 2015 16:27:49 +0200 Bastien Nocera <hadess@xxxxxxxxxx> wrote: > On Thu, 2015-04-30 at 16:25 +0200, Antonio Ospite wrote: > > It was mainly to prevent error messages being printed in the logs > > when > > trying to getting a gpio descriptor, is that correct Bastien? > > Actually, to prevent it failing to init the driver altogether. Then I am afraid I am failing to follow the code (4.1-rc1), from what I read: - is_smo8500_device is only used in kxcjk1013_gpio_probe() to make it return -ENOTSUPP; i.e. client->irq = -ENOTSUPP; - when client->irq < 0 (even after kxcjk1013_gpio_probe), the driver does not request an interrupt and does not set up triggers but it can still finish initialization. So it looks to me that is_smo8500_device just prevents devm_gpiod_get_index() from being called, but even if it was called it (or gpiod_to_irq) should return an error. Mmh, maybe the problem is "just" in checking the return value of devm_gpiod_get_index() in kxcjk1013_gpio_probe(), maybe it's NULL in your case and that was causing your original problem; BTW if it is NULL then desc_to_gpio() in the debug print will Oops after commit b457f5. I'll double check and get back to you. Ciao, Antonio -- Antonio Ospite http://ao2.it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing? -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html