Thats good idea, I will keep that in mind before sending next version with common phy driver for USB/PCIE/UFS.> + writel_relaxed(0x0f, base + QSERDES_COM_BG_TRIM);I'd make an array with register/value pair and write the registers with
> + writel_relaxed(0x0f, base + QSERDES_COM_PLL_IVCO);
> + writel_relaxed(0x19, base + QSERDES_COM_CLK_EP_DIV);
> + writel_relaxed(0x10, base + QSERDES_COM_CLK_ENABLE1);
> + writel_relaxed(0x00, base + QSERDES_COM_HSCLK_SEL);
> + writel_relaxed(0x40, base + QSERDES_COM_RESCODE_DIV_NUM);
> + writel_relaxed(0x00, base + PCIE_COM_SW_RESET);
> + writel_relaxed(0x03, base + PCIE_COM_START_CONTROL);
a for () loop. IMO it will be more readable.
Probably 3 arrays - power_on, power_on_common and power_off.