[PATCH v7 2/2] phy: mediatek: Add PCIe PHY driver
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Tue Apr 26 09:06:08 PDT 2022
Il 22/04/22 16:23, Jianjun Wang ha scritto:
> Add PCIe GEN3 PHY driver support on MediaTek chipsets.
>
> Signed-off-by: Jianjun Wang <jianjun.wang at mediatek.com>
Hello Jianjun,
there's only one last bit to fix, check below:
> ---
> drivers/phy/mediatek/Kconfig | 11 ++
> drivers/phy/mediatek/Makefile | 1 +
> drivers/phy/mediatek/phy-mtk-pcie.c | 267 ++++++++++++++++++++++++++++
> 3 files changed, 279 insertions(+)
> create mode 100644 drivers/phy/mediatek/phy-mtk-pcie.c
>
..snip..
> +static int mtk_pcie_read_efuse(struct mtk_pcie_phy *pcie_phy)
> +{
> + struct device *dev = pcie_phy->dev;
> + bool nvmem_enabled;
> + int ret, i;
> +
> + /* nvmem data is optional */
> + nvmem_enabled = device_property_read_bool(dev, "nvmem-cells");
device_property_read_bool() returns device_property_present().
I would prefer that, instead, you call the latter:
nvmem_enabled = device_property_present(dev, "nvmem-cells");
It's the same, yes, but this will increase human readability, as the function
name clearly states the intention here.
Thanks,
Angelo
More information about the linux-phy
mailing list