[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bad44be8-abc7-169f-bc7a-cef3692c9a71@collabora.com>
Date: Tue, 26 Apr 2022 18:06:08 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Jianjun Wang <jianjun.wang@...iatek.com>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
Kishon Vijay Abraham I <kishon@...com>,
Vinod Koul <vkoul@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Chen-Yu Tsai <wenst@...omium.org>,
Krzysztof Kozlowski <krzk@...nel.org>
Cc: Wei-Shun Chang <weishunc@...gle.com>,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-phy@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
rex-bc.chen@...iatek.com, randy.wu@...iatek.com,
jieyy.yang@...iatek.com, chuanjia.liu@...iatek.com,
qizhong.cheng@...iatek.com, jian.yang@...iatek.com
Subject: Re: [PATCH v7 2/2] phy: mediatek: Add PCIe PHY driver
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@...iatek.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
Powered by blists - more mailing lists