Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp428123ybt; Wed, 24 Jun 2020 02:48:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrOnoZXzejF5trLZMGOuycsr3nsCWrey976KDcG1QqMHwe809aReuTvsb8yxXxk4mCSbdR X-Received: by 2002:a17:906:a0f:: with SMTP id w15mr25490352ejf.332.1592992114601; Wed, 24 Jun 2020 02:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592992114; cv=none; d=google.com; s=arc-20160816; b=S8v7dX1jrFUXofR+4lbeZoxKgFoFdQf9z8BRAsP48ZtPCYnMd1lbpd/X4vQjpOik4L d/nzheBk2BQqkv/f74hO2aPR2w8PW5wv2+0Zt6+deOoaR6Vdux3YSiy80i0TmCFp9dc0 VINOjsYuXh3TfQs6DXlN3ZgnJY54UUbiA+bjnnyPB4ffepviRaq0NqM50LwEx2RoNPTn MQiQxqlveGla+06JNAUTHmp+qBY7wOtetJHsAwD5cO8ZW3wwC5dArbUdg+mgVyhOq+Bx IqCb5koptJNEvrHoDpXYLBZfOplTWafGnSCsZQLhBniftmR0VCHQQVdtSbo5kSzKM/Qh 4Xmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rYiMLNyH6eejq1M7FI0t8GXIQIY1y4HUlGHPYP73bvA=; b=xVzVCO0PqTIB4knIzc/M4+61wuUVn9GrwrHP4BROFygdLGxIwC5vRypgzBLMTaSZRL umBX189Dv7V3WVmG5UscX/vRRB8PIfliUsJkqTbbSkIf3uXFLgAuYz+maShdlJBZVnBE 6RGtNJwr9P3lhBl2NgaCO1HI4nCVEK0TmhySn49PNFAe0Ugeee7xwjD8xbWvPP+YeURT C1r8Os1rxcAyCgQViNcQlpCnrnVpHKY0Jr/RgKZL+oLTzbx56jtQ+JUryq421GKfweYC nzzOsFstkFyoHr780XMY8MNPu5demXFTQMpFKrlcH+7TU+b5ypel3wPjDcMwR8keQslZ d1xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iMQawrP4; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j34si5818510edb.209.2020.06.24.02.48.07; Wed, 24 Jun 2020 02:48:34 -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=@kernel.org header.s=default header.b=iMQawrP4; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389919AbgFXJnI (ORCPT + 99 others); Wed, 24 Jun 2020 05:43:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:45474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388005AbgFXJnG (ORCPT ); Wed, 24 Jun 2020 05:43:06 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7102C20885; Wed, 24 Jun 2020 09:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592991785; bh=rYiMLNyH6eejq1M7FI0t8GXIQIY1y4HUlGHPYP73bvA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iMQawrP4gD/kEbaeFzV0OLvI9+7NVkmw8/GoJ2aEPtRKA/jirfzwFYy0L5Y/OzPCu xisKHDnJn2fl+MFySaTny0zOqs4oZxopj5XvUAjHuCdvuRhKkw4v/EbNApMnkwuGh8 +rPE3Bwi4OtimVg+6yswW8FMP+j9M58H929pco0w= Date: Wed, 24 Jun 2020 10:43:02 +0100 From: Mark Brown To: Florian Fainelli Cc: Andrew Lunn , Bartosz Golaszewski , Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski , Rob Herring , Matthias Brugger , Microchip Linux Driver Support , Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , Vivien Didelot , Tom Lendacky , Yisen Zhuang , Salil Mehta , Jassi Brar , Ilias Apalodimas , Iyappan Subramanian , Keyur Chudgar , Quan Nguyen , Frank Rowand , Philipp Zabel , Liam Girdwood , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Fabien Parent , Stephane Le Provost , Pedro Tsai , Andrew Perepech , Bartosz Golaszewski Subject: Re: [PATCH 09/15] net: phy: delay PHY driver probe until PHY registration Message-ID: <20200624094302.GA5472@sirena.org.uk> References: <20200622093744.13685-1-brgl@bgdev.pl> <20200622093744.13685-10-brgl@bgdev.pl> <20200622133940.GL338481@lunn.ch> <20200622135106.GK4560@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: X-Cookie: So this is it. We're going to die. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 23, 2020 at 12:49:15PM -0700, Florian Fainelli wrote: > On 6/22/20 6:51 AM, Mark Brown wrote: > > If the bus includes power management for the devices on the bus the > > controller is generally responsible for that rather than the devices, > > the devices access this via facilities provided by the bus if needed. > > If the device is enumerated by firmware prior to being physically > > enumerable then the bus will generally instantiate the device model > > device and then arrange to wait for the physical device to appear and > > get joined up with the device model device, typically in such situations > > the physical device might appear and disappear dynamically at runtime > > based on what the driver is doing anyway. > In premise there is nothing that prevents the MDIO bus from taking care > of the regulators, resets, prior to probing the PHY driver, what is > complicated here is that we do need to issue a read of the actual PHY to > know its 32-bit unique identifier and match it with an appropriate > driver. The way that we have worked around this with if you do not wish > such a hardware access to be made, is to provide an Ethernet PHY node > compatible string that encodes that 32-bit OUI directly. In premise the > same challenges exist with PCI devices/endpoints as well as USB, would > they have reset or regulator typically attached to them. That all sounds very normal and is covered by both cases I describe? > > We could use a pre-probe stage in the device model for hotpluggable > > buses in embedded contexts where you might need to bring things out of > > reset or power them up before they'll appear on the bus for enumeration > > but buses have mostly handled that at their level. > That sounds like a better solution, are there any subsystems currently > implementing that, or would this be a generic Linux device driver model > addition that needs to be done? Like I say I'm suggesting doing something at the device model level. --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl7zICMACgkQJNaLcl1U h9Ca2Af/csONj6LtRsNrXjMLjw4BGVBnwP/tZBvSxig6MizM80Yd7HzvQiUWDAQW opLo3gkpbl+73elKt2hSf5gktte6pl5jBepYzqd54u71xWQ6bZE4U3ONtKN2Q7eb b2CIxsthUl15y6Y+spJAGYjqB7+3JSU4j60NpuRAnH25gsxkJyokoyDQNwz3/itl CJcvpaKru9uCPKXfk960C6SkRpX0kNfFc3yBm7yFTIMeiicFei9o/qdEBzqaRC/8 Plrsjw9hilHtWP4/3AhHXk98OGzuTzYSS78XVYRGBC58Wj7IDO+ytY5mCR7mZdtg gZPYYA7XHRNX3252/FCJO39GTfJMCg== =ttw3 -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT--