public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* omap: omap_mux_init_gpio() for gpio_0
@ 2012-07-23 14:00 Yegor Yefremov
  0 siblings, 0 replies; only message in thread
From: Yegor Yefremov @ 2012-07-23 14:00 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org; +Cc: Mark A. Greer, Porter, Matt

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-23 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-23 14:00 omap: omap_mux_init_gpio() for gpio_0 Yegor Yefremov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox