From: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
To: Mark Brown <broonie@kernel.org>
Cc: <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<andersson@kernel.org>, <konradybcio@kernel.org>
Subject: Re: [PATCH V1] spi: Add support for Double Transfer Rate (DTR) mode
Date: Thu, 27 Mar 2025 15:33:15 +0530 [thread overview]
Message-ID: <8435b037-8b54-401a-b4f6-b4b497c4c3eb@quicinc.com> (raw)
In-Reply-To: <3aa2c190-ce4d-4805-943b-f65e98ce762c@sirena.org.uk>
Thanks Mark !
On 3/26/2025 8:12 PM, Mark Brown wrote:
> On Wed, Mar 26, 2025 at 07:55:05PM +0530, Mukesh Kumar Savaliya wrote:
>> On 3/26/2025 6:34 PM, Mark Brown wrote:
>
>>> We should have a flag in the controller indicating if it supports this,
>>> and code in the core which returns an error if a driver attempts to use
>>> it when the controller doesn't support it.
>
>> Have added below in spi.h which can be set by client and controller driver
>> should be using it to decide mode.
>
>> + bool dtr_mode;
>
>> since default it's false, should continue with SDR.
>> I believe for QSPI, it supports SDR or DDR, but it's not applicable to
>> standard SPI right ? So not sure in which case we should return an error ?
>
> Standard SPI is the main thing I'm thinking of here, or possibly some
> limited QSPI controller that doesn't support DTR. It's not something
> that should actually come up really, it's more error handling if things
> aren't set up properly.
IIUC, It comes to the point of first identifying if it's in context of
QSPI controller or SPI controller right ?
Identify if SPI/QSPI controller has this capability using dtr_caps =
true/false. Then check if it's supporting SDR/DDR mode. Can we then
introduce below struct to first mark capability as true/false and then
process dtr_mode ?
if not supported (dtr_caps = false), then don't care dtr_mode.
struct spi_caps {
bool dtr_mode;
bool dtr_caps;
};
OR we can have an API spi_controller_dtr_caps() which returns this flag
set by individual SPI/QSPI controller. We can use above struct OR
separate struct spi_controller_dtr_caps { bool dtr_caps };.
Please confirm if i am correct OR suggest more. Else you may approve one
of the above option. (Sorry if i am missing anything ).
next prev parent reply other threads:[~2025-03-27 10:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 8:39 Mukesh Kumar Savaliya
2025-03-26 9:21 ` Jyothi Kumar Seerapu
2025-03-26 12:55 ` Konrad Dybcio
2025-03-26 13:04 ` Mark Brown
2025-03-26 14:25 ` Mukesh Kumar Savaliya
2025-03-26 14:42 ` Mark Brown
2025-03-27 10:03 ` Mukesh Kumar Savaliya [this message]
2025-03-27 14:07 ` Mark Brown
2025-04-04 13:53 ` Mukesh Kumar Savaliya
2025-03-26 14:48 ` Tudor Ambarus
2025-03-27 10:10 ` 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=8435b037-8b54-401a-b4f6-b4b497c4c3eb@quicinc.com \
--to=quic_msavaliy@quicinc.com \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.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®