From patchwork Fri Jun 2 06:24:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Nyekjaer X-Patchwork-Id: 102327 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp833045vqr; Thu, 1 Jun 2023 23:41:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43k0VLlNUj4DlEElVl/qrEsHdrBQ3yVTogLggSK9zIo9mVeVzxr+glRJgTB61VzsOZHVdw X-Received: by 2002:a05:622a:1ca:b0:3ef:6577:7f90 with SMTP id t10-20020a05622a01ca00b003ef65777f90mr15355152qtw.26.1685688104171; Thu, 01 Jun 2023 23:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685688104; cv=none; d=google.com; s=arc-20160816; b=mSfx+cd8R3zJPvjci/qbPJdEvh8OAKupkP8LvMjyob/TbKXm8Lrd0kiyphbvn2RrRB UgFnSA0EYyqhFZdnP8dr81tGezFreHqhl6/3h3C+cRaF3cQXlZkHNvWrzsnYUtf+UdQG 1zcExMceMV6ILnksjDpNGiflFaadu7T+USX/70deHHXSRPX9PSqi5ZbsS9Dpoes1Hpy7 9J/2pBVN9Br7CvXSWjEG16UuqSVGBpoYcx3jupNW+mFDFxCCEZNbO7hyHXAmJPvRWM6c FZ7HB59fqxjKX6FYHHrSb+AG+dAdzMouQa3qa62Uu1OTWsE61GpuG1ZV5o9xrnqdTEoA raSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/Wt3FAz+QMdyWFgCq6hzT7xcxzyac+Un/+XRumxejUc=; b=nUJrhYnL7WUPXsLN0Cy5nnSnu7A/UIwHig95zR9MIWGfg9KJAKxlniRg3DrvdUFJC5 bv23I1whlAsHFMo/RTTXvvCOL5IO+jXTNMW4wks//FkKUZEnFkU8Bt/E0FOYlw2sIqJx +qppxbqm+Q3U04c7JlK5JEQGkFAkCUBcJQu8CuyxT80+h4mv7WYxNVmZDvAYumexEjGe XdxHpmxKUoMe/hHXAJTxzobfcF+opx0Rbkr1muO7F0k3L1R8RoZbb7Qrq9T4wQVlMMXJ KU1C6r6ghTjwCbiYdoUdSRJdsYVHSskYeiuL2F7a//XL18Agwc8kYdTMnMkNOGNYFvz4 xxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=sfkVhOfz; 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=geanix.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020a65480b000000b0051b1241624esi529949pgs.65.2023.06.01.23.41.29; Thu, 01 Jun 2023 23:41:44 -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=@geanix.com header.s=default2211 header.b=sfkVhOfz; 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=geanix.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233609AbjFBGZK (ORCPT + 99 others); Fri, 2 Jun 2023 02:25:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232000AbjFBGZI (ORCPT ); Fri, 2 Jun 2023 02:25:08 -0400 Received: from www530.your-server.de (www530.your-server.de [188.40.30.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5794FE7 for ; Thu, 1 Jun 2023 23:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=geanix.com; s=default2211; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=/Wt3FAz+QMdyWFgCq6hzT7xcxzyac+Un/+XRumxejUc=; b=sfkVhOfzP62qGMqGIMeruVTmIv poJapgW4vvSwGjLaobeJ6o3LPC9nf9BWZmEyLLGcendfpGIQ1gmjVklwUPEAQeOkvAdU2f6ruVPfe 5FpEhwA+qJmkzSlLDE5HakUAtME5RG6QIXttWo39EEFund7GMBldSDbuisaQm71nhgZSZkpaBAWXe YNisiTPwjlzOq0uSpAESP4D3it/I8N9l+Hwudpgb8ZMV3O5mpYEclv2ofLVmeYTOca1qmcvnL2S9L 18RzwU/w+7QmcgmP6sS0tOQFkbcglHbOqjf7KtaCk0FiZslU//RbK8zCE1r93tRyT6fz57CDoe59j xNR0b5lw==; Received: from sslproxy02.your-server.de ([78.47.166.47]) by www530.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q4yDg-000Ett-EG; Fri, 02 Jun 2023 08:25:04 +0200 Received: from [185.17.218.86] (helo=zen..) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q4yDg-000Nkl-6b; Fri, 02 Jun 2023 08:25:04 +0200 From: Sean Nyekjaer To: krzysztof.kozlowski@linaro.org, conor@kernel.org, lee@kernel.org, linux-kernel@vger.kernel.org Cc: Sean Nyekjaer Subject: [PATCH v3 1/2] mfd: stpmic1: fixup main control register and bits naming Date: Fri, 2 Jun 2023 08:24:25 +0200 Message-Id: <20230602062426.3947116-1-sean@geanix.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Authenticated-Sender: sean@geanix.com X-Virus-Scanned: Clear (ClamAV 0.103.8/26925/Thu Jun 1 09:27:46 2023) 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_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767572089381667926?= X-GMAIL-MSGID: =?utf-8?q?1767572089381667926?= Fixup main control register and bits naming so the match the naming from the datasheet. https://www.st.com/resource/en/datasheet/stpmic1.pdf Signed-off-by: Sean Nyekjaer Reviewed-by: Lee Jones --- Changes since v1: - None Changes since v2: - None drivers/mfd/stpmic1.c | 4 ++-- include/linux/mfd/stpmic1.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mfd/stpmic1.c b/drivers/mfd/stpmic1.c index 8db1530d9bac..4c9b18d9dec8 100644 --- a/drivers/mfd/stpmic1.c +++ b/drivers/mfd/stpmic1.c @@ -19,7 +19,7 @@ static const struct regmap_range stpmic1_readable_ranges[] = { regmap_reg_range(TURN_ON_SR, VERSION_SR), - regmap_reg_range(SWOFF_PWRCTRL_CR, LDO6_STDBY_CR), + regmap_reg_range(MAIN_CR, LDO6_STDBY_CR), regmap_reg_range(BST_SW_CR, BST_SW_CR), regmap_reg_range(INT_PENDING_R1, INT_PENDING_R4), regmap_reg_range(INT_CLEAR_R1, INT_CLEAR_R4), @@ -30,7 +30,7 @@ static const struct regmap_range stpmic1_readable_ranges[] = { }; static const struct regmap_range stpmic1_writeable_ranges[] = { - regmap_reg_range(SWOFF_PWRCTRL_CR, LDO6_STDBY_CR), + regmap_reg_range(MAIN_CR, LDO6_STDBY_CR), regmap_reg_range(BST_SW_CR, BST_SW_CR), regmap_reg_range(INT_CLEAR_R1, INT_CLEAR_R4), regmap_reg_range(INT_SET_MASK_R1, INT_SET_MASK_R4), diff --git a/include/linux/mfd/stpmic1.h b/include/linux/mfd/stpmic1.h index fa3f99f7e9a1..dc00bac24f5a 100644 --- a/include/linux/mfd/stpmic1.h +++ b/include/linux/mfd/stpmic1.h @@ -15,7 +15,7 @@ #define RREQ_STATE_SR 0x5 #define VERSION_SR 0x6 -#define SWOFF_PWRCTRL_CR 0x10 +#define MAIN_CR 0x10 #define PADS_PULL_CR 0x11 #define BUCKS_PD_CR 0x12 #define LDO14_PD_CR 0x13 @@ -148,14 +148,14 @@ #define LDO_BYPASS_MASK BIT(7) /* Main PMIC Control Register - * SWOFF_PWRCTRL_CR + * MAIN_CR * Address : 0x10 */ -#define ICC_EVENT_ENABLED BIT(4) +#define OCP_OFF_DBG BIT(4) #define PWRCTRL_POLARITY_HIGH BIT(3) -#define PWRCTRL_PIN_VALID BIT(2) -#define RESTART_REQUEST_ENABLED BIT(1) -#define SOFTWARE_SWITCH_OFF_ENABLED BIT(0) +#define PWRCTRL_ENABLE BIT(2) +#define RESTART_REQUEST_ENABLE BIT(1) +#define SOFTWARE_SWITCH_OFF BIT(0) /* Main PMIC PADS Control Register * PADS_PULL_CR