From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jebediah Huang Subject: Re: Using PXA arm board with MAX7319 GPIO expander input Date: Mon, 8 Feb 2010 19:08:06 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from mail-fx0-f211.google.com ([209.85.220.211]:55381 "EHLO mail-fx0-f211.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751221Ab0BHLII (ORCPT ); Mon, 8 Feb 2010 06:08:08 -0500 Received: by fxm3 with SMTP id 3so7447748fxm.39 for ; Mon, 08 Feb 2010 03:08:06 -0800 (PST) In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Eric Miao Cc: linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org On Mon, Feb 8, 2010 at 3:02 PM, Jebediah Huang 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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7f,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,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?