From nobody Fri Sep 20 15:17:51 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98082EB64DC for ; Fri, 21 Jul 2023 08:08:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231428AbjGUIIX (ORCPT ); Fri, 21 Jul 2023 04:08:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231362AbjGUIIM (ORCPT ); Fri, 21 Jul 2023 04:08:12 -0400 Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDD982D50 for ; Fri, 21 Jul 2023 01:08:10 -0700 (PDT) Received: by mail-vk1-xa2a.google.com with SMTP id 71dfb90a1353d-4814505ddbbso732160e0c.0 for ; Fri, 21 Jul 2023 01:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689926890; x=1690531690; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VIWYt/VUR+LWe3Ym6ggQYemB73LQMpv4Ia87+08eNu8=; b=mOqIIVg9BcpADuYEnhsJwNphrOGgsZ/jx0kH+3BSYoXkYKZWwTzoWjv28ReLmi9Hp5 fu1Wwau6EMEiARv3e8CYbk+7qFAmYEI57cpZWbaGQn+h1+V3JoGukF52RG5fy7ltxenJ O1SF2oZuyLhxYpQ0yxCuGKxdEvMBZ1CGPiaN8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689926890; x=1690531690; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VIWYt/VUR+LWe3Ym6ggQYemB73LQMpv4Ia87+08eNu8=; b=cn+MtFNOpVJUDm3ulTAofLMQhQFzmL3TjMVCDUmXz01nkuzIi7gzDrNxcvS5Tli6GC 2zgrs1TVTlRJbonCIUOYw3jCgvHPp1JLeIMvBqJg1wavchpxIZqbTO9nb+G/aCwSw384 62WFcNs0AKuFl+1NbiuhuOaVOWQtdFuaUL82khse4kpUmizVlOrxYeQgsX7aJ8jVd9Oo yB/qUbkesVRKwYz4C9QBpOLGgB31bLAnMX+7apS9COyxRsYgg41Qftr1jhZ0hQGP+Dbe 2qugG+UkqxyKU88Ww91vWbU0lbgXtyeqzoeudRPbQ04ghXqZjCIQMPWOOEnaWMv5QuZN 5pyA== X-Gm-Message-State: ABy/qLaetDInG7n1/I+ZoKZG5omjCHRoyWXtXKsbTSpD9oJnos0QYGME yzklm+QRTXWSZKKD5PWC9eqtcA== X-Google-Smtp-Source: APBJJlEC5hPJcYbZ0l3QzrR9QVptQ1VIfzlcV+K0dtYmvtmyBtq4fo5SPB+MiPVbfac4ByQiUkzN+Q== X-Received: by 2002:a1f:3fc9:0:b0:471:cea:3d62 with SMTP id m192-20020a1f3fc9000000b004710cea3d62mr698570vka.2.1689926890023; Fri, 21 Jul 2023 01:08:10 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:6d86:d21:714:abab]) by smtp.gmail.com with ESMTPSA id o10-20020a170902bcca00b001b850c9af71sm2740294pls.285.2023.07.21.01.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 01:08:09 -0700 (PDT) From: Chen-Yu Tsai To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mark Brown , Liam Girdwood , Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/7] regulator: mt6358: Sync VCN33_* enable status after checking ID Date: Fri, 21 Jul 2023 16:07:43 +0800 Message-ID: <20230721080751.2012318-3-wenst@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230721080751.2012318-1-wenst@chromium.org> References: <20230721080751.2012318-1-wenst@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Syncing VCN33_* enable status should be done after checking the PMIC's ID, to avoid setting random bits on other PMICs. Suggested-by: AngeloGioacchino Del Regno Fixes: 65bae54e08c1 ("regulator: mt6358: Merge VCN33_* regulators") Signed-off-by: Chen-Yu Tsai --- drivers/regulator/mt6358-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt635= 8-regulator.c index 31a16fb28ecd..da6b40f947c4 100644 --- a/drivers/regulator/mt6358-regulator.c +++ b/drivers/regulator/mt6358-regulator.c @@ -676,10 +676,6 @@ static int mt6358_regulator_probe(struct platform_devi= ce *pdev) const struct mt6358_regulator_info *mt6358_info; int i, max_regulator, ret; =20 - ret =3D mt6358_sync_vcn33_setting(&pdev->dev); - if (ret) - return ret; - if (mt6397->chip_id =3D=3D MT6366_CHIP_ID) { max_regulator =3D MT6366_MAX_REGULATOR; mt6358_info =3D mt6366_regulators; @@ -688,6 +684,10 @@ static int mt6358_regulator_probe(struct platform_devi= ce *pdev) mt6358_info =3D mt6358_regulators; } =20 + ret =3D mt6358_sync_vcn33_setting(&pdev->dev); + if (ret) + return ret; + for (i =3D 0; i < max_regulator; i++) { config.dev =3D &pdev->dev; config.regmap =3D mt6397->regmap; --=20 2.41.0.487.g6d72f3e995-goog