On 03/23/11 19:45, Jon Brenner wrote: > Hello, > Can someone please explain the purpose / advantage of using: > 'iio_register_interrupt_line' vs. just using using 'request_irq'? > It appears that the iio_register_interrupt_line uses request_irq. The main difference is the fact that iio_register_interrupt_line wraps up a call to iio_allocate_interrupt. That function sets up the event list handling. The event lists are then used to keep track of which events are turned on. Hence it's pretty much a convenience wrapper to cut down on code repetition. Allows us to change the internal handling of that stuff without having to edit lots of drivers ;) That stuff really comes into it's own when you have events where you cannot identify them without querying multiple registers. It is probably overkill if all your events are of the shared handler variety. Avoiding the various convenience functions in general is fine with me, but beware the core code is going to change a fair bit as we try to move out of staging and this may well become harder to do. (see the channel registration code just as soon as I finish writing it!) > Can direct me to iio documentation that would present this.lin Err. The code? Not great I know, but that stuff is likely to change and any documentation is unlikely to be kept up to date. Sorry! > > Thanks! > Jon > > jbrenner@xxxxxxxxxxx > > -- > 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 > -- 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