linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jebediah Huang <jebediah.huang@gmail.com>
To: Eric Miao <eric.y.miao@gmail.com>
Cc: 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 19:08:06 +0800	[thread overview]
Message-ID: <bf0eec9a1002080308v77c9c026j302767e41cd660f2@mail.gmail.com> (raw)
In-Reply-To: <bf0eec9a1002072302w1e81cc6bkd994c3efaab4d51d@mail.gmail.com>

On Mon, Feb 8, 2010 at 3:02 PM, Jebediah Huang <jebediah.huang@gmail.com> wrote:
>
> # ./i2ctest 2 button pressed
> fd=3
> t=0
> t=512
> 0x7f,0x80,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7
> f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x
> 0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x
> 7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0
> x0,0x7f,0x0,0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x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x
> 0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x
> 7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0
> x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0
> x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,0x7f,0x0,
>
> I think problem is my setup max732x failure.
>

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.

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
               .platform_data  = &max7319_data[0],
       },
};

static unsigned long peony_pin_config[] __initdata = {
       /* i2c bus */
       GPIO105_CI2C_SDA,
       GPIO106_CI2C_SCL,
} <= this correct because i2c-dev can work.

Is my understanding wrong?

  parent reply	other threads:[~2010-02-08 11:08 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 [this message]
2010-02-08 11:33       ` Daniel Mack
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=bf0eec9a1002080308v77c9c026j302767e41cd660f2@mail.gmail.com \
    --to=jebediah.huang@gmail.com \
    --cc=eric.y.miao@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).