From: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: <konrad.dybcio@linaro.org>, <andersson@kernel.org>,
<linux-arm-msm@vger.kernel.org>, <dmaengine@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-i2c@vger.kernel.org>,
<conor+dt@kernel.org>, <agross@kernel.org>,
<devicetree@vger.kernel.org>, <vkoul@kernel.org>,
<linux@treblig.org>, <dan.carpenter@linaro.org>,
<Frank.Li@nxp.com>, <konradybcio@kernel.org>,
<quic_vdadhani@quicinc.com>
Subject: Re: [PATCH v2 4/4] i2c: i2c-qcom-geni: Enable i2c controller sharing between two subsystems
Date: Tue, 10 Sep 2024 19:12:34 +0530 [thread overview]
Message-ID: <6fbfe1b0-e99f-43cd-a099-389f65ab5b06@quicinc.com> (raw)
In-Reply-To: <pnt6pyeaqu3v3qk6hsccqfm5agtvzqjujs35roicovgv5xbsh5@gskuy5wefq6r>
Hi Andi, Sorry for late reply on this.
On 9/7/2024 1:26 PM, Andi Shyti wrote:
> Hi Mukesh,
>
> On Sat, Sep 07, 2024 at 12:44:38AM GMT, Mukesh Kumar Savaliya wrote:
>> Add support to share I2C SE by two Subsystems in a mutually exclusive way.
>> Use "qcom,shared-se" flag in a particular i2c instance node if the
>> usecase requires i2c controller to be shared.
>>
>> I2C driver just need to mark first_msg and last_msg flag to help indicate
>> GPI driver to take lock and unlock TRE there by protecting from concurrent
>> access from other EE or Subsystem.
>>
>> gpi_create_i2c_tre() function at gpi.c will take care of adding Lock and
>> Unlock TRE for the respective transfer operations.
>>
>> Since the GPIOs are also shared for the i2c bus between two SS, do not
>> touch GPIO configuration during runtime suspend and only turn off the
>> clocks. This will allow other SS to continue to transfer the data
>> without any disturbance over the IO lines.
>
> if I remember correctly, someone already commented on your
> patches to explain and expand the achronyms you are using. Please
> improve the commit log so that people who don't know this device
> can understand.
>
Sure, Andi. Noted and addressed over comment. Will add full form for the
acronyms.
> ...
>
>> @@ -631,8 +636,11 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
>> dma_async_issue_pending(gi2c->tx_c);
>>
>> time_left = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT);
>> - if (!time_left)
>> + if (!time_left) {
>> + dev_err(gi2c->se.dev, "I2C timeout gpi flags:%d addr:0x%x\n",
>> + gi2c->cur->flags, gi2c->cur->addr);
>
> Please, don't print out here. The user doesn't really need to
> know, let the upper levels decide what to do.
Sure, can remove this completely and user can handle , print it.
>
>> gi2c->err = -ETIMEDOUT;
>> + }
>>
>> if (gi2c->err) {
>> ret = gi2c->err;
>> @@ -800,6 +808,11 @@ static int geni_i2c_probe(struct platform_device *pdev)
>> gi2c->clk_freq_out = KHZ(100);
>> }
>>
>> + if (of_property_read_bool(pdev->dev.of_node, "qcom,shared-se")) {
>> + gi2c->is_shared = true;
>> + dev_dbg(&pdev->dev, "Shared SE Usecase\n");
>
> Please, improve this debug message.
>
"I2C is shared between subsystems" ?
> The rest looks good to me.
>
> Thanks,
> Andi
next prev parent reply other threads:[~2024-09-10 13:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 19:14 [PATCH v2 0/4] Enable shared SE support over I2C Mukesh Kumar Savaliya
2024-09-06 19:14 ` [PATCH v2 1/4] dt-bindindgs: i2c: qcom,i2c-geni: Document shared flag Mukesh Kumar Savaliya
2024-09-07 9:04 ` Krzysztof Kozlowski
2024-09-10 9:09 ` Mukesh Kumar Savaliya
2024-09-10 9:54 ` Krzysztof Kozlowski
2024-09-10 13:44 ` Mukesh Kumar Savaliya
2024-09-06 19:14 ` [PATCH v2 2/4] dma: gpi: Add Lock and Unlock TRE support to access SE exclusively Mukesh Kumar Savaliya
2024-09-06 19:14 ` [PATCH v2 3/4] soc: qcom: geni-se: Export function geni_se_clks_off() Mukesh Kumar Savaliya
2024-09-09 11:35 ` Konrad Dybcio
2024-09-10 9:11 ` Mukesh Kumar Savaliya
2024-09-06 19:14 ` [PATCH v2 4/4] i2c: i2c-qcom-geni: Enable i2c controller sharing between two subsystems Mukesh Kumar Savaliya
2024-09-07 7:56 ` Andi Shyti
2024-09-10 13:42 ` Mukesh Kumar Savaliya [this message]
2024-09-09 8:54 ` neil.armstrong
2024-09-09 9:18 ` Mukesh Kumar Savaliya
2024-09-09 11:37 ` Konrad Dybcio
2024-09-09 12:53 ` Andi Shyti
2024-09-10 13:39 ` Mukesh Kumar Savaliya
2024-09-10 9:12 ` Mukesh Kumar Savaliya
2024-09-09 13:04 ` neil.armstrong
2024-09-10 9:15 ` Mukesh Kumar Savaliya
2024-09-10 9:52 ` neil.armstrong
2024-09-18 12:20 ` Mukesh Kumar Savaliya
2024-09-10 9:12 ` Mukesh Kumar 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=6fbfe1b0-e99f-43cd-a099-389f65ab5b06@quicinc.com \
--to=quic_msavaliy@quicinc.com \
--cc=Frank.Li@nxp.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@treblig.org \
--cc=quic_vdadhani@quicinc.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