All of lore.kernel.org
 help / color / mirror / Atom feed
* mpc-i2c.c in 2.6
@ 2005-01-13 21:24 Kumar Gala
  2005-01-13 21:33 ` Mark A. Greer
  2005-01-14 18:06 ` Adrian Cox
  0 siblings, 2 replies; 3+ messages in thread
From: Kumar Gala @ 2005-01-13 21:24 UTC (permalink / raw)
  To: Adrian Cox; +Cc: Scott Hall, Embedded PPC Linux list

Adrian,

I was wondering if you had any opinions on the timeout between 
transactions in drivers/i2c/busses/mpc-i2c.  Looking at it, we 
currently set the timeout between transactions to 1 second (HZ).  Any 
reason its this high?

on 85xx, I'm able to set it to HZ/100 w/o any really issue.

thanks

- kumar

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mpc-i2c.c in 2.6
  2005-01-13 21:24 mpc-i2c.c in 2.6 Kumar Gala
@ 2005-01-13 21:33 ` Mark A. Greer
  2005-01-14 18:06 ` Adrian Cox
  1 sibling, 0 replies; 3+ messages in thread
From: Mark A. Greer @ 2005-01-13 21:33 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Scott Hall, Embedded PPC Linux list

Kumar Gala wrote:

> Adrian,
>
> I was wondering if you had any opinions on the timeout between 
> transactions in drivers/i2c/busses/mpc-i2c.  Looking at it, we 
> currently set the timeout between transactions to 1 second (HZ).  Any 
> reason its this high?
>
> on 85xx, I'm able to set it to HZ/100 w/o any really issue.


This is just an FYI since I've been in this code recently.  You can 
change the timeout from userspace with an ioctl.  Something like this 
should do it:

static char *usage_msg = "Usage: set_timeout <timeout value>\n";

int main(int argc, char **argv)
{
        uint    timeout;
        int     file;

        if (argc != 2) {
                fprintf(stderr, usage_msg);
                return 1;
        }

        timeout = strtoul(argv[1], NULL, 0);

        if ((file = open("/dev/i2c/0", O_RDWR)) < 0) {
                printf("Can't open device, errno: %d (%s)\n",
                        errno, strerror(errno));
                return 1;
        }

        if (ioctl(file, I2C_TIMEOUT, &timeout) < 0) {
                printf("Can't do TIMEOUT: %s\n", strerror(errno));
                return 1;
        }

        return 0;
}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mpc-i2c.c in 2.6
  2005-01-13 21:24 mpc-i2c.c in 2.6 Kumar Gala
  2005-01-13 21:33 ` Mark A. Greer
@ 2005-01-14 18:06 ` Adrian Cox
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Cox @ 2005-01-14 18:06 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Scott Hall, Embedded PPC Linux list

On Thu, 2005-01-13 at 15:24 -0600, Kumar Gala wrote:
> I was wondering if you had any opinions on the timeout between 
> transactions in drivers/i2c/busses/mpc-i2c.  Looking at it, we 
> currently set the timeout between transactions to 1 second (HZ).  Any 
> reason its this high?

It only exists because when I started the driver I hadn't spotted the
timeout field in i2c_adapter. Your patch is fine.


-- 
Adrian Cox <adrian@humboldt.co.uk>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-14 18:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-13 21:24 mpc-i2c.c in 2.6 Kumar Gala
2005-01-13 21:33 ` Mark A. Greer
2005-01-14 18:06 ` Adrian Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.