linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Conor.Dooley@microchip.com>
To: <broonie@kernel.org>
Cc: <Nagasuresh.Relli@microchip.com>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <linux-spi@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] spi: microchip-core-qspi: Add support for microchip fpga qspi controllers
Date: Mon, 1 Aug 2022 12:56:26 +0000	[thread overview]
Message-ID: <3ec68df2-7843-abc9-c490-29cbbac80edc@microchip.com> (raw)
In-Reply-To: <YufIJ9JtTKaUjRqZ@sirena.org.uk>

On 01/08/2022 13:33, Mark Brown wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> On Mon, Aug 01, 2022 at 10:40:33AM +0000, Conor.Dooley@microchip.com wrote:
>> On 01/08/2022 10:42, Naga Sureshkumar Relli wrote:
>
>>> +	qspi = spi_controller_get_devdata(ctlr);
>
>> Is there a reason to use spi_controller_get_devdata() rather than
>> spi_master_get_devdata() ?
>
> We are trying to move everything away from the old terminonlogy to using
> controller, this also applies to the the other API functions.
>

Right, makes sense.

>>> +clk_dis_all:
>>> +	clk_disable_unprepare(qspi->clk);
>
>> If we move the clk prepare & enable later in probe, ie after
>> getting the irq, this goto could be removed too because the
>> only place requiring teardown of the clock would be the error
>> path of devm_spi_register_controller().
>
> Is the clock needed for handling of the interrupt?

I guess I was thinking in terms of the "hard" controller. In that case,
without a clock you're not going to get an interrupt in the first place
since it is not a shared line (nor a shared clock). But that is not the
case for the "soft" controller, so keeping the clk_prepare_enable()
prior to registering the interrupt is a good idea. Sorry for the noise
Suresh!

That did make me check the flags for devm_request_irq(), which needs to
be changed to support shared IRQs. The handler already checks to make
sure that it's its interrupt so we just need that small change in probe.

Thanks,
Conor

  reply	other threads:[~2022-08-01 12:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  9:42 [PATCH 0/2] Add support for Microchip QSPI controller Naga Sureshkumar Relli
2022-08-01  9:42 ` [PATCH 1/2] spi: dt-binding: add Microchip CoreQSPI compatible Naga Sureshkumar Relli
2022-08-01 10:17   ` Conor.Dooley
2022-08-01 10:52     ` naga sureshkumar
2022-08-02  8:52   ` Krzysztof Kozlowski
2022-08-02 13:13     ` Mark Brown
2022-08-03  6:11       ` Krzysztof Kozlowski
2022-08-03  6:59         ` naga sureshkumar
2022-08-03  7:48           ` Krzysztof Kozlowski
2022-08-03 13:29         ` Mark Brown
2022-08-04 11:31           ` Krzysztof Kozlowski
2022-08-04 11:35             ` Krzysztof Kozlowski
2022-08-04 12:13             ` Mark Brown
2022-08-01  9:42 ` [PATCH 2/2] spi: microchip-core-qspi: Add support for microchip fpga qspi controllers Naga Sureshkumar Relli
2022-08-01 10:40   ` Conor.Dooley
2022-08-01 11:09     ` naga sureshkumar
2022-08-01 12:33     ` Mark Brown
2022-08-01 12:56       ` Conor.Dooley [this message]
2022-08-02  8:54   ` Krzysztof Kozlowski

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=3ec68df2-7843-abc9-c490-29cbbac80edc@microchip.com \
    --to=conor.dooley@microchip.com \
    --cc=Nagasuresh.Relli@microchip.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=robh+dt@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).