From patchwork Tue Sep 26 04:34:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 13398655 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09DC5E8181B for ; Tue, 26 Sep 2023 04:40:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hR8bNAhJR0QDAtQsu3MMTKKNduG6qMnllcJXO9yMqpg=; b=Etl3TX5fcTAo97 eaWP8vwMfmdDyQra20PdNqlVOl4Todcml4j2GNCkyRPNz27v/3oRBh/O3LfNTNtgC8yUX6t4BhK+/ pduV2ZALPEoeXXMQN0cshezKUCUoaZJYT5IcJDS9S6g0ltSwoylWCq0JvRIl502Xlx2bqQNQyLpR3 1wQS2b5lqWDQra7Zd+q0f7HXbMmD7oaXOnSvwueHX5A3dFxYVOAxF82mGsu8/Py7n4cwZK+9uA9sf hFkmWIzQVuoPuRUkOHDvd6/84urg8Us+HoLB54iHcK/0QrKE4h9Lzs8yFDt7dyvP9+XrFF8J7xLDp obh+Aa0WJSkG7e6W7SFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qkzrs-00FZBv-1T; Tue, 26 Sep 2023 04:40:16 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qkzrp-00FZ9f-1i for linux-arm-kernel@lists.infradead.org; Tue, 26 Sep 2023 04:40:15 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3add37de892so3999709b6e.1 for ; Mon, 25 Sep 2023 21:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695703210; x=1696308010; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3E1i8LSIOlwTyuk1XAeWZA24GferWyjzighda7xVvfs=; b=cmg7zdlMRWeSuQB1hWvZ3lyjbujjlVoOu8/4+tOywvX0BiviUUuDYQCMuCJoP9CUhI cttVXT7+bEuC3J7cl2QAZ8RXWvQB7gw03FIZ0dVv/nLYCayJY0WpexqfN+9ON/KJQsPB ZDgr741xa20iDDvI+EBErDm941j5hYlD83cMw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695703210; x=1696308010; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3E1i8LSIOlwTyuk1XAeWZA24GferWyjzighda7xVvfs=; b=xCQKeiW0lPwp8dnSmeV9xaQcnOdEqsaRFA2oWgHGzlS6a4ALTt2oBewdik13jLjNZB 50Wrf7UmcFxtn7G5wN9r7XUG6OxbjjzV4GngMt7y5DX9WjqZ/UNqGfB8QWlzY6AGHE4X AVPOC3dBh/0xgboJ0imw3NDitcatMJcHphpjaIuPLKIA+NMshF+XZnQYS4iLhCO+HY4e PMKn3OPwWz2vpLQOQiUKWoOgIJBQGURduZLSURY7JtXljKSp94B9D5O0Z5d6V6u0J14v 9S+ElpNIV+OyHEgg6CEwbkC5a8psbanmDHHCZKtzG7CE5NtD1rbXpYsxS0F588dqHX06 jycg== X-Gm-Message-State: AOJu0YzLTjJGRT0Lqi4NLjVF1dz4JoCFAp/d3TdbnN6MN4qVR5kjakVS z249t0U2/SesQFs5P8SMlKT9bw== X-Google-Smtp-Source: AGHT+IE1o3rIsLU2bGltTLnHyrko+WsamuoFNkx5JhLKgydhfKe82ipsXYX70K9cDmuDGQev2xoeMA== X-Received: by 2002:a05:6808:8f9:b0:3a7:6213:6897 with SMTP id d25-20020a05680808f900b003a762136897mr8120224oic.11.1695703210209; Mon, 25 Sep 2023 21:40:10 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:ba86:87c4:df1a:be60]) by smtp.gmail.com with ESMTPSA id p11-20020a63ab0b000000b00563590be25esm8667210pgf.29.2023.09.25.21.40.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 21:40:09 -0700 (PDT) From: Chen-Yu Tsai To: Mark Brown Cc: Chen-Yu Tsai , Lee Jones , Matthias Brugger , AngeloGioacchino Del Regno , Zhiyong Tao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH RESEND v3 0/3] regulator: mt6358: Remove bogus regulators and improvements Date: Tue, 26 Sep 2023 12:34:45 +0800 Message-ID: <20230926043450.2353320-1-wenst@chromium.org> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230925_214013_590486_57083098 X-CRM114-Status: GOOD ( 18.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This seems to have fallen through the cracks, so I'm resending with tags collected and patches rebased onto next-20230925. The diffs remain the same. This is v3 of the remainder of the MT6358 regulator driver cleanup and improvement series. v1 can be found here [1]; v2 is here [2]. Changes since v2: - Merged patches dropped - Fixed up pickable linear ranges' selector values - Collected tags - Patch adding missing regulator definitions squashed into patch using the definitions; recommended by Krzysztof on my MT6366 series. - Remaining dts patch split out to be sent separately Changes since v1: - Merged patches dropped - Added patch to move VCN33 regulator status sync after ID check - Added patch to fix VCN33 sync fail error message - Added patch to add missing register definitions Various discrepancies were found while preparing to upstream MT8186 device trees, which utilize the MT6366 PMIC, that is also covered by this driver. This v3 series can be seen as two parts. v1 had three parts, but one part was fully merged, and then v2 gained another cleanup. v3 drops the "fixing bogus regulators" part: driver changes are fully merged and device tree change has been sent separately [3]. All patches here should go through the regulator tree. Part 1 - Robust chip ID checking (patch 1) Angelo suggested making the driver fail to probe if an unexpected chip ID was found. Patch 1 implements this. Part 2 - Output voltage fine tuning support (patches 2, 3) Many of the LDOs on these PMIC support an extra level of output voltage fine tuning. Most default to no offset, but a couple have a non-zero offset by default. Previously this was unaccounted for in the driver and device tree constraints. On the outputs with non-zero offset, this ends up becoming a discrepancy between the device tree and actual hardware. These two patches adds support for this second level of tuning, modeled as bunch of linear ranges. While it's unlikely we need this level of control, it's nice to be able to read back the accurate hardware settings. The series has been reviewed, and the mfd header change has been acked by Lee. Please merge. Thanks ChenYu [1] https://lore.kernel.org/linux-arm-kernel/20230609083009.2822259-1-wenst@chromium.org/ [2] https://lore.kernel.org/linux-mediatek/20230721082903.2038975-1-wenst@chromium.org/ [3] https://lore.kernel.org/linux-mediatek/20230913084457.1638690-1-wenst@chromium.org/ Chen-Yu Tsai (3): regulator: mt6358: Fail probe on unknown chip ID regulator: mt6358: Add output voltage fine tuning to fixed regulators regulator: mt6358: Add output voltage fine tuning to variable LDOs drivers/regulator/mt6358-regulator.c | 304 ++++++++++++--------------- include/linux/mfd/mt6358/registers.h | 6 + 2 files changed, 144 insertions(+), 166 deletions(-)