Re: [PATCH 2/2] spi: atcspi200: Add ATCSPI200 SPI driver
From: CL Wang
Date: Fri Nov 21 2025 - 04:38:07 EST
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