Re: i2c problem with twl4030

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In drivers/gpio/twl4030-gpio.c:

For initialization of twl4030 check out:

static int __init gpio_twl4030_init(void)

On Wed, Nov 12, 2008 at 7:57 AM, Sudipta GHOSH <sudipta.ghosh@xxxxxxxxx> wrote:
> Hi,
>
> I am having some problem with i2c.
>
> In my env I cant make i2c working.
>
> During boot, Twl4030 tries to send few i2c data, but it didnt going ok.
>
> static void twl_init_irq(void), issues many i2c write but fails with
> error -121 (EREMOTEIO).
>
> I tries to some twl4030 i2c read and write from video driver but also
> failes with same error.
>
> My env and my board is based on OMAP2.
>
> with some debugging I found dev->cmd_err is 2.
>

this is consistent (from
http://np.comp.lancs.ac.uk:8080/svn/linuxnpgum/drivers/i2c/busses/i2c-omap.c):

#define OMAP_I2C_STAT_NACK	(1 << 1)	/* No ack interrupt enable */

and since cmd_error IS 2 (==OMAP_I2C_STAT_NACK), the following is met:

inside i2c-omap.c:omap_i2c_xfer_msg():

	if (dev->cmd_err & OMAP_I2C_STAT_NACK) {
		if (msg->flags & I2C_M_IGNORE_NAK)
			return 0;
		if (stop) {
			w = omap_i2c_read_reg(dev, OMAP_I2C_CON_REG);
			w |= OMAP_I2C_CON_STP;
			omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, w);
		}
		return -EREMOTEIO;
	}

which gave rise to your EREMOTEIO error.

> any idea?
>
> is there any special initialization needed for twl4030?
>
> -SG
>
this look similar to your problem:

http://linux.omap.com/pipermail/davinci-linux-open-source/2007-January/002282.html



-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux