lkml.org 
[lkml]   [2021]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 09/11] PCI: dwc: pcie-kirin: allow using multiple reset GPIOs

Hi Mauro,

Thank you for working on this!

> @@ -151,8 +152,10 @@ struct kirin_pcie {
> struct clk *phy_ref_clk;
> struct clk *pcie_aclk;
> struct clk *pcie_aux_clk;
> - int gpio_id_reset[4];
> + int n_gpio_resets;
> int gpio_id_clkreq[3];
> + int gpio_id_reset[MAX_GPIO_RESETS];
> + const char *reset_names[MAX_GPIO_RESETS];
> u32 eye_param[5];
> };
[...]

A small nit, so feel free to ignore, of course.

The "n_gpio_resets" variable might be better as "gpio_resets_num" or
"gpio_resets_count" - both are popular name suffixes for that type of
variables. To add, other variables also start with "gpio_", thus it
would also follow the naming pattern.

[...]
> + kirin_pcie->n_gpio_resets = of_gpio_named_count(np, "reset-gpios");
[...]

This would then become (for example):

kirin_pcie->gpio_resets_count = of_gpio_named_count(np, "reset-gpios");

Krzysztof

\
 
 \ /
  Last update: 2021-02-03 16:22    [W:0.129 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site