diff mbox series

[3/6] serial: msm-geni: remove invalid se-clk clock name

Message ID 20230330194736.2400593-4-vladimir.zapolskiy@linaro.org
State Superseded
Headers show
Series serial: msm-geni: fix UART baudrate on modern platforms | expand

Commit Message

Vladimir Zapolskiy March 30, 2023, 7:47 p.m. UTC
There is only one clock supplier to the serial IP, thus getting it by
name is not needed, also note that "clock-names" property is not listed
under doc/device-tree-bindings/serial/msm-geni-serial.txt, and finally
"se-clk" clock name is invalid, if added, it shall get "se" value like
it's already described in Linux device tree documentation.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
---
 drivers/serial/serial_msm_geni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Konrad Dybcio March 31, 2023, 1:25 a.m. UTC | #1
On 30.03.2023 21:47, Vladimir Zapolskiy wrote:
> There is only one clock supplier to the serial IP, thus getting it by
> name is not needed, also note that "clock-names" property is not listed
> under doc/device-tree-bindings/serial/msm-geni-serial.txt, and finally
> "se-clk" clock name is invalid, if added, it shall get "se" value like
> it's already described in Linux device tree documentation.
> 
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> ---
OK this is even better than my approach of using "se", didn't know
we could just "get whatever's present".

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/serial/serial_msm_geni.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c
> index df61ae04df0a..1b12fdfbdafc 100644
> --- a/drivers/serial/serial_msm_geni.c
> +++ b/drivers/serial/serial_msm_geni.c
> @@ -183,7 +183,7 @@ static int geni_serial_set_clock_rate(struct udevice *dev, u64 rate)
>  	struct clk *clk;
>  	int ret;
>  
> -	clk = devm_clk_get(dev, "se-clk");
> +	clk = devm_clk_get(dev, NULL);
>  	if (!clk)
>  		return -EINVAL;
>
diff mbox series

Patch

diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c
index df61ae04df0a..1b12fdfbdafc 100644
--- a/drivers/serial/serial_msm_geni.c
+++ b/drivers/serial/serial_msm_geni.c
@@ -183,7 +183,7 @@  static int geni_serial_set_clock_rate(struct udevice *dev, u64 rate)
 	struct clk *clk;
 	int ret;
 
-	clk = devm_clk_get(dev, "se-clk");
+	clk = devm_clk_get(dev, NULL);
 	if (!clk)
 		return -EINVAL;