All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: i801: Improve status polling
Date: Mon, 14 Jun 2021 17:21:55 +0200	[thread overview]
Message-ID: <20210614172155.21b33a82@endymion> (raw)
In-Reply-To: <4147230b-e88f-52e8-1241-ad343f77628f@gmail.com>

Hi Heiner,

On Tue, 25 May 2021 21:59:05 +0200, Heiner Kallweit wrote:
> Polling uses the same timeout as irq mode: 400 * 500us = 200ms = HZ / 5.
> So let's use the adapter->timeout value also for polling. This has the
> advantage that userspace can control the timeout value for polling as
> well. In addition change the code to make it better readable.
> Last but not least remove the timeout debug messages. Calls to both
> functions are followed by a call to i801_check_post() that will print
> an error message in case of timeout.

I think that the intent was to differentiate between regular polling
and BYTE_DONE polling. But I agree it's not really important, as the
caller probably already knows which type of transaction failed (simple
or block).

> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/i2c/busses/i2c-i801.c | 36 +++++++++++++----------------------
>  1 file changed, 13 insertions(+), 23 deletions(-)
> (...)

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Jean Delvare <jdelvare@suse.de>

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2021-06-14 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 19:59 [PATCH] i2c: i801: Improve status polling Heiner Kallweit
2021-06-14 15:21 ` Jean Delvare [this message]
2021-06-20 20:53 ` Wolfram Sang

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=20210614172155.21b33a82@endymion \
    --to=jdelvare@suse.de \
    --cc=hkallweit1@gmail.com \
    --cc=linux-i2c@vger.kernel.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 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.