I've i2c gpio expander (pca953x) IRQ attached to pin SYS_NIRQ/GPIO_0 (am3517). 
How can I declare this pin as GPIO and later as IRQ?

        if (!gpio)
                return -EINVAL;

        list_for_each_entry(e, muxmodes, node) {
                struct omap_mux *m = &e->mux;
                if (gpio == m->gpio) {
                        gpio_mux = m;
                        found++;
                }
        }

        if (found == 0) {
                pr_err("%s: Could not set gpio%i\n", __func__, gpio);
                return -ENODEV;
        }

        if (found > 1) {
                pr_info("%s: Multiple gpio paths (%d) for gpio%i\n", __func__,
                        found, gpio);
                return -EINVAL;
        }

with this semantic in arch/arm/mach-omap2/mux.c it is not possible and if I 
comment the first constraint I get "Multiple gpio paths" error, because found 
== 5.

Yegor
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to