Hello, there are some PCI/PCIe cards based on Softlogic solo6010/6110 chips, chip provides hardware H.264 encoding, audio encoding and also some GPIO pins available for general use, they can be used with external hardware module for switching relays (output pins) and signalling about alarms (input pins). There is an existing driver solo6x10 in mainline Linux tree inside drivers/media/pci/solo6x10 that provides V4L2 and ALSA interfaces to userspace, I want to add GPIO interface support too, so GPIO pins can be controlled by userspace software through sysfs interface for gpio-s. 1) I don't understand clearly relation between gpio_chip and irq_chip structures. In my case, PCI device requests some IRQ line for signalling about things like completed encoding frame, finished DMA transfer from internal RAM to system memory, etc. And it can also signal about changed GPIO input. I.e. same single hardware interrput is used for all events that happen in solo chip. And I want userspace software to be able to use poll() on selected exported input GPIO pin (/sys/class/gpio/gpioN/value) What exactly do I need to configure in this case? > GPIO irqchips usually fall in one of two categories: >* CHAINED GPIO irqchips: these are usually the type that is embedded on > an SoC. This means that there is a fast IRQ flow handler for the GPIOs that > gets called in a chain from the parent IRQ handler, most typically the > system interrupt controller. Does it correspond to this case? Device is usually attached to x86 PC desktop/server. 2) Is it ok to add gpio code to existing module inside drivers/media/pci/solo6x10 or it is better to create new module placed in drivers/gpio/ Anton -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html