From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: linux-i2c@vger.kernel.org
Cc: Andi Shyti <andi.shyti@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Jan Dabros <jsd@semihalf.com>,
Jiawen Wu <jiawenwu@trustnetic.com>,
Sanket Goswami <Sanket.Goswami@amd.com>,
Basavaraj Natikar <Basavaraj.Natikar@amd.com>,
Michael J <michael.j.ruhl@intel.com>
Subject: Re: [PATCH 5/5] i2c: designware: Implement generic polling mode code for Wangxun 10Gb NIC
Date: Thu, 1 Feb 2024 15:21:55 +0200 [thread overview]
Message-ID: <e5ed3eeb-8301-4498-9ec5-e1eb624f176a@linux.intel.com> (raw)
In-Reply-To: <20240131141653.2689260-7-jarkko.nikula@linux.intel.com>
On 1/31/24 16:16, Jarkko Nikula wrote:
> I got an idea the i2c-designware should not need duplicated state
> machines for the interrupt and polling modes. The IP is practically the
> same and state transitions happens in response to the events that can be
> observed from the DW_IC_RAW_INTR_STAT register. Either by interrupts or
> by polling.
>
> Another reasons are the interrupt mode is the most tested, has handling
> for many exceptions as well as transmit abort handling and those are
> missing from two polling mode quirks.
>
> Patch implements generic polling mode code which shares the same code
> with interrupt mode code. This is done by moving event handling from the
> i2c_dw_isr() into a new i2c_dw_process_transfer() that will be called
> both from the i2c_dw_isr() and polling loop.
>
> Polling loop is implemented in a new i2c_dw_wait_transfer() that is
> shared between both modes. In interrupt mode it waits for the completion
> object as before. In polling mode both completion object and
> DW_IC_RAW_INTR_STAT are polled.
>
> I decided to convert the txgbe_i2c_dw_xfer_quirk() straight to generic
> polling mode code in this patch. It doesn't have HW dependent quirks
> like the amd_i2c_dw_xfer_quirk() does have and without users this patch
> is needless.
>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> drivers/i2c/busses/i2c-designware-core.h | 5 +
> drivers/i2c/busses/i2c-designware-master.c | 169 +++++++++------------
> 2 files changed, 77 insertions(+), 97 deletions(-)
>
Please discard this 5/5 which was accidental left over file in the same
directory with the patches 0-6/6.
next prev parent reply other threads:[~2024-02-01 13:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 14:16 [PATCH 0/6] i2c: designware: Generic polling mode code Jarkko Nikula
2024-01-31 14:16 ` [PATCH 1/6] i2c: designware: Uniform initialization flow for polling mode Jarkko Nikula
2024-02-01 11:57 ` Andy Shevchenko
2024-02-05 0:03 ` Andi Shyti
2024-01-31 14:16 ` [PATCH 2/6] i2c: designware: Do not enable interrupts shortly in " Jarkko Nikula
2024-01-31 14:16 ` [PATCH 3/6] i2c: designware: Use accessors to DW_IC_INTR_MASK register Jarkko Nikula
2024-01-31 14:16 ` [PATCH 4/6] i2c: designware: Move interrupt handling functions before i2c_dw_xfer() Jarkko Nikula
2024-01-31 14:16 ` [PATCH 5/6] i2c: designware: Fix RX FIFO depth define on Wangxun 10Gb NIC Jarkko Nikula
2024-02-01 11:59 ` Andy Shevchenko
2024-02-01 13:19 ` Jarkko Nikula
2024-01-31 14:16 ` [PATCH 5/5] i2c: designware: Implement generic polling mode code for " Jarkko Nikula
2024-02-01 12:06 ` Andy Shevchenko
2024-02-01 13:21 ` Jarkko Nikula [this message]
2024-01-31 14:16 ` [PATCH 6/6] " Jarkko Nikula
2024-02-01 12:08 ` [PATCH 0/6] i2c: designware: Generic polling mode code Andy Shevchenko
2024-02-01 13:18 ` Jarkko Nikula
2024-02-04 3:20 ` Jiawen Wu
2024-02-05 7:30 ` Jarkko Nikula
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=e5ed3eeb-8301-4498-9ec5-e1eb624f176a@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=Basavaraj.Natikar@amd.com \
--cc=Sanket.Goswami@amd.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jiawenwu@trustnetic.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=michael.j.ruhl@intel.com \
--cc=mika.westerberg@linux.intel.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 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.