public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegor_sub1@visionsystems.de>
To: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Cc: "Mark A. Greer" <mgreer@animalcreek.com>,
	"Porter, Matt" <mporter@ti.com>
Subject: omap: omap_mux_init_gpio() for gpio_0
Date: Mon, 23 Jul 2012 16:00:22 +0200	[thread overview]
Message-ID: <500D58F6.40807@visionsystems.de> (raw)

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

                 reply	other threads:[~2012-07-23 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=500D58F6.40807@visionsystems.de \
    --to=yegor_sub1@visionsystems.de \
    --cc=linux-omap@vger.kernel.org \
    --cc=mgreer@animalcreek.com \
    --cc=mporter@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox