Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6949767rwb; Tue, 15 Nov 2022 05:56:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf6svZtkjIA6GEszpP3vNGG5qFpcVHrS3Se2kbAz9MjMnCfCSEn1yIVD0UjwXVYvUYOBJn5o X-Received: by 2002:a17:90a:5a82:b0:20d:4173:faf9 with SMTP id n2-20020a17090a5a8200b0020d4173faf9mr639772pji.147.1668520572992; Tue, 15 Nov 2022 05:56:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668520572; cv=none; d=google.com; s=arc-20160816; b=y/3Wozw9ax/WcRAZbdrIg9CeMLBriF49i38wMc90ilmRO817Dqf7WI5UwfyF3RuM6R uxoCTXZilqAEyOmncBzO9JN4aYxlOvYjx5ffGhOyq3Ug+2CnaddOL2/HToeVKe+jWdNu e9BScfj6XE662K1jgVQ+NgsncRkeQ4NaDrsZYz8x+AIYD6PlgNDbkEDifVi9ZfVOqJ2q XuZTLIq0+cTNO/m3G0U8nm4LbJKnlUD194k6NYW5P3BLs4+/XsGbXBaagTo2q0D/1NMk sFsNnw0arS7BeKSrPYkoVZZ5YqnKew6zSMfec9nP9KBkvR1IwH3prtpKsEe3PW1rf7TW MTnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=g1iudGydG7aJ//r1cD+24YDDJDUMwVZ9P78R6YNPIw4=; b=K3zWgsHy/RRpIEzSUsormhs6WRv88/pwd+jZSdcUZQzMK8VDu/d3ha13vksgdwz3Rn 80pW78/mpRF4pC0Idse/WokYfAryZ9+v8T80m1K5XO7WYZH3ZVlhtAT6qfI+8p25jXu+ QBw3/NMC/yCO+St4b5pgP6pVDTdJ3tOT8QljsmpPPvQRX7h0TKAnT5kkB/mC7ghPJ3Ft VOxKWLKVRvZgogNjP5S/RQd3YlSHeGeI6Z8DKxndbVHTGm4DsQIE5kZcW8/z9qx1hpj1 rpR37IrVwPZ9KVM1jLzWJZxiswm69IReGbAoghAknkzqLanMr9alYZ7Fy67HgKoEeLnB VTCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=1dQmz6sS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u70-20020a638549000000b0046f583c8c4asi12513837pgd.315.2022.11.15.05.55.50; Tue, 15 Nov 2022 05:56:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=1dQmz6sS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238545AbiKONu0 (ORCPT + 89 others); Tue, 15 Nov 2022 08:50:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238487AbiKONuF (ORCPT ); Tue, 15 Nov 2022 08:50:05 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 169292AC69; Tue, 15 Nov 2022 05:49:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=g1iudGydG7aJ//r1cD+24YDDJDUMwVZ9P78R6YNPIw4=; b=1dQmz6sSEGUQhr7NS/wucU+aoJ 3jf+Gga+KmC8oDuZCZk7wjsVhtegfCdydax6o3wMn5hidfk8eTm28B7ZjQQ93o0OfrHRHGTVFlwDl y3+AeyuEiwj9g7iNfd9pl/YfNULltX6iGnZQ4KUH/nL55p0ZoycD4FCT+8rQkcpDisEM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ouwJ7-002Ss3-BC; Tue, 15 Nov 2022 14:48:57 +0100 Date: Tue, 15 Nov 2022 14:48:57 +0100 From: Andrew Lunn To: Mark Brown Cc: "Russell King (Oracle)" , Corentin LABBE , calvin.johnson@oss.nxp.com, davem@davemloft.net, edumazet@google.com, hkallweit1@gmail.com, jernej.skrabec@gmail.com, krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org, lgirdwood@gmail.com, pabeni@redhat.com, robh+dt@kernel.org, samuel@sholland.org, wens@csie.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, netdev@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all Message-ID: References: <20221115073603.3425396-1-clabbe@baylibre.com> <20221115073603.3425396-2-clabbe@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 On Tue, Nov 15, 2022 at 11:16:53AM +0000, Mark Brown wrote: > On Tue, Nov 15, 2022 at 10:42:50AM +0000, Russell King (Oracle) wrote: > > On Tue, Nov 15, 2022 at 10:34:41AM +0000, Mark Brown wrote: > > > > Well, it's not making this maintainer happy :/ If we know what > > > PHY is there why not just look up the set of supplies based on > > > the compatible of the PHY? > > > It looks to me like this series fetches the regulators before the PHY > > is bound to the driver, so what you're proposing would mean that the > > core PHY code would need a table of all compatibles (which is pretty > > hard to do, they encode the vendor/device ID, not some descriptive > > name) and then a list of the regulator names. IMHO that doesn't scale. > > Oh, PHYs have interesting enough drivers to dynamically load > here? Yes. And you sometimes have the chicken/egg problem that you don't know what PHY it is until you have turned its regulators on and you can talk to it. So the PHY code will poke around in the DT description, and turn on the regulator before enumerating the bus. Andrew