Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp250312rdb; Thu, 2 Nov 2023 02:34:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhdHcyOsXtLyMl4m9CAB0HtMNCyzXTm6yUnR9sMEAui/AK0aoFVZ9Syopw5KARctP26rJN X-Received: by 2002:a05:6a20:8e08:b0:17b:62af:e63 with SMTP id y8-20020a056a208e0800b0017b62af0e63mr22880282pzj.31.1698917678638; Thu, 02 Nov 2023 02:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698917678; cv=none; d=google.com; s=arc-20160816; b=WzeMkpYyNJ6Pvrfskli4XAapVGAOmSAyuVuAvGqH/eYLwQ49wMHQnatIMhUREuDlOs XOESaMOy50kpJssqWJAna3B4eI4O5u04IW+TatePKKdSsXue6Gi+yTzFPchd+twxaWGj lsbOF3Qz6XcpBcAjWWmImqKWKiM4RAcyBOF4OqApAs6XbchkfKSwwdJCFNyD/oIrHh2R 2xP2txTS3zxDjlImXEIgLiLBaPwZ/1H5pDvW68N4yVAiwuOAewyWzr3WeOh81pV3iNaU HuOU1YEdJyoNYSKpubzsr3bHNNE7TMiVWOBEDfHLjyoR6NQejPp+ipD7SRKv3EEI38Nd 02yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=RRqMBhNNsG2GgDNN4qWp+wu4mNgU5riKYWQ5XI3db/A=; fh=JGVQsZfSEHNttj79NguJML9oxp5zz6OSanVscY4gjIQ=; b=FU4um6I2N6cbdTBiME6F2a8XiB8juUiBj0Y1HjRg161zTlJLsOPDmR5Jau237gxMXy 7jr7V9iPMkaueEvo6Sq86dwDwQZaw1wqOuzdCZiaN7Kjvu6eSxctwFF2y96KpPoxf5sI 7tB124oa+cVwnefHMN5EkwTxGLLqLHbPt+mpMij0VWA9PyR79/JFASGA8CtuAYta/Kc6 g6XsAbRCesZ9+irEO1u+ghaX7VeNbcgMTkA5ZLL85xJ/hE5P4T328WDX3IAk9XWrSpBF 3yx89tG8vzYbvDq+OjmV73q/lxUmZjr0ZaUVb6gpepxnGbhMtCgeS1DhmfUa3V6lCMDm H/pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYR7byUY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id mm18-20020a17090b359200b0027cde38c731si2386159pjb.17.2023.11.02.02.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 02:34:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYR7byUY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3FFA7801B3B9; Thu, 2 Nov 2023 02:34:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345474AbjKBJea (ORCPT + 99 others); Thu, 2 Nov 2023 05:34:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjKBJe2 (ORCPT ); Thu, 2 Nov 2023 05:34:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 307EB123 for ; Thu, 2 Nov 2023 02:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698917623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RRqMBhNNsG2GgDNN4qWp+wu4mNgU5riKYWQ5XI3db/A=; b=VYR7byUYoilFUXGCDM3VkHfEqOeP/63nalHG9vkJ6HVpYGmdTBwre56G3GpNFJY5Z/g1wZ Jn5ezhOyVgppRK56lBSLum3Vsv1ivk8NJP6RBR2OxHPxR8/eA1wIo9TzDl75VDquSdEPkd 7i+DYvgcKdgQHiOEjcIEK3Ooy83Rf28= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-513-sOBnofkDPbK6Tv3fneYlMQ-1; Thu, 02 Nov 2023 05:33:41 -0400 X-MC-Unique: sOBnofkDPbK6Tv3fneYlMQ-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-507b0270b7fso677198e87.3 for ; Thu, 02 Nov 2023 02:33:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698917620; x=1699522420; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RRqMBhNNsG2GgDNN4qWp+wu4mNgU5riKYWQ5XI3db/A=; b=eF7YdOQ7SA8RPBPGa21gqxEtSD2OKr5mcmuDNFBPdKE8myOUDkGNKO6G2Z/PNYCRjs yk68+IMNMjG8DU2umZJ0Pqf2MAzN14yj/2pl0os7v+kKnMcSumFVnCBabtyqz9N/GzyC KRqKsXLEY47APQox2lWRadezfp1LfRz1zuWzsKWAAuzIFSlaMwBUY0oLqT2N8TwmE+gX wTPWc6Q/dhX7ytsRzo0PgHBjF/s7IjM0fTz34GgmEMBT8Ffr7AO5j90oVduvp/1TD5dB rWnHsB/k6F3LeskTYU4SxpSSaiBdn20V95BLLXGr45weIF2o+CrDXU85QPMnLLadYUud st9Q== X-Gm-Message-State: AOJu0YwOE8aitlzlDiM3bcl/2AhUzrBJq4ZEdjvdGPwZAU9vNEzNQaOP tFOzvgOYGZDUedvdwALwuq+7EpNf2tHKAHJhJEsWEuQP9Vbj0bbw8mQuLklPYybgdwHlnsDzR2L 5Zwj3bzzZce6SF0cXGgN6Forr X-Received: by 2002:a2e:9b0b:0:b0:2b9:36d5:729c with SMTP id u11-20020a2e9b0b000000b002b936d5729cmr15014342lji.47.1698917620033; Thu, 02 Nov 2023 02:33:40 -0700 (PDT) X-Received: by 2002:a2e:9b0b:0:b0:2b9:36d5:729c with SMTP id u11-20020a2e9b0b000000b002b936d5729cmr15014322lji.47.1698917619716; Thu, 02 Nov 2023 02:33:39 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id f9-20020a05600c154900b00407460234f9sm2208669wmg.21.2023.11.02.02.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 02:33:39 -0700 (PDT) From: Javier Martinez Canillas To: Mark Brown , Manivannan Sadhasivam Cc: linux-kernel@vger.kernel.org, Jonathan Corbet , Liam Girdwood , "Paul E. McKenney" , "Rafael J. Wysocki" , Randy Dunlap , "Steven Rostedt (Google)" , Tejun Heo , linux-doc@vger.kernel.org Subject: Re: [PATCH] regulator: core: Add option to prevent disabling unused regulators In-Reply-To: References: <20231028102423.179400-1-javierm@redhat.com> <20231101045652.GA2897@thinkpad> Date: Thu, 02 Nov 2023 10:33:38 +0100 Message-ID: <875y2kh53h.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 02 Nov 2023 02:34:36 -0700 (PDT) Mark Brown writes: > On Wed, Nov 01, 2023 at 10:26:52AM +0530, Manivannan Sadhasivam wrote: > >> On the other note, I'm wondering if we could use sync_state() for handling the >> regulator_init_complete() work. This would ensure that the regulators are only >> disabled when all the consumers are probed. > > That assumes that everything defined in the DT both has a driver and has > the driver available for the currently running kernel neither of which > is a good assumption. Agreed. I believe the current logic of disabling all regulators using a workqueue is the correct thing to do. The only better option I think is to make user-space notify the kernel that it won't load kernel modules anymore. But the delayed work would sill be needed, since the kernel can't make an assumption on whether user-space will notify of this or not. -- Best regards, Javier Martinez Canillas Core Platforms Red Hat