From: Vinod Koul <vkoul@kernel.org>
To: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Cc: konrad.dybcio@linaro.org, andersson@kernel.org,
andi.shyti@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, linux@treblig.org,
dan.carpenter@linaro.org, Frank.Li@nxp.com,
konradybcio@kernel.org, bryan.odonoghue@linaro.org,
krzk+dt@kernel.org, robh@kernel.org, quic_vdadhani@quicinc.com
Subject: Re: [PATCH v5 2/4] dmaengine: gpi: Add Lock and Unlock TRE support to access I2C exclusively
Date: Mon, 2 Dec 2024 12:17:32 +0530 [thread overview]
Message-ID: <Z01YBLcxDXI2UwXR@vaman> (raw)
In-Reply-To: <20241129144357.2008465-3-quic_msavaliy@quicinc.com>
On 29-11-24, 20:13, Mukesh Kumar Savaliya wrote:
> GSI DMA provides specific TREs(Transfer ring element) namely Lock and
> Unlock TRE. It provides mutually exclusive access to I2C controller from
> any of the processor(Apps,ADSP). Lock prevents other subsystems from
> concurrently performing DMA transfers and avoids disturbance to data path.
> Basically for shared I2C usecase, lock the SE(Serial Engine) for one of
> the processor, complete the transfer, unlock the SE.
>
> Apply Lock TRE for the first transfer of shared SE and Apply Unlock
> TRE for the last transfer.
>
> Also change MAX_TRE macro to 5 from 3 because of the two additional TREs.
>
...
> @@ -65,6 +65,9 @@ enum i2c_op {
> * @rx_len: receive length for buffer
> * @op: i2c cmd
> * @muli-msg: is part of multi i2c r-w msgs
> + * @shared_se: bus is shared between subsystems
> + * @bool first_msg: use it for tracking multimessage xfer
> + * @bool last_msg: use it for tracking multimessage xfer
> */
> struct gpi_i2c_config {
> u8 set_config;
> @@ -78,6 +81,9 @@ struct gpi_i2c_config {
> u32 rx_len;
> enum i2c_op op;
> bool multi_msg;
> + bool shared_se;
Looking at this why do you need this field? It can be internal to your
i2c driver... Why not just set an enum for lock and use the values as
lock/unlock/dont care and make the interface simpler. I see no reason to
use three variables to communicate the info which can be handled in
simpler way..?
> + bool first_msg;
> + bool last_msg;
--
~Vinod
next prev parent reply other threads:[~2024-12-02 6:47 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 14:43 [PATCH v5 0/4] Enable shared SE support over I2C Mukesh Kumar Savaliya
2024-11-29 14:43 ` [PATCH v5 1/4] dt-bindindgs: i2c: qcom,i2c-geni: Document shared flag Mukesh Kumar Savaliya
2024-11-29 15:14 ` Krzysztof Kozlowski
2024-12-02 4:00 ` Mukesh Kumar Savaliya
2024-12-02 7:19 ` Krzysztof Kozlowski
2024-12-02 10:38 ` Mukesh Kumar Savaliya
2024-12-02 11:04 ` Krzysztof Kozlowski
2024-12-02 11:13 ` Krzysztof Kozlowski
2024-12-09 15:07 ` Mukesh Kumar Savaliya
2024-12-02 12:55 ` Mukesh Kumar Savaliya
2024-12-02 14:04 ` Konrad Dybcio
2024-12-09 15:01 ` Mukesh Kumar Savaliya
2024-12-10 7:28 ` Krzysztof Kozlowski
2024-12-10 9:09 ` Konrad Dybcio
2024-12-10 11:53 ` Krzysztof Kozlowski
2024-12-10 12:05 ` Krzysztof Kozlowski
2024-12-10 12:38 ` Konrad Dybcio
2024-12-10 15:17 ` Mukesh Kumar Savaliya
2024-12-10 15:24 ` Konrad Dybcio
2024-12-10 15:56 ` Krzysztof Kozlowski
2024-12-10 17:52 ` Bjorn Andersson
2024-11-30 4:45 ` Bjorn Andersson
2024-12-02 10:38 ` Mukesh Kumar Savaliya
2024-12-03 15:43 ` Bjorn Andersson
2024-11-29 14:43 ` [PATCH v5 2/4] dmaengine: gpi: Add Lock and Unlock TRE support to access I2C exclusively Mukesh Kumar Savaliya
2024-12-02 6:47 ` Vinod Koul [this message]
2024-12-02 10:43 ` Mukesh Kumar Savaliya
2024-12-04 12:21 ` Vinod Koul
2024-12-18 12:34 ` Mukesh Kumar Savaliya
2024-12-24 9:58 ` Vinod Koul
2024-12-26 12:22 ` Mukesh Kumar Savaliya
2025-01-14 9:18 ` Mukesh Kumar Savaliya
2024-11-29 14:43 ` [PATCH v5 3/4] soc: qcom: geni-se: Do not keep GPIOs to sleep state for shared SE usecase Mukesh Kumar Savaliya
2024-11-29 14:43 ` [PATCH v5 4/4] i2c: i2c-qcom-geni: Enable i2c controller sharing between two subsystems Mukesh Kumar Savaliya
2024-12-13 13:05 ` Konrad Dybcio
2024-12-15 8:59 ` Mukesh Kumar Savaliya
2024-12-16 12:10 ` Konrad Dybcio
2024-12-16 12:47 ` 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=Z01YBLcxDXI2UwXR@vaman \
--to=vkoul@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=bryan.odonoghue@linaro.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=krzk+dt@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_msavaliy@quicinc.com \
--cc=quic_vdadhani@quicinc.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).