All of lore.kernel.org
 help / color / mirror / Atom feed
From: CL Wang <cl634@andestech.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: <broonie@kernel.org>, <linux-spi@vger.kernel.org>,
	<robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<tim609@andestech.com>, <cl634@andestech.com>
Subject: Re: [PATCH 2/2] spi: atcspi200: Add ATCSPI200 SPI driver
Date: Fri, 21 Nov 2025 17:36:32 +0800	[thread overview]
Message-ID: <aSAyoP3ohz73sd1U@swlinux02> (raw)
In-Reply-To: <73a39371-5bf0-4a3d-a48b-9e91668b779c@kernel.org>

Hi Krzysztof,

Thanks for your review, and please see my responses inline.
> > +     spi->clk_rate = clk_get_rate(spi->clk);
> > +     if (!spi->clk_rate)
> > +             return dev_err_probe(spi->dev, -EINVAL,
> > +                                  "Failed to get SPI clock rate\n");
> 
> You miss clock enable/prepare cleanup. In other places as well.
You are right — the error paths miss the corresponding
clk_disable_unprepare() cleanup. I will update the probe logic to ensure
the clock is properly disabled along all failure paths

> > +
> > +free_controller:
> > +     spi_controller_put(host);
> 
> Where is DMA channel release? Same for unbind path.
Thanks for pointing this out. To ensure proper cleanup in both the probe
error path and a potential future remove() implementation, I will switch to
devm_dma_request_chan(), so that DMA channels are automatically released
by the device core.

> > +static const struct of_device_id atcspi_of_match[] = {
> > +     { .compatible = "andestech,qilai-spi", },
> > +     { .compatible = "andestech,atcspi200", },
Understood. I will fix the compatible strings and ensure all of them are
properly documented in the binding.

Thanks again for your review and suggestions.

Best regards,
CL


      reply	other threads:[~2025-11-21  9:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12  3:47 [PATCH 0/2] spi: atcspi200: Add support for Andes ATCSPI200 SPI controller CL Wang
2025-11-12  3:47 ` [PATCH 1/2] dt-bindings: spi: Add support for " CL Wang
2025-11-12 19:02   ` Conor Dooley
2025-11-14  9:46     ` CL Wang
2025-11-12  3:47 ` [PATCH 2/2] spi: atcspi200: Add ATCSPI200 SPI driver CL Wang
2025-11-14 11:58   ` Krzysztof Kozlowski
2025-11-21  9:36     ` CL Wang [this message]

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=aSAyoP3ohz73sd1U@swlinux02 \
    --to=cl634@andestech.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tim609@andestech.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.