mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Martin Kurbanov <mmkurbanov@sberdevices.ru>
To: Mark Brown <broonie@kernel.org>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	<linux-spi@vger.kernel.org>, <linux-amlogic@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <kernel@sberdevices.ru>
Subject: Re: [PATCH v2 2/2] spi: amlogic-spifc-a1: add support for max_speed_hz
Date: Mon, 24 Jul 2023 18:15:14 +0300	[thread overview]
Message-ID: <45116f61-6ee7-919c-7c99-704a5b274df8@sberdevices.ru> (raw)
In-Reply-To: <c118f69d-db32-4544-83d5-14de089d5b51@sirena.org.uk>



On 20.07.2023 18:46, Mark Brown wrote:
> On Thu, Jul 20, 2023 at 06:41:11PM +0300, Martin Kurbanov wrote:
>> On 11.07.2023 10:25, Jerome Brunet wrote:
> 
>>>> +	ret = clk_set_rate(spifc->clk, freq);
>>>> +	if (ret)
>>>> +		return ret;
> 
>>>> +	spifc->curr_speed_hz = freq;
> 
>>> There is no guarantee that clk_set_rate() has set the rate you have
>>> requested, at least not precisely. You should call clk_get_rate() here.
> 
>> Are you referring to a situation where there is a change in the rate due
>> to a request from another client, such as a sibling driver with the same
>> parent clock?
> 
> The clock may simply not be able to generate exactly the rate you
> requested, the rate will be rounded to some value that the clock can
> actually generate.

Yes, I understand the situation. However, I am comparing it with the
requested frequency rather than the actual one that has been set.
Therefore, I asked Jerome for clarification regarding whether the
frequency can be changed by another client (driver). Maybe, it's better
to remove this condition at all? CCF has a cached rate value and doesn't
run 'set' operation if it's not needed.

-- 
Best Regards,
Martin Kurbanov

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2023-07-24 15:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 11:03 [PATCH v2 0/2] spi: amlogic-spifc-a1: fixes and improvements for amlogic-spifc-a1 Martin Kurbanov
2023-07-06 11:03 ` [PATCH v2 1/2] spi: amlogic-spifc-a1: implement adjust_op_size() Martin Kurbanov
2023-07-07  7:51   ` Neil Armstrong
2023-07-06 11:03 ` [PATCH v2 2/2] spi: amlogic-spifc-a1: add support for max_speed_hz Martin Kurbanov
2023-07-07  7:51   ` Neil Armstrong
2023-07-11  7:25   ` Jerome Brunet
2023-07-20 15:41     ` Martin Kurbanov
2023-07-20 15:46       ` Mark Brown
2023-07-24 15:15         ` Martin Kurbanov [this message]
2023-07-11 22:04 ` [PATCH v2 0/2] spi: amlogic-spifc-a1: fixes and improvements for amlogic-spifc-a1 Mark Brown

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=45116f61-6ee7-919c-7c99-704a5b274df8@sberdevices.ru \
    --to=mmkurbanov@sberdevices.ru \
    --cc=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=kernel@sberdevices.ru \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=neil.armstrong@linaro.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®