From: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com>
To: Jyothi Kumar Seerapu <jyothi.seerapu@oss.qualcomm.com>,
Aniket Randive <aniket.randive@oss.qualcomm.com>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
Andi Shyti <andi.shyti@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH v1 2/3] i2c: qcom-geni: Add bus recovery support for FIFO mode
Date: Mon, 7 Sep 2026 11:40:20 +0530 [thread overview]
Message-ID: <c2bea75f-786b-4bf7-bc15-0509609663cc@oss.qualcomm.com> (raw)
In-Reply-To: <6c9f2a00-281f-4400-94b1-55034ca9d472@oss.qualcomm.com>
On 9/7/2026 11:35 AM, Mukesh Savaliya wrote:
>
>
> On 9/3/2026 9:47 PM, Jyothi Kumar Seerapu wrote:
>>
>>
>> On 8/26/2026 3:21 PM, Aniket Randive wrote:
>
> [...]
>
>>> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/
>>> i2c-qcom-geni.c
>>> index 658636c1ee0e..9fa1a8ac400c 100644
>>> --- a/drivers/i2c/busses/i2c-qcom-geni.c
>>> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
>>> @@ -138,6 +138,7 @@ struct geni_i2c_dev {
>>> u32 num_msgs;
>>> struct geni_i2c_gpi_multi_desc_xfer i2c_multi_desc_config;
>>> const struct geni_i2c_desc *dev_data;
>>> + struct i2c_bus_recovery_info rinfo;
> I could not find this structure being utilized in generic way for gpi
> mode. So is this specific to non gpi mode ?>> };
>>> struct geni_i2c_err_log {
>>> @@ -956,6 +957,90 @@ static int geni_i2c_fifo_xfer(struct
>>> geni_i2c_dev *gi2c,
>>> return num;
>>> }
>
> [...]
>
>>> +
>>> static int geni_i2c_xfer(struct i2c_adapter *adap,
>>> struct i2c_msg msgs[],
>>> int num)
>>> @@ -981,6 +1066,25 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
>>> else
>>> ret = geni_i2c_fifo_xfer(gi2c, msgs, num);
>>> + if (!gi2c->gpi_mode &&
>>> + (ret == -EPROTO || ret == -ETIMEDOUT || ret == -EAGAIN)) {
> Could not see similar call after gpi_xfer failure which invokes recovery
> mode. Thinking if design can be symmetrical here for both the modes.>>
> + /*
>>> + * Only attempt recovery if SDA is stuck low. -EPROTO and
>>> + * -ETIMEDOUT indicate bus errors where the target may be
>>> + * holding SDA low. ARB_LOST (-EAGAIN) on a single-controller
>>> + * bus indicates a stuck target, not a real arbitration loss.
>>> + * GPI DMA mode extends this trigger separately.
>>> + */
>
> [...]
>
>>> @@ -1188,6 +1292,11 @@ static int geni_i2c_probe(struct
>>> platform_device *pdev)
>>> if (ret < 0)
>>> return ret;
>
> one line Comment here how gpi mode handles ?
> I would suggest to keep geni_i2c_recover_bus() as common for both.
> Review how we can invoke this in generic way for any mode.
> else geni_i2c_recover_bus() should have _fifo.
>
Sorry, please ignore this comment, as i could see patch#3 is handling
same way.
>>> + if (!gi2c->gpi_mode) {
>>> + gi2c->rinfo.recover_bus = geni_i2c_recover_bus;
>>> + gi2c->adap.bus_recovery_info = &gi2c->rinfo;
>>> + }
>
>
>> In geni_i2c_xfer(), geni_i2c_recover_bus() is invoked directly, then
>> why do we need this ?> +
>>> ret = i2c_add_adapter(&gi2c->adap);
>>> if (ret)
>>> return dev_err_probe(dev, ret, "Error adding i2c adapter\n");
>>>
>>
>
next prev parent reply other threads:[~2026-09-07 6:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 9:51 [PATCH 0/3] i2c: qcom-geni: Add I2C bus recovery support Aniket Randive
2026-08-26 9:51 ` [PATCH v1 1/3] dmaengine: qcom: gpi: Add I2C bus recovery opcode support Aniket Randive
2026-09-07 5:14 ` Mukesh Savaliya
2026-08-26 9:51 ` [PATCH v1 2/3] i2c: qcom-geni: Add bus recovery support for FIFO mode Aniket Randive
2026-09-03 16:17 ` Jyothi Kumar Seerapu
2026-09-07 6:05 ` Mukesh Savaliya
2026-09-07 6:10 ` Mukesh Savaliya [this message]
2026-08-26 9:51 ` [PATCH v1 3/3] i2c: qcom-geni: Add bus recovery support for GPI DMA mode Aniket Randive
2026-09-03 16:14 ` Jyothi Kumar Seerapu
2026-09-07 6:46 ` Mukesh Savaliya
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=c2bea75f-786b-4bf7-bc15-0509609663cc@oss.qualcomm.com \
--to=mukesh.savaliya@oss.qualcomm.com \
--cc=Frank.Li@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=aniket.randive@oss.qualcomm.com \
--cc=dmaengine@vger.kernel.org \
--cc=jyothi.seerapu@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viken.dadhaniya@oss.qualcomm.com \
--cc=vkoul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®