From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92C51C2B9F4 for ; Thu, 17 Jun 2021 22:24:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60BF561209 for ; Thu, 17 Jun 2021 22:24:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60BF561209 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rcWENC/AxlwZYRA0jJ2nodpCpFL+vXgrP+zuk305Q5M=; b=ovfwHqIzS/6kde jAsvW+HO34qMaCwRQdnn+l3la+vr3VseR8T4V407PkB6ClgsytnvsftHYPp9Ib+fSrTzfYR5lXBk8 PSpYqiQtGv1bs5qv4lx5Lgv3kf10mUW6H3WPn6GFicMu0+7DSggbe1/hdq1HVAIawMknurnrFMvac bvOWgJQ1NmCCK8QIshtEPDv6+S6jKHb1vnja89bnfgpKk3MCXCXFPbSgIDiZtp1u2fAIjbLLmsbPv GFe7NuDOxqL0wxIKfxXBasRbF7bPfD5h1/5LgZdtNisCzNnMRFgyg8kt1QMTypXxLqgW955iWbYp4 rYGcBmLyu6x90RXQSdHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu0RN-00BxEK-UD; Thu, 17 Jun 2021 22:24:49 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu0RB-00BxCL-9T; Thu, 17 Jun 2021 22:24:38 +0000 Received: by mail-ej1-x633.google.com with SMTP id g20so12610355ejt.0; Thu, 17 Jun 2021 15:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T50KbAThdeevR6uB4Id+cbtEC5Z15njRViPF/2u5PCs=; b=Qkg/tIGdoJHarCmVrz02bhylDw6IuiZyhNKw+H0gSWcHJRB/YG0gHleAptmrer6rSV /hv9Y94OKoq4xycsRpuyRMdw4rpHsEGT/RRgrL7Oyksd+V4hkhKtEVND6fjMxhoP/b+e 3Gl18bAkR13OPvp3GQ8tO/Fsm2pEKt7ykqz15UL5YyE3UNQH3U9kcJ4o3ai4b6h0zlZ8 PyJbwvWNWn2g4X5AaHJ4MBE/Cnx3U2Ss3uCGOqiCX6peFidW/kx84GagopBeZFwCXMGm ceX1RdcIM4zIhsW1fGEJt1pSvfK4+CJsG3yy8TsVBO1JRvOAlp5llXGFmPXkDPEmvROv jTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T50KbAThdeevR6uB4Id+cbtEC5Z15njRViPF/2u5PCs=; b=teRLzPLVJDqtF/0II23eKYa/zTfO051Ky/mPUHi/PBXvMDLZJhyfdqnq4f65qyL/0l FWmZeSJe233Ck+LavHdPuj/fcFXK7WIEs48HgBAceGFhkAHUGVHmMf4gJaxx1eMRYJ5a 6xqGFsha6Tcxe4iRSMYDTM554fpqLMVkCHx+LztlV3IySNj8YyO3Vv2LGB4av/WNlej6 VxusyDOY0niodO5S5YZB0F84ZHSX3VGdVTDSCKCnyTudhF6szUxp1CCPFmwE+v5XSIQt hUvLBoLy0jkmkgH005NBFGtYbxGyX8BiEqidqalcVnRXVGK6EJkxb4kzOYELo3XTbVq5 ZyuQ== X-Gm-Message-State: AOAM533Eu9gQppX0ndZRu6qT5gGJUQDJlnxQIXi5dJrJ3x84YEdWFxbR hp/LACfqGLCYM/MCFiqLIeW47uzI4Rh9gWrmDka/kNY5c10= X-Google-Smtp-Source: ABdhPJwrZod3kcnlN/pabK+bk5akynewCBmBuwQ8at429BZSEKzc0v/foDCSUvXSgXNf79VWmHNi7NTa+NIqa0VBSKQ= X-Received: by 2002:a17:906:2c52:: with SMTP id f18mr7610434ejh.258.1623968675568; Thu, 17 Jun 2021 15:24:35 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-7-linux.amoon@gmail.com> In-Reply-To: <20210617194154.2397-7-linux.amoon@gmail.com> From: Martin Blumenstingl Date: Fri, 18 Jun 2021 00:24:24 +0200 Message-ID: Subject: Re: [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset callback function To: Anand Moon Cc: Kishon Vijay Abraham I , Vinod Koul , Neil Armstrong , Kevin Hilman , Jerome Brunet , Philipp Zabel , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210617_152437_394628_DA056229 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hi Anand, On Thu, Jun 17, 2021 at 9:44 PM Anand Moon wrote: [...] > +static int phy_meson8b_usb2_reset(struct phy *phy) > +{ > + struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy); > + int ret; > + > + if (priv->is_enabled) { > + ret = reset_control_reset(priv->reset); > + if (ret) { > + dev_err(&phy->dev, "Failed to trigger USB reset\n"); > + return ret; > + } > + } > + > + return 0; > +} will this reset change the register values back to some kind of default? If it does then we're not re-applying our desired register values afterwards - which is probably asking for trouble. For shared resets (like the one we have here) reset_control_reset will only trigger the reset line once until all drivers using that reset line are unloaded. So effectively this new phy_ops.reset callback will be a no-op. [...] > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy"); I think this breaks compatibility with existing .dtbs and our dt-bindings (as we're not documenting a "reset-names" property). What is the goal of this one? Best regards, Martin _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 426E5C2B9F4 for ; Thu, 17 Jun 2021 22:24:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 089B661209 for ; Thu, 17 Jun 2021 22:24:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232156AbhFQW0q (ORCPT ); Thu, 17 Jun 2021 18:26:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231611AbhFQW0q (ORCPT ); Thu, 17 Jun 2021 18:26:46 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01432C061574 for ; Thu, 17 Jun 2021 15:24:37 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id nb6so12428348ejc.10 for ; Thu, 17 Jun 2021 15:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T50KbAThdeevR6uB4Id+cbtEC5Z15njRViPF/2u5PCs=; b=Qkg/tIGdoJHarCmVrz02bhylDw6IuiZyhNKw+H0gSWcHJRB/YG0gHleAptmrer6rSV /hv9Y94OKoq4xycsRpuyRMdw4rpHsEGT/RRgrL7Oyksd+V4hkhKtEVND6fjMxhoP/b+e 3Gl18bAkR13OPvp3GQ8tO/Fsm2pEKt7ykqz15UL5YyE3UNQH3U9kcJ4o3ai4b6h0zlZ8 PyJbwvWNWn2g4X5AaHJ4MBE/Cnx3U2Ss3uCGOqiCX6peFidW/kx84GagopBeZFwCXMGm ceX1RdcIM4zIhsW1fGEJt1pSvfK4+CJsG3yy8TsVBO1JRvOAlp5llXGFmPXkDPEmvROv jTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T50KbAThdeevR6uB4Id+cbtEC5Z15njRViPF/2u5PCs=; b=Lq5+Ax+gaPzVqk2myb/oDzMKLms0hkYLKWQVXRMagS+T0YY0bsye3JFzZj6cmgY681 LWNStrOB3xKEt7PDMNLjFeiShdLTvw9K4yPL7SnNHeNQj97HJH8uqB2Jibf6Fio7nL2V PbqUpzoPJwdMkPsUGs3knhQ3EhSvDmFxBrxsZkTdD5baQN/OSj7sAR1thzz11AjWRFjZ ATsrfUiEbbQRpWE8nlWwscKpjsPP/9Qk+cUEqiWM3Rvdo496W9iKppx5Gp+C+o18Q8Oa J8FXmcjSIXSPzXXLDJ0+rGTV61gAdYF10tARHsM5SCxQj9zoc0i4gCGzd4DMAx3XlXRa Ozow== X-Gm-Message-State: AOAM531LZhEzYk/R7lWyFEu8XcOoAbt+0QiZatYf39P/mOTB/pdVB19S FW3ImlqOhOj2CUhdwYWynN4epmE5TdpsBH2yoDg= X-Google-Smtp-Source: ABdhPJwrZod3kcnlN/pabK+bk5akynewCBmBuwQ8at429BZSEKzc0v/foDCSUvXSgXNf79VWmHNi7NTa+NIqa0VBSKQ= X-Received: by 2002:a17:906:2c52:: with SMTP id f18mr7610434ejh.258.1623968675568; Thu, 17 Jun 2021 15:24:35 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-7-linux.amoon@gmail.com> In-Reply-To: <20210617194154.2397-7-linux.amoon@gmail.com> From: Martin Blumenstingl Date: Fri, 18 Jun 2021 00:24:24 +0200 Message-ID: Subject: Re: [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset callback function To: Anand Moon Cc: Kishon Vijay Abraham I , Vinod Koul , Neil Armstrong , Kevin Hilman , Jerome Brunet , Philipp Zabel , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anand, On Thu, Jun 17, 2021 at 9:44 PM Anand Moon wrote: [...] > +static int phy_meson8b_usb2_reset(struct phy *phy) > +{ > + struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy); > + int ret; > + > + if (priv->is_enabled) { > + ret = reset_control_reset(priv->reset); > + if (ret) { > + dev_err(&phy->dev, "Failed to trigger USB reset\n"); > + return ret; > + } > + } > + > + return 0; > +} will this reset change the register values back to some kind of default? If it does then we're not re-applying our desired register values afterwards - which is probably asking for trouble. For shared resets (like the one we have here) reset_control_reset will only trigger the reset line once until all drivers using that reset line are unloaded. So effectively this new phy_ops.reset callback will be a no-op. [...] > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy"); I think this breaks compatibility with existing .dtbs and our dt-bindings (as we're not documenting a "reset-names" property). What is the goal of this one? Best regards, Martin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1704C48BE5 for ; Thu, 17 Jun 2021 22:24:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6196961351 for ; Thu, 17 Jun 2021 22:24:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6196961351 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/Xq5FGEq1FgEED/2cwhUaySSQ8UII35fhEZ8jvl4wwE=; b=GtwNIz81axFERJ 2O/eayB5kaCs/FFG0rzeaibXgVKVyJ1lYjVmfndWohEMQC86bzOrV/qV+c4qhVOgtbc/jkXTGfBWy 1zEahYaBMYCA8xP1fGhNMOJq63+zpp8IU41psiLSkEgYtqsPZTZbK+soU0sm4DwR4uMrFffoRaTyb sETqoxyb01EmjnYGVzGJuOs4CY6Xdf8EegMJSWVusghg/Au3rKoAcfRPgni+LB3HRQgZ5omUHIin1 b+XfEgaD06LRD3eXVMyx7/ZTA0lUzHETpXmc44DPkpGNPY9OGpZFySc1v+ir1AgwiYq2DUYNISk6I /tbAG8DhZQ0Whjo2Xogw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu0RD-00BxCw-Rm; Thu, 17 Jun 2021 22:24:39 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu0RB-00BxCL-9T; Thu, 17 Jun 2021 22:24:38 +0000 Received: by mail-ej1-x633.google.com with SMTP id g20so12610355ejt.0; Thu, 17 Jun 2021 15:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T50KbAThdeevR6uB4Id+cbtEC5Z15njRViPF/2u5PCs=; b=Qkg/tIGdoJHarCmVrz02bhylDw6IuiZyhNKw+H0gSWcHJRB/YG0gHleAptmrer6rSV /hv9Y94OKoq4xycsRpuyRMdw4rpHsEGT/RRgrL7Oyksd+V4hkhKtEVND6fjMxhoP/b+e 3Gl18bAkR13OPvp3GQ8tO/Fsm2pEKt7ykqz15UL5YyE3UNQH3U9kcJ4o3ai4b6h0zlZ8 PyJbwvWNWn2g4X5AaHJ4MBE/Cnx3U2Ss3uCGOqiCX6peFidW/kx84GagopBeZFwCXMGm ceX1RdcIM4zIhsW1fGEJt1pSvfK4+CJsG3yy8TsVBO1JRvOAlp5llXGFmPXkDPEmvROv jTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T50KbAThdeevR6uB4Id+cbtEC5Z15njRViPF/2u5PCs=; b=teRLzPLVJDqtF/0II23eKYa/zTfO051Ky/mPUHi/PBXvMDLZJhyfdqnq4f65qyL/0l FWmZeSJe233Ck+LavHdPuj/fcFXK7WIEs48HgBAceGFhkAHUGVHmMf4gJaxx1eMRYJ5a 6xqGFsha6Tcxe4iRSMYDTM554fpqLMVkCHx+LztlV3IySNj8YyO3Vv2LGB4av/WNlej6 VxusyDOY0niodO5S5YZB0F84ZHSX3VGdVTDSCKCnyTudhF6szUxp1CCPFmwE+v5XSIQt hUvLBoLy0jkmkgH005NBFGtYbxGyX8BiEqidqalcVnRXVGK6EJkxb4kzOYELo3XTbVq5 ZyuQ== X-Gm-Message-State: AOAM533Eu9gQppX0ndZRu6qT5gGJUQDJlnxQIXi5dJrJ3x84YEdWFxbR hp/LACfqGLCYM/MCFiqLIeW47uzI4Rh9gWrmDka/kNY5c10= X-Google-Smtp-Source: ABdhPJwrZod3kcnlN/pabK+bk5akynewCBmBuwQ8at429BZSEKzc0v/foDCSUvXSgXNf79VWmHNi7NTa+NIqa0VBSKQ= X-Received: by 2002:a17:906:2c52:: with SMTP id f18mr7610434ejh.258.1623968675568; Thu, 17 Jun 2021 15:24:35 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-7-linux.amoon@gmail.com> In-Reply-To: <20210617194154.2397-7-linux.amoon@gmail.com> From: Martin Blumenstingl Date: Fri, 18 Jun 2021 00:24:24 +0200 Message-ID: Subject: Re: [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset callback function To: Anand Moon Cc: Kishon Vijay Abraham I , Vinod Koul , Neil Armstrong , Kevin Hilman , Jerome Brunet , Philipp Zabel , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210617_152437_394628_DA056229 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Hi Anand, On Thu, Jun 17, 2021 at 9:44 PM Anand Moon wrote: [...] > +static int phy_meson8b_usb2_reset(struct phy *phy) > +{ > + struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy); > + int ret; > + > + if (priv->is_enabled) { > + ret = reset_control_reset(priv->reset); > + if (ret) { > + dev_err(&phy->dev, "Failed to trigger USB reset\n"); > + return ret; > + } > + } > + > + return 0; > +} will this reset change the register values back to some kind of default? If it does then we're not re-applying our desired register values afterwards - which is probably asking for trouble. For shared resets (like the one we have here) reset_control_reset will only trigger the reset line once until all drivers using that reset line are unloaded. So effectively this new phy_ops.reset callback will be a no-op. [...] > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy"); I think this breaks compatibility with existing .dtbs and our dt-bindings (as we're not documenting a "reset-names" property). What is the goal of this one? Best regards, Martin -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D06A0C2B9F4 for ; Thu, 17 Jun 2021 22:26:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E53761209 for ; Thu, 17 Jun 2021 22:26:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E53761209 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P6FsZx3Mza1mfuKy3lHp5f/MuvOloPeMgRy4By8kwHo=; b=xO7m0qGAsBXB86 LkODfLzOi6VdbEU80tUw6AOs55JckupFFABT1W+esP4u5UlWH3bXDNV4niRwrLRJEFswFqj+azT5E NZjuuFrr2k3G8lErl+elzjBnEoLfS65roFfq2k0wxt9hRIbxZ5G4oeTGfA8S6sz578YGPzkNhJDa2 5ta4QSmhdn3bnDeelorIJSZYGsVv6lPFlKsAG1M68LpPNS1M0T7ZUVuE9jlW6NdBVkujbZN1d+ga7 W6BayZM2B4qNoeNzG7Fa1+ppbnjggjIkuoISvLKfww31oCfkvLZLPUS2VWrmS6SzEGy+IYqoHzIN5 Ba1O5S42g5EW7+GLkbnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu0RF-00BxD2-2T; Thu, 17 Jun 2021 22:24:41 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu0RB-00BxCL-9T; Thu, 17 Jun 2021 22:24:38 +0000 Received: by mail-ej1-x633.google.com with SMTP id g20so12610355ejt.0; Thu, 17 Jun 2021 15:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T50KbAThdeevR6uB4Id+cbtEC5Z15njRViPF/2u5PCs=; b=Qkg/tIGdoJHarCmVrz02bhylDw6IuiZyhNKw+H0gSWcHJRB/YG0gHleAptmrer6rSV /hv9Y94OKoq4xycsRpuyRMdw4rpHsEGT/RRgrL7Oyksd+V4hkhKtEVND6fjMxhoP/b+e 3Gl18bAkR13OPvp3GQ8tO/Fsm2pEKt7ykqz15UL5YyE3UNQH3U9kcJ4o3ai4b6h0zlZ8 PyJbwvWNWn2g4X5AaHJ4MBE/Cnx3U2Ss3uCGOqiCX6peFidW/kx84GagopBeZFwCXMGm ceX1RdcIM4zIhsW1fGEJt1pSvfK4+CJsG3yy8TsVBO1JRvOAlp5llXGFmPXkDPEmvROv jTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T50KbAThdeevR6uB4Id+cbtEC5Z15njRViPF/2u5PCs=; b=teRLzPLVJDqtF/0II23eKYa/zTfO051Ky/mPUHi/PBXvMDLZJhyfdqnq4f65qyL/0l FWmZeSJe233Ck+LavHdPuj/fcFXK7WIEs48HgBAceGFhkAHUGVHmMf4gJaxx1eMRYJ5a 6xqGFsha6Tcxe4iRSMYDTM554fpqLMVkCHx+LztlV3IySNj8YyO3Vv2LGB4av/WNlej6 VxusyDOY0niodO5S5YZB0F84ZHSX3VGdVTDSCKCnyTudhF6szUxp1CCPFmwE+v5XSIQt hUvLBoLy0jkmkgH005NBFGtYbxGyX8BiEqidqalcVnRXVGK6EJkxb4kzOYELo3XTbVq5 ZyuQ== X-Gm-Message-State: AOAM533Eu9gQppX0ndZRu6qT5gGJUQDJlnxQIXi5dJrJ3x84YEdWFxbR hp/LACfqGLCYM/MCFiqLIeW47uzI4Rh9gWrmDka/kNY5c10= X-Google-Smtp-Source: ABdhPJwrZod3kcnlN/pabK+bk5akynewCBmBuwQ8at429BZSEKzc0v/foDCSUvXSgXNf79VWmHNi7NTa+NIqa0VBSKQ= X-Received: by 2002:a17:906:2c52:: with SMTP id f18mr7610434ejh.258.1623968675568; Thu, 17 Jun 2021 15:24:35 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-7-linux.amoon@gmail.com> In-Reply-To: <20210617194154.2397-7-linux.amoon@gmail.com> From: Martin Blumenstingl Date: Fri, 18 Jun 2021 00:24:24 +0200 Message-ID: Subject: Re: [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset callback function To: Anand Moon Cc: Kishon Vijay Abraham I , Vinod Koul , Neil Armstrong , Kevin Hilman , Jerome Brunet , Philipp Zabel , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210617_152437_394628_DA056229 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Anand, On Thu, Jun 17, 2021 at 9:44 PM Anand Moon wrote: [...] > +static int phy_meson8b_usb2_reset(struct phy *phy) > +{ > + struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy); > + int ret; > + > + if (priv->is_enabled) { > + ret = reset_control_reset(priv->reset); > + if (ret) { > + dev_err(&phy->dev, "Failed to trigger USB reset\n"); > + return ret; > + } > + } > + > + return 0; > +} will this reset change the register values back to some kind of default? If it does then we're not re-applying our desired register values afterwards - which is probably asking for trouble. For shared resets (like the one we have here) reset_control_reset will only trigger the reset line once until all drivers using that reset line are unloaded. So effectively this new phy_ops.reset callback will be a no-op. [...] > - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL); > + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy"); I think this breaks compatibility with existing .dtbs and our dt-bindings (as we're not documenting a "reset-names" property). What is the goal of this one? Best regards, Martin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel