R: [RESEND PATCH v7 1/2] phy: qualcomm: add qcom ipq806x dwc usb phy driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Messaggio originale-----
> Da: Vinod Koul <vkoul@xxxxxxxxxx>
> Inviato: lunedì 13 luglio 2020 07:33
> A: Ansuel Smith <ansuelsmth@xxxxxxxxx>
> Cc: Andy Gross <agross@xxxxxxxxxxxxxx>; Jonathan McDowell
> <noodles@xxxxxxxx>; Andy Gross <agross@xxxxxxxxxx>; Bjorn Andersson
> <bjorn.andersson@xxxxxxxxxx>; Kishon Vijay Abraham I <kishon@xxxxxx>;
> Rob Herring <robh+dt@xxxxxxxxxx>; Mark Rutland
> <mark.rutland@xxxxxxx>; linux-arm-msm@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx
> Oggetto: Re: [RESEND PATCH v7 1/2] phy: qualcomm: add qcom ipq806x
> dwc usb phy driver
> 
> On 15-06-20, 22:53, Ansuel Smith wrote:
> 
> > @@ -0,0 +1,593 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +/* Copyright (c) 2014-2015, Code Aurora Forum. All rights reserved.
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 and
> > + * only version 2 as published by the Free Software Foundation.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> 
> You have SPDX tag, so we dont need the license text, please remove this.
> Also we are in 2020 now so Copyright looks incorrect
> 
> > +static int qcom_ipq806x_usb_ss_phy_init(struct phy *phy)
> > +{
> > +	struct usb_phy *phy_dwc3 = phy_get_drvdata(phy);
> > +	int ret;
> > +	u32 data = 0;
> 
> Superfluous init
> 
> > +static int qcom_ipq806x_usb_phy_probe(struct platform_device *pdev)
> > +{
> > +	struct usb_phy	*phy_dwc3;
> > +	struct phy_provider		*phy_provider;
> > +	struct phy			*generic_phy;
> > +	const struct of_device_id *match;
> > +	const struct phy_drvdata *data;
> > +	struct resource			*res;
> > +	resource_size_t			size;
> 
> Pls pick one, tabs or single spaces, not both. and reverse christmas
> looks better :)
> 
> > +	struct device_node *np;
> > +
> > +	phy_dwc3 = devm_kzalloc(&pdev->dev, sizeof(*phy_dwc3),
> GFP_KERNEL);
> > +	if (!phy_dwc3)
> > +		return -ENOMEM;
> > +
> > +	match = of_match_node(qcom_ipq806x_usb_phy_table, pdev-
> >dev.of_node);
> > +	data = match->data;
> 
> How about using of_device_get_match_data() instead?
> --
> ~Vinod

match is also used in the function to compare compatible. 





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux