[PATCH v7 2/2] phy: mediatek: Add PCIe PHY driver

Jianjun Wang jianjun.wang at mediatek.com
Thu May 5 05:11:58 PDT 2022


Hi Angelo,

On Tue, 2022-04-26 at 18:06 +0200, AngeloGioacchino Del Regno wrote:
> 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 for your review and sorry for the late response, I'll replace it
with 'device_property_present' in the next version.

Thanks.

> 
> Thanks,
> Angelo
> 


More information about the Linux-mediatek mailing list