linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Michele De Candia
	<michele.decandia-EZxuzQJkuwwybS5Ee8rs3A@public.gmane.org>
Subject: Re: [PATCH] i2c/tsl2550: Use combined SMBus transactions
Date: Sun, 19 Jul 2009 11:52:20 +0200	[thread overview]
Message-ID: <20090719095220.GJ5323@enneenne.com> (raw)
In-Reply-To: <20090715222824.2250d26b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>

On Wed, Jul 15, 2009 at 10:28:24PM +0200, Jean Delvare wrote:
> Make the I/O faster, mainly by using combined SMBus transactions when
> possible. While the TSL2550 datasheet doesn't say the device supports
> them, they seem to work just fine in practice, and a combined
> transaction is faster than two simple transactions in many cases and
> always more reliable.
> 
> A side effect is to suppress the delays between SMBus writes and
> reads. The datasheet doesn't say they are needed and things work just
> fine for me without them.
> 
> I also couldn't see any reason for the delay between reading the two
> channels. Nor for the loop to get a reading in the first place. The
> 400 ms delay between samples only matters at chip power-up, after that
> the chip always hold the previously sampled value so we never get to
> wait.
> 
> All these changes make reading the lux value much faster and cheaper.
> 
> Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Cc: Michele De Candia <michele.decandia-EZxuzQJkuwwybS5Ee8rs3A@public.gmane.org>
> Cc: Rodolfo Giometti <giometti-k2GhghHVRtY@public.gmane.org>
> ---
> Michele, Rodolfo, can you please test and confirm the driver still
> works OK for you? Thanks.

I'm sorry but I cannot do it right now (and in the near future) since
my hardware is out of duty, but if Michele and you have tested this
new implementation then the modification it's ok for me! :)

Acked-by: Rodolfo Giometti <giometti-k2GhghHVRtY@public.gmane.org>

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org
Linux Device Driver                          giometti-k2GhghHVRtY@public.gmane.org
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

  parent reply	other threads:[~2009-07-19  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 20:28 [PATCH] i2c/tsl2550: Use combined SMBus transactions Jean Delvare
     [not found] ` <20090715222824.2250d26b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-07-19  9:52   ` Rodolfo Giometti [this message]
2009-08-05  9:47   ` R: " De Candia Michele

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090719095220.GJ5323@enneenne.com \
    --to=giometti-avvdyk/kqijwk0htik3j/w@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=michele.decandia-EZxuzQJkuwwybS5Ee8rs3A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).