[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <AC7E8CA1-3150-4DD6-8475-240CA49DBF93@gmail.com>
Date: Fri, 19 Jun 2020 11:56:34 +0200
From: Álvaro Fernández Rojas <noltari@...il.com>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: simon@...e.lp0.eu, Jonas Gorski <jonas.gorski@...il.com>,
kishon@...com, vkoul@...nel.org, robh+dt@...nel.org,
Florian Fainelli <f.fainelli@...il.com>,
bcm-kernel-feedback-list@...adcom.com, krzk@...nel.org,
gregkh@...uxfoundation.org, alcooperx@...il.com,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v4 2/2] phy: bcm63xx-usbh: Add BCM63xx USBH driver
Hi Zabel,
> El 19 jun 2020, a las 11:23, Philipp Zabel <p.zabel@...gutronix.de> escribió:
>
> Hi Álvaro,
>
> On Fri, 2020-06-19 at 10:51 +0200, Álvaro Fernández Rojas wrote:
>> Add BCM63xx USBH PHY driver for BMIPS.
>>
>> Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
>> ---
>> v4: several improvements:
>> - Use devm_platform_ioremap_resource.
>> - Code cleanups.
>> - Improve device mode config:
>> - Move USBH_SWAP_CONTROL device mode value to variant variable.
>> - Set USBH_UTMI_CONTROL1 register value (variant variable).
>> v3: introduce changes suggested by Florian:
>> - Add support for device mode.
>> v2: introduce changes suggested by Florian:
>> - Drop OF dependency (use device_get_match_data).
>> - Drop __initconst from variant tables.
>> - Use devm_clk_get_optional.
>>
>> drivers/phy/broadcom/Kconfig | 9 +
>> drivers/phy/broadcom/Makefile | 1 +
>> drivers/phy/broadcom/phy-bcm63xx-usbh.c | 457 ++++++++++++++++++++++++
>> 3 files changed, 467 insertions(+)
>> create mode 100644 drivers/phy/broadcom/phy-bcm63xx-usbh.c
>>
> [...]
>> diff --git a/drivers/phy/broadcom/phy-bcm63xx-usbh.c b/drivers/phy/broadcom/phy-bcm63xx-usbh.c
>> new file mode 100644
>> index 000000000000..79f913d86def
>> --- /dev/null
>> +++ b/drivers/phy/broadcom/phy-bcm63xx-usbh.c
> [...]
>> +static int __init bcm63xx_usbh_phy_probe(struct platform_device *pdev)
>> +{
>> + struct device *dev = &pdev->dev;
>> + struct bcm63xx_usbh_phy *usbh;
>> + const struct bcm63xx_usbh_phy_variant *variant;
>> + struct phy *phy;
>> + struct phy_provider *phy_provider;
>> +
>> + usbh = devm_kzalloc(dev, sizeof(*usbh), GFP_KERNEL);
>> + if (!usbh)
>> + return -ENOMEM;
>> +
>> + variant = device_get_match_data(dev);
>> + if (!variant)
>> + return -EINVAL;
>> + usbh->variant = variant;
>> +
>> + usbh->base = devm_platform_ioremap_resource(pdev, 0);
>> + if (IS_ERR(usbh->base))
>> + return PTR_ERR(usbh->base);
>> +
>> + usbh->reset = devm_reset_control_get(dev, NULL);
>
> Please use devm_reset_control_get_exclusive() instead.
Excuse me but I totally forgot about that :(
I will fix it in v5.
>
> regards
> Philipp
Best regards,
Álvaro.
Powered by blists - more mailing lists