Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1641786pxj; Fri, 18 Jun 2021 11:29:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztAO/SBPXlGnIPBTrXZdOlxdEhzRTnNpb+mHh3EWtD3O6BwgoIHY8wsJ3I8j/0Qf4NukjS X-Received: by 2002:a02:b808:: with SMTP id o8mr4524710jam.1.1624040983790; Fri, 18 Jun 2021 11:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624040983; cv=none; d=google.com; s=arc-20160816; b=byRmcCYRT1tL2pb/Rb8Wtne0TjKVIyRQKVD4ykOmMBrxGeKLIKkBIB50/S4RB6J3q0 WmoJ0m0nw4LNrtl6ejpOFQx+DRMEfDXa5KsKgnk06g/AgSVUzTajDEHD5OhRpTea+neF iolDU9oX/bwApioBR4ma1XuUdGIVFFp1k9OazxKrDgxlBhdVjpsCvBfLZHIq+hrLCfuZ XHdQZKWSqNdDeV1ka1nJvHLY++SSJssNy2FYmiUF1WvlMwprg+kfFKoolImCUU/5pyDV XzOY0PwqSt0TkMdetFq+GyhMQ+E/tKPPM55WMgff47L+DHdcFI092A9mccl20kC7b7SA SDRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lXIZf4M/Wk9OMiaT+VN4VJVU8FiWIRaCbWAUXPgEmuw=; b=VcMcclUv/fiY4If3P8CGqcuLOm9MHAkehbP9ZJGmmy+E6fkgZj0nyyHLGmRfxnc8uP LUQaXgdz5Q7U1LfzErNZVzbKLex58LbKYVvaBw39JY+0e0pAYYp1rLRJqLicOemLKJWC pYTOeuy8Ve34xsGovVdzuK8jia74fnzfYIAZDgQ6Gw5Zm96YFwx7XZKwPUphjS+tm9BT W/cwRAUHabVdrygbHfm0EsWXlBhmgV4Ckzn9xX1luw0YAxk38Kx+OXZjXgsHPb67XGcd FAX4fw4gb91XFxcI5XNoh6yNFCTW0AMXh6G4ubkAwmm1Tq8w7MfVGxoZu3Ye8OG9sInw lktQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B7ozRKMd; 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 h9si1305766ilq.47.2021.06.18.11.29.31; Fri, 18 Jun 2021 11:29:43 -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=B7ozRKMd; 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 S234467AbhFRPfu (ORCPT + 99 others); Fri, 18 Jun 2021 11:35:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235427AbhFRPfo (ORCPT ); Fri, 18 Jun 2021 11:35:44 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBC81C061767 for ; Fri, 18 Jun 2021 08:33:34 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id df12so6719746edb.2 for ; Fri, 18 Jun 2021 08:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lXIZf4M/Wk9OMiaT+VN4VJVU8FiWIRaCbWAUXPgEmuw=; b=B7ozRKMdsIZaq6CpNHJIsNxfc7Y4J7UTN6kDIxjZ2eigM59O+qyBRu5WyYOxllcJqS KRiSIKk8kGaUxnxrmaA5F0JiqukeXaiNs/BpI7+azHPmO1mDg5FvPfRsGEza4HOh8K7v Xpw7H3VfrZ8Q4IeT/HhbdkpwPSIyaSgTXpWC6AYJ3JY0muXE5l2ISZQmAuoSY/gfQ6cM HPUmMuX/ID9Kfdiqh7q7s3pgPih9RzRnjMQ/3Iw/I9bZaQxqGUczLfviGtSEKZ0gxrkE +Y5qYTLL2YiIReOIDDGnSJML9EUYmGi6/xox47WBgWLx1kheJDwTE89FTeQfFO2Zjem4 825A== 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=lXIZf4M/Wk9OMiaT+VN4VJVU8FiWIRaCbWAUXPgEmuw=; b=E0bkyK32L/ecQqgmoaDtx3Evb6Q0VvZnEBqfoH+1pI3MSsWZv/LLQB4jzUUv9Ind+S 8tXuV4c+4ytxOIoy8X75wCN0J1/Ks50vOZt28R1Dqjaz2SSmvn2Xean8bKc+Y4U8BCIL 8oTewrRdRDMzATRe738M0K8PjJPNf/OwclZYzFqEgBApuIHp6KK+LH2DLIIFt+n84sDy JP/QK/itcAuJV/J7dVaj30we0GzHJ7GNa+mgvlVJeqgcED1eDauKs5N2AkBD56uIioNE 1jeDk+TQw30vTRXCv4rmGzJp0Hs84DAxMvVEynSwlw3qSE88E8/y4L7Ho2NRPUhDsL29 Y29A== X-Gm-Message-State: AOAM530qhw5I3YcTKpWq6zfB3Wtr3zwoiop6uQtfaXnUufP1n9ShmMt+ funrOHXDmFx9mEFO+3lxO3TAzZgp6zbxuwOtyZc= X-Received: by 2002:aa7:cb8d:: with SMTP id r13mr5853072edt.184.1624030413483; Fri, 18 Jun 2021 08:33:33 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-7-linux.amoon@gmail.com> In-Reply-To: From: Anand Moon Date: Fri, 18 Jun 2021 21:03:22 +0530 Message-ID: Subject: Re: [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset callback function To: Martin Blumenstingl Cc: Kishon Vijay Abraham I , Vinod Koul , Neil Armstrong , Kevin Hilman , Jerome Brunet , Philipp Zabel , linux-phy@lists.infradead.org, linux-arm-kernel , linux-amlogic@lists.infradead.org, Linux Kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin On Fri, 18 Jun 2021 at 03:54, Martin Blumenstingl wrote: > > 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. I know his register is shared between two USB IPs, but I have not observed any issues. > > [...] > > - 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? > OK, If we pass NULL over here there is the possibility USB phy will not get registered. > > Best regards, > Martin Thanks -Anand