Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3457373ybt; Tue, 23 Jun 2020 02:48:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi+KcMGyfSFpjwvgRj+OBJAKo780kZKfx2CyeVIjEFZBRgGHSrcoJnOQOxspbdvByyec33 X-Received: by 2002:a17:906:fca4:: with SMTP id qw4mr5524035ejb.362.1592905716652; Tue, 23 Jun 2020 02:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592905716; cv=none; d=google.com; s=arc-20160816; b=LBshCazBfwEuyXhHI1P5B3sb11xauMUd/uIqyXimLmaRAHpJYCu4ZQvvn1AjOfnDTH lXTldIgd0y7VdBcSGYJBo6XRx1W6Hlkq3inKf1iET0muOw3YZ4Qt8WJmLPcslTF7RDEJ nt0ZPcbUChfna4UyGUplYeBvG0KaO1jJfYktkhKDhDMFXhH7jIOF3mf+8wg6bIDlrJHH SEr0R1hcTWmodtLto+mNaSRk2VjBc7MxwPR0dcwylQmBhI80qKPgMB9zy/WjrTycCFuh 218SyRc2OKX42t5VPFq3GxOjyurfSAS8FheHuv9EIKlcM1nD4YN6F0Ia61J11naOZ4+A 6HNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iKggRcdI7sNyyhDISy98npbymMoyRZSfT0QAAU3f0vQ=; b=zTxOh6+Wh1+4dwJxBlOcxxzBptwvyYFni9G6vLcEK+GPSbb4YuOy43YIQjYR1Xlya7 aS9rHryU7X+NY5GA4n5c246MznNcWJrPo4JfRxnKxhdwUDHjyJTFdZwzHDcrfQkEiGI9 ds6F0isyVVeuLQGdKL+WvCSMjpI51CBsA8UJE9VtsAt7OLJhCl//2e35J13GxOz6s/tQ ZjsFL2cqrRPa2M2HWzJ1oK5PR+I/sf1hD6by4I/Xbps1wNwkwdaD74BUjw4MpC0l+GT8 MjTCq3OgvcOZaBCxJ6O0LVMyzokABP4IhYzfx3/k7SDc0lQf87jZRvSUHC4GWIfILHip p0Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=U17lT7CY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z14si10972674ejr.261.2020.06.23.02.48.13; Tue, 23 Jun 2020 02:48:36 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=U17lT7CY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731947AbgFWJq1 (ORCPT + 99 others); Tue, 23 Jun 2020 05:46:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731976AbgFWJq1 (ORCPT ); Tue, 23 Jun 2020 05:46:27 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B069C061755 for ; Tue, 23 Jun 2020 02:46:27 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id f18so18226298qkh.1 for ; Tue, 23 Jun 2020 02:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=iKggRcdI7sNyyhDISy98npbymMoyRZSfT0QAAU3f0vQ=; b=U17lT7CYSTuj99Giu1FBaV/h/RoCGn6W4PdXk6wPMyfnVLBaDjbbmbHfzEZiY7S4Vi tnDzK+DKhIloPX6fpBJtIgaKmAcLfydO+MMim0fJuCA4BncKQxsg9Y+V14P1st5bRZXP SHgrm+X4d72dYIhkZI1ZX5NSsaD7WNqCgKp5bQ34+ZjA8jHjmdT5pA4i9DRLtRL89VcE dKrF4MGW180DAVJv3UTu9ezZ2Nrsa3PnypMstE9T7+fHxA7hW8VmhIDjBFdGXfoadKj6 /ITX/9TP3LTwlhbdBFb4EFZm5WM88wT7UDfA8AaqyGNCTR2dKJwF8lmUZs5xYIDLU35P si0w== 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:content-transfer-encoding; bh=iKggRcdI7sNyyhDISy98npbymMoyRZSfT0QAAU3f0vQ=; b=e5Hg9RsxRk/vSm0aaL9l4hBpNiMuUQDfVxihGdh/OoEwLWr26Yn10aWljRzrya6PlN BaD3n7jlKUJ6CKUHubu3h9czSf/tu/yIl2JUwgQvfS4OcEXlskEPxk9DTr1Fo6EX8NCD sbtVxFochMtxEVALWLjrKSfOtv+GbzReRzPX9urYK/nzjIQDsvGdCPeU0KM+21AjqFVK IMxc/ML93uccrkBEN8Qt8LoWELe6seYu34edsyh/gPUmyBoyQfkjqy7+YlDqAwT5tBvh TIG0AkpqoQ2qDq924JG3599gHSPPvgayp1xkyCq+5WmZNpnWW+ZEOQimUuYBw0rzPIck HvKQ== X-Gm-Message-State: AOAM530fI0vGbht0vVDsHYGCQddivaBjvU3igr7eo3LFprLeEZpJryUd QHwkqFeMaqtcJ2IZG0Ztf2Q/ahliEJ+S3ccW10P8Tg== X-Received: by 2002:a37:aac4:: with SMTP id t187mr17690729qke.263.1592905586254; Tue, 23 Jun 2020 02:46:26 -0700 (PDT) MIME-Version: 1.0 References: <20200622093744.13685-1-brgl@bgdev.pl> <20200622093744.13685-15-brgl@bgdev.pl> <20200622132921.GI1551@shell.armlinux.org.uk> <20200623094252.GS1551@shell.armlinux.org.uk> In-Reply-To: <20200623094252.GS1551@shell.armlinux.org.uk> From: Bartosz Golaszewski Date: Tue, 23 Jun 2020 11:46:15 +0200 Message-ID: Subject: Re: [PATCH 14/15] net: phy: add PHY regulator support To: Russell King - ARM Linux admin Cc: Bartosz Golaszewski , Andrew Lunn , Alexandre Belloni , devicetree , Vladimir Oltean , Linux Kernel Mailing List , Fabien Parent , Iyappan Subramanian , Quan Nguyen , Frank Rowand , Florian Fainelli , Jakub Kicinski , Vivien Didelot , Tom Lendacky , Andrew Perepech , Stephane Le Provost , Keyur Chudgar , Jassi Brar , Claudiu Manoil , Mark Brown , "moderated list:ARM/Mediatek SoC..." , Matthias Brugger , Linux ARM , netdev , Ilias Apalodimas , Liam Girdwood , Rob Herring , Philipp Zabel , Pedro Tsai , "David S . Miller" , Heiner Kallweit Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 23 cze 2020 o 11:43 Russell King - ARM Linux admin napisa=C5=82(a): > > On Tue, Jun 23, 2020 at 11:41:11AM +0200, Bartosz Golaszewski wrote: > > pon., 22 cze 2020 o 15:29 Russell King - ARM Linux admin > > napisa=C5=82(a): > > > > > > > [snip!] > > > > > > > > This is likely to cause issues for some PHY drivers. Note that we ha= ve > > > some PHY drivers which register a temperature sensor in the probe > > > function, which means they can be accessed independently of the lifet= ime > > > of the PHY bound to the network driver (which may only be while the > > > network device is "up".) We certainly do not want hwmon failing just > > > because the network device is down. > > > > > > That's kind of worked around for the reset stuff, because there are t= wo > > > layers to that: the mdio device layer reset support which knows nothi= ng > > > of the PHY binding state to the network driver, and the phylib reset > > > support, but it is not nice. > > > > > > > Regulators are reference counted so if the hwmon driver enables it > > using mdio_device_power_on() it will stay on even after the PHY driver > > calls phy_device_power_off(), right? Am I missing something? > > If that is true, you will need to audit the PHY drivers to add that. > This change doesn't have any effect on devices which don't have a regulator assigned in DT though. The one I'm adding in the last patch is the first to use this. Bart