linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Jebediah Huang <jebediah.huang@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org
Subject: Re: Using PXA arm board with MAX7319 GPIO expander input
Date: Mon, 8 Feb 2010 12:33:06 +0100	[thread overview]
Message-ID: <20100208113306.GN9007@buzzloop.caiaq.de> (raw)
In-Reply-To: <bf0eec9a1002080308v77c9c026j302767e41cd660f2@mail.gmail.com>

On Mon, Feb 08, 2010 at 07:08:06PM +0800, Jebediah Huang wrote:
> Is it correct that max732x driver will take i2c configuration from my
> setup info and make each max7319 input signel into a gpio?
> 
> Hardware work correctly because without max732x driver, above i2c-dev
> code can read max7319 input signel. Configuration is correct.
> 
> gpio_base is starting where max732x driver will add new gpio number
> for max7319 signel.

Yes, that should be right. After the driver is probed successfully, you
should be able to access the GPIOs with generic functions as described
in include/linux/gpio.h. Can you try if that works?

And if you can, you should really hook up an I2C analyzer to your bus
and see what is happening electrically and which messages pass the bus.

> static struct max732x_platform_data max7319_data[] = {
>        [0] = {
>                .gpio_base      =  NR_BUILTIN_GPIO,
>        },
> };
> 
> static struct i2c_board_info i2c_board_info[] =
> {
>        {
>                .type           = "max7319",
>                .addr           = 0x6C,
>                .irq            = IRQ_GPIO(125), <= this is my irq pin
> for max7319 INT_N

I just saw that there is indeed no support for irq line handling in this
driver. In order to use these lines as input for something like the
gpio_keys driver, support for that should be added. I never used this
driver and can't say whether it is under active development.

> Is my understanding wrong?

One thing you should also know is that once the kernel driver is active,
it blocks the address it is configured to, so you can't access the same
address via the userspace API. That might be confusing if you're not
aware of that.

Daniel

  reply	other threads:[~2010-02-08 11:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08  5:44 Using PXA arm board with MAX7319 GPIO expander input Jebediah Huang
2010-02-08  6:02 ` Eric Miao
2010-02-08  7:02   ` Jebediah Huang
2010-02-08  7:36     ` Daniel Mack
2010-02-08  7:56       ` Jebediah Huang
2010-02-08 11:08     ` Jebediah Huang
2010-02-08 11:33       ` Daniel Mack [this message]
2010-02-08 12:32         ` Marc Zyngier
2010-02-08 13:04           ` Daniel Mack
2010-02-09  1:05           ` Eric Miao
2010-02-09  7:39             ` Marc Zyngier
2010-02-09  8:19               ` Eric Miao
2010-02-09 10:22                 ` Marc Zyngier
2010-02-09  1:07 ` Eric Miao

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=20100208113306.GN9007@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=eric.y.miao@gmail.com \
    --cc=jebediah.huang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).