Thread (16 messages) 16 messages, 6 authors, 2018-07-30

[PATCH v2 2/2] spi: add SPI controller driver for UniPhier SoC

From: Keiji Hayashibara <hidden>
Date: 2018-07-30 01:46:12
Also in: linux-devicetree, linux-spi, lkml

Hello Andy,
-----Original Message-----
From: linux-kernel-owner at vger.kernel.org [mailto:linux-kernel-owner at vger.kernel.org] On Behalf Of Andy
Shevchenko
Sent: Thursday, July 26, 2018 10:44 PM
To: Hayashibara, Keiji/?? ?? <redacted>
Cc: Mark Brown <broonie@kernel.org>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>;
Yamada, Masahiro/?? ?? [off-list ref]; linux-spi [off-list ref]; linux-arm
Mailing List [off-list ref]; devicetree [off-list ref]; Masami Hiramatsu
[off-list ref]; Jassi Brar [off-list ref]; Linux Kernel Mailing List
[off-list ref]; Hayashi, Kunihiko/? ?? [off-list ref]
Subject: Re: [PATCH v2 2/2] spi: add SPI controller driver for UniPhier SoC

On Thu, Jul 26, 2018 at 12:38 PM, Keiji Hayashibara [off-list ref] wrote:
quoted
quoted
quoted
+       /* check if requested speed is too small */
+       if (ckrat > SSI_MAX_CLK_DIVIDER)
quoted
+               return -EINVAL;
So, does this critical?
If set the value to SSI_MAX_CLK_DIVIDER, the clock frequency will be set high.
I don't change it to high frequency, and it is daringly an error.
On the other hand, when changing to low frequency, I will change it automatically.
No. My point is, if somehow user asks for that condition to be happened you bail out, while when using clamp_val()
you may continue to work at maximum limit, though issue warning to user, for example.
Thank you. I understood what you pointed out. 
However, I found this code unnecessary as pointed out by Radu, 
so I will delete it.
quoted
quoted
quoted
+
+       if (ckrat < SSI_MIN_CLK_DIVIDER)
+               ckrat = SSI_MIN_CLK_DIVIDER;
clamp_val()  / max() ?
I will modify it to use max().
See above.
This is also the same as above.
--
With Best Regards,
Andy Shevchenko
-----------------
Best Regards,
Keiji Hayashibara
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help