Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp867771imw; Thu, 14 Jul 2022 12:22:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRt1r2sc3/0jQz+X2/60VsnIwkq1DsVzZGbpJMD0d6JC+yk1G4tyIPktnEDnEfvuk5Cobg X-Received: by 2002:a05:6402:643:b0:43a:77a6:acd with SMTP id u3-20020a056402064300b0043a77a60acdmr14302931edx.173.1657826521145; Thu, 14 Jul 2022 12:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657826521; cv=none; d=google.com; s=arc-20160816; b=lpQ1bIQxXKoLENpnNGcVlzMVsh7QYcTtGwFStyvIFepXHo0PalriaYgWAfQABhUBzn 2Bha22DX7qN6ghNOeqWQ3dvz5Bfa0Jat3r/Ua0l8QHOqtZdJ+fyTNZ/7dPrSnreWvThY LA6jZYFY1ZXt9QB9/KtleZm292Aud6SGyWMG6RymwRMiVyUc1Ua1ZCDdIUwxzgBL0Foq TeMR3HGn00zShnEiqZRfsKUOoW4kuUZhXVtcodFkTh5eUnunvtCndoMjxmL4rI8ySDoz tIOAsmihjIH/qlgzK0e7AEvfPcdBS+Q2TtuxWH81jxjw1p82a1WIw/oK7RdveNNHJKaT tEhg== 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=/ug2UPgCJkGZUd3eex6JqeDleZ7+02+BMSb3Xz7COUc=; b=0vudGJBvTJDpxihiNr8XRrqLv64WodiIdLJFOBy/cEE5TzEVjRVjZqRkDoYgo/5XB4 Uqs+tP70CaTEIyjKN570kVyIXnwDI6sXzYapNR2eRUmOnjztdiNiJOqfp0EGAjhGlAIo N97za7d0txj30soaFd21TiBQiXjN9B/EPae7HEavM6Zxqmx/MZxSHtVWWobwpluuXymd wUok63EQI4gltr2yjFYW0hDQ197VZP2WmLkyIcAHKpE6oWa3557zeCT9J+gWLjlI0qs0 SwVPbXPIOWfUHZjoWiHNPdO3+GVta0s8oma8LHnqEfBqMl2dB9NdBe6e2WMUAnFMqQZ8 qZSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Io5jX6M9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a170906558a00b0072b3cd7beb8si2679622ejp.938.2022.07.14.12.21.36; Thu, 14 Jul 2022 12:22:01 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=Io5jX6M9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237741AbiGNTPf (ORCPT + 99 others); Thu, 14 Jul 2022 15:15:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiGNTPd (ORCPT ); Thu, 14 Jul 2022 15:15:33 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2005C2DA88 for ; Thu, 14 Jul 2022 12:15:32 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id h19-20020a9d6f93000000b0061c1ad77d5fso1901391otq.6 for ; Thu, 14 Jul 2022 12:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/ug2UPgCJkGZUd3eex6JqeDleZ7+02+BMSb3Xz7COUc=; b=Io5jX6M9weRAKZ/6bMrsI8c8J91V/f1tIOtj5YAO1fyr5fHIKqAq5YTdfPClmWJ9lG G+eccMYlKa2OjnFV35nGLX12gbdsyt1hS0MOywHfOUcsCsIHRfrjJ6nRJTM52/zu2oOL oRr6XqoYyR3dikXRM0G3vFyCIA/DyNcsCEHUr4m2d2exc1dypdcY8FWfQA65j4ryKjJw OzLZH/yynbmNCwURJvhAgf1aaOsHa3TqPoBVdUYfbkZUTbDEKEsAFPOIlViGMDP4Oik4 BRPPoGmhOEPw5LJkZ3pr7VpEgxyz7LRcYYzZ4Eg47fntv8AuTAlm/+Rd/su9T6a95OTG Fu9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/ug2UPgCJkGZUd3eex6JqeDleZ7+02+BMSb3Xz7COUc=; b=jaWn6e/jrOoSf5fCeVaABdWHWYRoN6TZanlmWkPf/437uZlC6tfbd3Fgn9kcvTAvml 6AsSyeMBma2ByVWAKx9+k97HL+LPI9tw6hisJs9r7RssS+OmAoswx7u63Dxvc7Hcd+Ji AgxRpymxC2qe9lJKGW6cxUygYoXSFnE/3ltdPCYRWwtD3TZsdNyFzEXvFizckPOR7kTQ fj3UULC+EoYkLAkMGegUlPet4fyYjUG3RteMWUVxGmniwYEEtM7flfUk/D0VB6K/AEf8 x+5kPqsJW7YTAObDZTLMCk5UuMAc2+nFqFxV671bPuQ9Fcls/LdAlPi+Y6g9MpbL51hb T1nw== X-Gm-Message-State: AJIora/fZuYqHalRVoAsMicfHUL7gY8JiU+NrpPtspc3MHC83QRns9O/ cuVWMalQp94DHMV/1XFrvt03ciyRAsRGc9yvyso= X-Received: by 2002:a05:6830:2645:b0:61c:5aad:632 with SMTP id f5-20020a056830264500b0061c5aad0632mr4012466otu.169.1657826131215; Thu, 14 Jul 2022 12:15:31 -0700 (PDT) MIME-Version: 1.0 References: <20220713124958.3094505-1-bbara93@gmail.com> In-Reply-To: From: Benjamin Bara Date: Thu, 14 Jul 2022 21:15:20 +0200 Message-ID: Subject: Re: [PATCH] regulator: da9063: disable unused voltage monitors To: DLG Adam Thomson Cc: "support.opensource@diasemi.com" , "lgirdwood@gmail.com" , "broonie@kernel.org" , "lee.jones@linaro.org" , "linux-kernel@vger.kernel.org" , Benjamin Bara , richard.leitner@linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 7/14/22 11:36, DLG Adam Thomson wrote: Thanks for the quick feedback. > What exactly is the problem you're attempting to resolve through this patch? I have some use cases where certain modules (e.g. audio) are not required. Therefore, I have removed a couple of "always-on" from my DT to let the kernel decide if the regulators are needed. Since unfortunately some of the later disabled LDOs are monitored, the state becomes invalid. > If you disable monitoring of a regulator, and no other regulators are being > monitored at that point, then GP_FB2 will no longer be asserted and you > have the same issue. Thanks for the clarification, I wasn't aware of that. It's clear to me now that this would become a general problem. > What's more this patch impacts all users and there's no means to re-enable > monitoring. I am aware that the patch is not complete to handle the whole voltage monitoring of the da9063. So if wanted, I can extend the patch to store the vmon state when disabling it and restore it during the re-enable process (can also take a look for the handling while sleep/suspend). best regards & thanks again, bb P.S. I checked if there is some existing kind of framework for voltage monitoring of regulators, but I couldn't find something so far. I can imagine it might make sense to have a DT property for "regulator-monitor-voltage-on/-off" to override the OTP settings via DT, but I am not sure if this is something that is needed/wanted/required.