Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp244563iob; Mon, 2 May 2022 18:20:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIEh7kJXruo3b4MqT2QUT6QZ5bQWAEFUrSDMUa0tnZOkOVLIeZx4eXSameRmbVibMkn3Im X-Received: by 2002:a17:90a:4897:b0:1c7:5fce:cbcd with SMTP id b23-20020a17090a489700b001c75fcecbcdmr2130116pjh.45.1651540844424; Mon, 02 May 2022 18:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651540844; cv=none; d=google.com; s=arc-20160816; b=dEQ6DwXLpubDmStUfB4u8YdcVpnh5uB3DqznNOHk3RRQnftujFNaTvLZy5I7NVPyv5 FwaUHTFNDkIziui2dW6J+DLzR7BNhihWj0ajKnOAqcW9CAwScqiLOzm6eUB9FS93k+c2 cG9z1kys3lgyr5Dbe0rJzkFs/wYadt/QGmMG9mIjXhHPafNwatheovSZyZMekoDSN51B Gs+x+iNVeAACLzn91sqMT1BpFc4XQ4FIB71xPnL5wDJ76Ye+ojPLNRleQNYmdnEpFWaY qZBeDm6+AYJY0OanNKtj1mgi6PipGW/9NmD7cVOf7W3zxfcpy272WXOhXke0XexTL5sH Jfmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id; bh=dedKvIXHx0ZbpWpVGX36XoqnfU9842IzFW23w4nUVIQ=; b=mb6jGYvMi7O46VO6ho87ZesglKhtXtkaR4bWi7FSOS++LUV6Kh2l+2RsdMeLQZE/t2 kM3maqjc2Dv3kgG9iLwiy7F7iK60DFts2f59r+LUVA29FOwyaFG/UikB73aPEDtTJ3rv YQ9gxmaaSCOWnLoDtwSiHVJC+RBIRdgFqJ0l+MKlAFSNQCOqiV2lWcpIJZrZHD6TV0ds PBmkFITsjY+XLiXwSNPsys/G2OcNKumpby9Vf1REvngFqnuJlkQYhBf/OwkrzuTpvvMT XGV7kaNsxWnMs/FxQ+NkGx5eWXZW8OumhfYj70zHvl5VNVDBQ7deDxRCcHgvfKl3zV9n tFnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x125-20020a627c83000000b004fa3a8dffa2si14284521pfc.89.2022.05.02.18.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 18:20:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 95CF64B84B; Mon, 2 May 2022 17:59:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344513AbiD2MKt convert rfc822-to-8bit (ORCPT + 99 others); Fri, 29 Apr 2022 08:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236678AbiD2MKr (ORCPT ); Fri, 29 Apr 2022 08:10:47 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 042FEA27C1 for ; Fri, 29 Apr 2022 05:07:28 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkPP0-0002Ha-DR; Fri, 29 Apr 2022 14:07:14 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nkPOx-005wMO-Hq; Fri, 29 Apr 2022 14:07:10 +0200 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1nkPOv-00073P-27; Fri, 29 Apr 2022 14:07:09 +0200 Message-ID: <6776293c80bf3f48d7a72a3c9f73e93abee2b369.camel@pengutronix.de> Subject: Re: [PATCH v4 1/2] usb: host: ehci-sunplus: Add driver for ehci in Sunplus SP7021 From: Philipp Zabel To: Vincent Shih , gregkh@linuxfoundation.org, stern@rowland.harvard.edu, davem@davemloft.net, vladimir.oltean@nxp.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, wells.lu@sunplus.com Date: Fri, 29 Apr 2022 14:07:08 +0200 In-Reply-To: <1651220876-26705-2-git-send-email-vincent.sunplus@gmail.com> References: <1651220876-26705-1-git-send-email-vincent.sunplus@gmail.com> <1651220876-26705-2-git-send-email-vincent.sunplus@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vincent, On Fr, 2022-04-29 at 16:27 +0800, Vincent Shih wrote: [...] > +static int sp_ehci_platform_power_on(struct platform_device *pdev) > +{ > + struct usb_hcd *hcd = platform_get_drvdata(pdev); > + struct sp_ehci_priv *sp_priv = hcd_to_sp_ehci_priv(hcd); > + int ret; > + > + ret = clk_prepare_enable(sp_priv->ehci_clk); > + if (ret) > + goto err_ehci_clk; This should be: return ret; > + > + ret = reset_control_deassert(sp_priv->ehci_rstc); > + if (ret) > + goto err_ehci_reset; And this should be: goto err_ehci_clk; > + > + ret = phy_init(sp_priv->phy); > + if (ret) > + goto err_ehci_reset; > + > + ret = phy_power_on(sp_priv->phy); > + if (ret) > + goto err_phy_exit; > + > + return 0; > + > +err_phy_exit: > + phy_exit(sp_priv->phy); > +err_ehci_reset: > + reset_control_assert(sp_priv->ehci_rstc); > +err_ehci_clk: > + clk_disable_unprepare(sp_priv->ehci_clk); > + > + return ret; > +} > + > +static void sp_ehci_platform_power_off(struct platform_device *pdev) > +{ > + struct usb_hcd *hcd = platform_get_drvdata(pdev); > + struct sp_ehci_priv *sp_priv = hcd_to_sp_ehci_priv(hcd); > + > + phy_power_off(sp_priv->phy); > + phy_exit(sp_priv->phy); > + > + reset_control_assert(sp_priv->ehci_rstc); > + clk_disable_unprepare(sp_priv->ehci_clk); > +} > + > +static struct usb_ehci_pdata usb_ehci_pdata = { > + .has_tt = 1, > + .has_synopsys_hc_bug = 1, > + .big_endian_desc = 1, > + .big_endian_mmio = 1, > + .power_on = sp_ehci_platform_power_on, > + .power_suspend = sp_ehci_platform_power_off, > + .power_off = sp_ehci_platform_power_off, > + Superfluous whitespace. regards Philipp