* I2C_RDRW_IOCTL_MAX_MSGS
@ 2012-01-17 10:56 Srinivasan, Nageswari
[not found] ` <464859D4BE03A84686BA47749242C1D0317B66EC-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Srinivasan, Nageswari @ 2012-01-17 10:56 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi,
Is there any specific reason to limit no of i2c messages
to 42 in i2c-dev.c file
/* Put an arbitrary limit on the number of messages that can
* be sent at once */
if (rdwr_arg.nmsgs > I2C_RDRW_IOCTL_MAX_MSGS)
return -EINVAL;
Regards,
Nageswari
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I2C_RDRW_IOCTL_MAX_MSGS
[not found] ` <464859D4BE03A84686BA47749242C1D0317B66EC-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
@ 2012-01-17 13:09 ` Jean Delvare
[not found] ` <20120117140954.05dd30ef-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2012-01-17 13:09 UTC (permalink / raw)
To: Srinivasan, Nageswari; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Hi Nageswari,
On Tue, 17 Jan 2012 10:56:43 +0000, Srinivasan, Nageswari wrote:
> Is there any specific reason to limit no of i2c messages
> to 42 in i2c-dev.c file
>
> /* Put an arbitrary limit on the number of messages that can
> * be sent at once */
> if (rdwr_arg.nmsgs > I2C_RDRW_IOCTL_MAX_MSGS)
> return -EINVAL;
No, as the comment says there is no good reason, it's purely arbitrary.
If this limitation is a problem for you it can be raised.
But you should also keep in mind that pushing many messages at once
increases the I2C bus latency so other devices on the same bus might
become unresponsive.
As a matter of fact the limitation has been there for over 10 years and
nobody ever complained about it, so you must be doing something quite
unusual. I invite you to explain your case in details if you need
I2C_RDRW_IOCTL_MAX_MSGS to be increased.
--
Jean Delvare
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: I2C_RDRW_IOCTL_MAX_MSGS
[not found] ` <20120117140954.05dd30ef-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2012-01-17 14:49 ` Srinivasan, Nageswari
[not found] ` <464859D4BE03A84686BA47749242C1D0317B6E7A-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Srinivasan, Nageswari @ 2012-01-17 14:49 UTC (permalink / raw)
To: Jean Delvare; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Jean,
On Tue, Jan 17, 2012 at 18:39:54, Jean Delvare wrote:
> Hi Nageswari,
>
>
[...]
> No, as the comment says there is no good reason, it's purely arbitrary.
> If this limitation is a problem for you it can be raised.
>
> But you should also keep in mind that pushing many messages at once
> increases the I2C bus latency so other devices on the same bus might
> become unresponsive.
>
> As a matter of fact the limitation has been there for over 10 years and
> nobody ever complained about it, so you must be doing something quite
> unusual. I invite you to explain your case in details if you need
> I2C_RDRW_IOCTL_MAX_MSGS to be increased.
>
> --
We have a slave device which requires more than 500 registers
to be configured. (kind of bulk write) So, looking for an option
of configuring all of them in single command.
> Jean Delvare
>
Nageswari
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: I2C_RDRW_IOCTL_MAX_MSGS
[not found] ` <464859D4BE03A84686BA47749242C1D0317B6E7A-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
@ 2012-01-17 15:06 ` Jean Delvare
[not found] ` <20120117160655.0586cd2c-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2012-01-17 15:06 UTC (permalink / raw)
To: Srinivasan, Nageswari; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Tue, 17 Jan 2012 14:49:01 +0000, Srinivasan, Nageswari wrote:
> We have a slave device which requires more than 500 registers
> to be configured. (kind of bulk write) So, looking for an option
> of configuring all of them in single command.
How long will it take? You should ask yourself if it really OK to block
the bus for so long.
What happens if you configure the chip in several goes? The time
penalty shouldn't be that big and I can't believe a chip can't be
configured one register after the other (or at least group by group.)
If you really have to do it all in one go (and even if not) you should
check if the chip supports register address pointer autoincrement
(or block writes.) This would let you write several register values in
one message, so you no longer have to send 500 messages, plus this
would be faster than your current strategy.
--
Jean Delvare
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: I2C_RDRW_IOCTL_MAX_MSGS
[not found] ` <20120117160655.0586cd2c-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2012-01-17 15:12 ` Srinivasan, Nageswari
0 siblings, 0 replies; 5+ messages in thread
From: Srinivasan, Nageswari @ 2012-01-17 15:12 UTC (permalink / raw)
To: Jean Delvare; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Jean,
On Tue, Jan 17, 2012 at 20:36:55, Jean Delvare wrote:
> On Tue, 17 Jan 2012 14:49:01 +0000, Srinivasan, Nageswari wrote:
> > We have a slave device which requires more than 500 registers
> > to be configured. (kind of bulk write) So, looking for an option
> > of configuring all of them in single command.
>
> How long will it take? You should ask yourself if it really OK to block
> the bus for so long.
>
> What happens if you configure the chip in several goes? The time
> penalty shouldn't be that big and I can't believe a chip can't be
> configured one register after the other (or at least group by group.)
>
> If you really have to do it all in one go (and even if not) you should
> check if the chip supports register address pointer autoincrement
> (or block writes.) This would let you write several register values in
> one message, so you no longer have to send 500 messages, plus this
> would be faster than your current strategy.
>
Thanks. Will try these options.
> --
> Jean Delvare
>
Nageswari
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-17 15:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-17 10:56 I2C_RDRW_IOCTL_MAX_MSGS Srinivasan, Nageswari
[not found] ` <464859D4BE03A84686BA47749242C1D0317B66EC-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-01-17 13:09 ` I2C_RDRW_IOCTL_MAX_MSGS Jean Delvare
[not found] ` <20120117140954.05dd30ef-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-01-17 14:49 ` I2C_RDRW_IOCTL_MAX_MSGS Srinivasan, Nageswari
[not found] ` <464859D4BE03A84686BA47749242C1D0317B6E7A-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-01-17 15:06 ` I2C_RDRW_IOCTL_MAX_MSGS Jean Delvare
[not found] ` <20120117160655.0586cd2c-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-01-17 15:12 ` I2C_RDRW_IOCTL_MAX_MSGS Srinivasan, Nageswari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox