linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugeniu Rosca <erosca@de.adit-jv.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Eugeniu Rosca <erosca@de.adit-jv.com>,
	Andrew Gabbasov <andrew_gabbasov@mentor.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	<linux-renesas-soc@vger.kernel.org>, <linux-i2c@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Bhuvanesh Surachari <bhuvanesh_surachari@mentor.com>,
	Eugeniu Rosca <roscaeugeniu@gmail.com>
Subject: Re: [PATCH v2] i2c: rcar: add SMBus block read support
Date: Tue, 5 Apr 2022 11:30:48 +0200	[thread overview]
Message-ID: <20220405093048.GA7151@lxhi-065> (raw)
In-Reply-To: <YkcqoIMF2uw4FSZh@ninjato>

Hi Wolfram,

On Fri, Apr 01, 2022 at 06:38:56PM +0200, Wolfram Sang wrote:
> > BTW, thanks to Bhuvanesh, we've got another patch [*] which tries
> > to combine the best of both worlds:
> > 
> > * DMA support in the v1/v2 patches from Andrew/Bhuvanesh
> > * Simplicity of your proposal in https://lore.kernel.org/lkml/Yg6ls0zyTDe7LQbK@kunai/
> 
> This was nice to see. But where does it come from? I don't see it on
> this list and I also couldn't find it in the regular BSP?

The patch was worked on and tested collaboratively w/o submission.
The idea was to push it to LKML, once/after you are happy with it.

> > Unfortunately, this patch has a dependency to the rcar_i2c_is_pio()
> > in https://github.com/renesas-rcar/linux-bsp/commit/55d2d2fb8b0 
> > (which should be resolvable by extracting the function).
> 
> This patch is obsolete since March 2019. It has been properly fixed with
> 94e290b0e9a6 ("i2c: rcar: wait for data empty before starting DMA"). I
> am still trying to feed this information back.

Thanks for the precious feedback. We've requested Renesas to revert the
obsolete BSP commit, based on your recommendation.

In general, the Renesas kernel always carries a set of patches with
non-mainlined changes, Fortunately, for i2c specifically (as opposed
to other subsystems), it is narrow enough to not raise major concerns:

$ git log --oneline v5.10.41..rcar-5.1.2 -- drivers/i2c/busses/i2c-rcar.c
6745303b2bfa i2c: rcar: Add support for r8a77961 (R-Car M3-W+)
3422d3131700 i2c: rcar: Support the suspend/resume
5680e77f2427 i2c: rcar: Tidy up the register order for hardware specification ver1.00.
41394ab7420f i2c: rcar: Fix I2C DMA transmission by setting sequence

> 
> > Do you think we are on the right track with this new approach or do
> > you feel the implementation is still overly complicated?
> 
> The approach is much better but there are still things I don't like. The
> use of 'goto next_txn' is bad. I hope it could be done better with
> refactoring the code, so DMA will be tried at one place (with two
> conditions then). Not sure yet, I am still working on refactoring the
> one-byte transfer which is broken with my patch. What we surely can use
> from this patch is the -EPROTO handling because I have given up on
> converting the max read block size first. We can still remove it from
> this driver if that gets implemented somewhen.

Thank you for the review comments. We are still working on a cleaner
solution. In case it comes from you first, we are very much keen to
give it a try on the target and report the results.

Best regards,
Eugeniu

  reply	other threads:[~2022-04-05 10:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 16:06 [PATCH] i2c: rcar: add SMBus block read support Andrew Gabbasov
2021-10-05 13:31 ` Geert Uytterhoeven
2021-10-06 18:11   ` Andrew Gabbasov
2021-10-06 18:23     ` [PATCH v2] " Andrew Gabbasov
2022-02-17 19:44       ` Wolfram Sang
2022-02-18 11:02         ` Gabbasov, Andrew
2022-03-15 10:45           ` Surachari, Bhuvanesh
2022-03-30 11:04           ` Wolfram Sang
2022-04-01 16:27             ` Wolfram Sang
2022-04-01 16:29           ` Wolfram Sang
2022-03-23 21:52         ` Eugeniu Rosca
2022-03-30 10:58           ` Wolfram Sang
2022-03-30 11:09             ` Wolfram Sang
2022-03-31 16:02               ` Eugeniu Rosca
2022-04-01 16:38                 ` Wolfram Sang
2022-04-05  9:30                   ` Eugeniu Rosca [this message]
2022-04-05  9:43                     ` Wolfram Sang
2022-04-06 17:32                       ` Eugeniu Rosca
2022-04-06 19:44                         ` Wolfram Sang
2021-11-18 10:35   ` [PATCH] " Andrew Gabbasov
2022-01-09 19:20   ` Andrew Gabbasov
2022-01-25  6:45   ` Andrew Gabbasov
2022-02-17 14:40   ` Andrew Gabbasov

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=20220405093048.GA7151@lxhi-065 \
    --to=erosca@de.adit-jv.com \
    --cc=andrew_gabbasov@mentor.com \
    --cc=bhuvanesh_surachari@mentor.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=roscaeugeniu@gmail.com \
    --cc=wsa+renesas@sang-engineering.com \
    /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).