[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e040fcf5-df6e-4d6d-be98-284362c35462@baylibre.com>
Date: Wed, 2 Jul 2025 07:37:56 -0500
From: David Lechner <dlechner@...libre.com>
To: Nuno Sá <noname.nuno@...il.com>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Mark Brown <broonie@...nel.org>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-spi@...r.kernel.org
Subject: Re: [PATCH v3 10/12] spi: offload trigger: add ADI Util Sigma-Delta
SPI driver
On 7/2/25 2:57 AM, Nuno Sá wrote:
> On Tue, 2025-07-01 at 16:37 -0500, David Lechner wrote:
>> Add a new driver for the ADI Util Sigma-Delta SPI FPGA IP core.
>>
>> This is used to trigger a SPI offload based on a RDY signal from an ADC
>> while masking out other signals on the same line.
>>
>> Signed-off-by: David Lechner <dlechner@...libre.com>
>> ---
---
>> +static int adi_util_sigma_delta_probe(struct platform_device *pdev)
>> +{
>> + struct device *dev = &pdev->dev;
>> + struct spi_offload_trigger_info info = {
>> + .fwnode = dev_fwnode(dev),
>> + .ops = &adi_util_sigma_delta_ops,
>> + };
>> + struct clk *clk;
>> +
>> + clk = devm_clk_get_enabled(dev, NULL);
>> + if (IS_ERR(clk))
>> + return dev_err_probe(dev, PTR_ERR(clk), "Failed to get
>> clock\n");
>> +
>
> Small nit. Did you consider enabling/disabling the clock on the trigger
> enable()/disable() callback? I guess the ref clk will be enabled anyways by
> someone else but conceptually kind of makes sense to enable the resource only
> when needed.
>
> Not a big deal (at least to me).
>
> - Nuno Sá
>
I thought about it, but we don't do that for any other FPGA IP cores
so I didn't do it here either.
Since they all use the same AXI clock anyway, disabling the clock
here probably doesn't have any effect in practice since there will
always be other users of the same clock keeping it enabled.
Powered by blists - more mailing lists