Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp327106ybt; Fri, 19 Jun 2020 02:59:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE+AI/1IqBxw/lnNAsx3hBm9GDlaMzsFaCJXCZNDLzmNvdQX1xmtkutyrHUgsca/HKWfMj X-Received: by 2002:a17:906:851:: with SMTP id f17mr2717224ejd.396.1592560782237; Fri, 19 Jun 2020 02:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592560782; cv=none; d=google.com; s=arc-20160816; b=x6Dr6+zu5hUHBgCxmAmr+jGcwQA2GES1qZVDOB28wd/+0Qj3W3rty9c/1sW+AamdfT 2YjKRUOJr7fP30PYIkVtyl3RxlVIphAV8o8d1ChZb2tlx8y0DPsdToo7c4q1dB+KJS7u NfXSWnInTr3r11tUURFZ2qmC8GYrrSW6BGh5Rlx2uv7ZtlrgE5ZOqyHNKAEKskF9EMSS mPhxwxe1euH3n8oS9ajhZ9qx8Irc4zGQ12+pEZsUvzvXK0FTKnsAzJj2Lst+AnzsVzb4 1+YaqJ5w5C2+J/JfnrBuBglQ//9LuVVy5Wdq+tl7oBWCQbRNrs+uOqSrMc5M5P3RJ0Hn pkYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=1JS1rdycUq6vgqQH2+7ZvG4o9uon7tAJlwkM4c63PgY=; b=NY4savKnBUxrv+alKZ1naboB8W640w7Yeh4KNL/Jp6pgoiBb43eAmuY2ibbFWNO9cL moNCAcEKNL660ivHQt7cq6zK0l6PjYq07fvpfs//XSzCnaQ4sQ7o7+l8/Tg7CYHrnC5J exSBZrq54LJAxXXLv+oO/8og7fjQ59Z43janAg4VenPoQCROu7aBa+SDsHTecqRqwdsu vCApmEobJ93+MhjtGbF8FXdNw2/U8vZt5j6fZqO2/0MAAt0JrpFcjdL2/KomntCwhcPP pdekYlptARi+0JXm/kASVxOv54r/X5NTzxIIX+ouIlLC2AiyWo/8O43eBcm6dhCkmWlp S/nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="PVRi3gC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si3716696edy.413.2020.06.19.02.59.19; Fri, 19 Jun 2020 02:59:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="PVRi3gC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732252AbgFSJ4u (ORCPT + 99 others); Fri, 19 Jun 2020 05:56:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731742AbgFSJ4h (ORCPT ); Fri, 19 Jun 2020 05:56:37 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05C4DC06174E; Fri, 19 Jun 2020 02:56:37 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id b6so9054813wrs.11; Fri, 19 Jun 2020 02:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1JS1rdycUq6vgqQH2+7ZvG4o9uon7tAJlwkM4c63PgY=; b=PVRi3gC/fZlQunqVLn2So81p1Ud91tZpQr15Q/5kwFPL0U6WalnweS5VcVsV2JhjLW KcbtoQXQVD0cy4JvcN+q3XEMoMmBgpjRkkv6W+hU9bl3OEFcxXhVNbbAYTIksH1kUsA+ 5TkEUsyuw3/KNehaQKIm5Hz/kp7I+kHroqJ4PV/sE0YVStM9CRluUQ/q6VGVX/4/nClM ijfRsanlT1+fXrVCMuU2rRQHfUsxNco/bZeo21QMYR+oRcKOGvCRAbDpyh/LoEeYfr+3 pYwaxVfGh78fgTs2v4fxCT7YIO4st9GKLds/4/toKTaZR6rFdGWIYKSkmdiqqJcIHIvG iWeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1JS1rdycUq6vgqQH2+7ZvG4o9uon7tAJlwkM4c63PgY=; b=CJ1yKAyhy4XZPcm0SLn//CMyjcmWcuWg/2KMkQVRjpttom0614MNrRq89ntm9iATq6 LVmWyxEQRNpDTI9/6ae0792hRgZMWp580RWMN5Kb6GLUMBqwTmUytKYNlpnpWrmVVgCc JJggE01Ta40j/IA485dLiR2wyod0EsgmDc/+CUwVvMTHfwfW/8EiKpFAXAJ8/FMYC+jD sd31BK7ZdouXo024uo1s7lVGUrjROH/NBnSwUgP6/9wS3BoGiVVZ70Mv0t1RS2kbEgBh PA5jdSJucbX/tNIw4f1/JhFW80wr8UVQ4Ql0ToDkf/4rGm414OyEuZ2nxxtPi17QWi5g 3amg== X-Gm-Message-State: AOAM533XaO7JSocvF7eTjZ3y8IrApumrWznMQsNJQk6TRsnIj+sQFfRt VRzoZj1iTpJttmT51Mavx/w= X-Received: by 2002:a5d:6291:: with SMTP id k17mr3166610wru.78.1592560595669; Fri, 19 Jun 2020 02:56:35 -0700 (PDT) Received: from macbook-pro-alvaro-eth.lan (90.red-88-20-62.staticip.rima-tde.net. [88.20.62.90]) by smtp.gmail.com with ESMTPSA id t5sm913169wmj.37.2020.06.19.02.56.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2020 02:56:35 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v4 2/2] phy: bcm63xx-usbh: Add BCM63xx USBH driver From: =?utf-8?Q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= In-Reply-To: <8eca5ec8f892f38d2b174c4d4b26c7d4fbdd69c4.camel@pengutronix.de> Date: Fri, 19 Jun 2020 11:56:34 +0200 Cc: simon@fire.lp0.eu, Jonas Gorski , kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, krzk@kernel.org, gregkh@linuxfoundation.org, alcooperx@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20200619085124.4029400-1-noltari@gmail.com> <20200619085124.4029400-3-noltari@gmail.com> <8eca5ec8f892f38d2b174c4d4b26c7d4fbdd69c4.camel@pengutronix.de> To: Philipp Zabel X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zabel, > El 19 jun 2020, a las 11:23, Philipp Zabel = escribi=C3=B3: >=20 > Hi =C3=81lvaro, >=20 > On Fri, 2020-06-19 at 10:51 +0200, =C3=81lvaro Fern=C3=A1ndez Rojas = wrote: >> Add BCM63xx USBH PHY driver for BMIPS. >>=20 >> Signed-off-by: =C3=81lvaro Fern=C3=A1ndez Rojas >> --- >> 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. >>=20 >> 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 >>=20 > [...] >> 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 =3D &pdev->dev; >> + struct bcm63xx_usbh_phy *usbh; >> + const struct bcm63xx_usbh_phy_variant *variant; >> + struct phy *phy; >> + struct phy_provider *phy_provider; >> + >> + usbh =3D devm_kzalloc(dev, sizeof(*usbh), GFP_KERNEL); >> + if (!usbh) >> + return -ENOMEM; >> + >> + variant =3D device_get_match_data(dev); >> + if (!variant) >> + return -EINVAL; >> + usbh->variant =3D variant; >> + >> + usbh->base =3D devm_platform_ioremap_resource(pdev, 0); >> + if (IS_ERR(usbh->base)) >> + return PTR_ERR(usbh->base); >> + >> + usbh->reset =3D devm_reset_control_get(dev, NULL); >=20 > Please use devm_reset_control_get_exclusive() instead. Excuse me but I totally forgot about that :( I will fix it in v5. >=20 > regards > Philipp Best regards, =C3=81lvaro.