lkml.org 
[lkml]   [2020]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectR: [RESEND PATCH v7 1/2] phy: qualcomm: add qcom ipq806x dwc usb phy driver
Date


> -----Messaggio originale-----
> Da: Vinod Koul <vkoul@kernel.org>
> Inviato: lunedì 13 luglio 2020 07:33
> A: Ansuel Smith <ansuelsmth@gmail.com>
> Cc: Andy Gross <agross@codeaurora.org>; Jonathan McDowell
> <noodles@earth.li>; Andy Gross <agross@kernel.org>; Bjorn Andersson
> <bjorn.andersson@linaro.org>; Kishon Vijay Abraham I <kishon@ti.com>;
> Rob Herring <robh+dt@kernel.org>; Mark Rutland
> <mark.rutland@arm.com>; linux-arm-msm@vger.kernel.org; linux-
> kernel@vger.kernel.org; devicetree@vger.kernel.org
> 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.

\
 
 \ /
  Last update: 2020-07-13 15:12    [W:2.145 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site