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 15:02:14 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from fg-out-1718.google.com ([72.14.220.159]:17712 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119Ab0BHHCQ convert rfc822-to-8bit (ORCPT ); Mon, 8 Feb 2010 02:02:16 -0500 Received: by fg-out-1718.google.com with SMTP id 22so47570fge.1 for ; Sun, 07 Feb 2010 23:02:14 -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 2:02 PM, Eric Miao wrote= : > On Mon, Feb 8, 2010 at 1:44 PM, Jebediah Huang wrote: >> static struct i2c_board_info i2c_board_info[] =3D >> { >> =A0 =A0 =A0 =A0{ >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0.type =A0 =A0 =A0 =A0 =A0 =3D "max731= 9", >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0.addr =A0 =A0 =A0 =A0 =A0 =3D 0x6C, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0.irq =A0 =A0 =A0 =A0 =A0 =A0=3D IRQ_G= PIO(105), > > This doesn't look correct, if max7319 is ever able to interrupt the h= ost > CPU, this should be something other than SDA. Thank you. I remove irq now. It is not used. > > However, this isn't supposed to be the reason for the failure. The > failure looks like an I2C communication issue to me, which means: > > 1. the i2c host driver isn't setup correctly > 2. pin setup > 3. max7319 power supply and chip select > 4. i2c bus (incorrect pull-up/down etc) > 5. i2c device address > > I'd recommend an oscilloscope/LA for the I2C protocol on the lines > to identify the real issue. > I test hardware is ok. I test with this: { int fd, t; int i; char buf[512]; fd =3D open("/dev/i2c-0", O_RDWR); printf("fd=3D%d\n",fd); t =3D ioctl(fd, I2C_SLAVE, 0x6c); printf("t=3D%d\n",t); memset(buf,0,512); t =3D read(fd,buf,512); printf("t=3D%d\n",t); for(i=3D0;i