From nobody Sat May 10 05:40:19 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1608077172; cv=none; d=zohomail.com; s=zohoarc; b=L7EKBq/BKQaJ3AN4NiqW7klhW/5C4rA95MeeqrgQs3luccHsjttiVez6lZx7NO4bLd80yHS+ZuC21U7aen7h2+4YbKDW/MwfRCx6B2NyPZCr78YxavE9VZVITxZKvDZnsovzDn09LMZ3gU+PdzHgRwjMI0Z3n+BgDGbnSw+oTOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608077172; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=FuWKBbuI2QrcYow2jw9wMk/c4blHSJRjjF++nhJIH+0=; b=TzUF6h2do0kBzAWGUZQlgMlnzer4qrZphbdYDjtdvcaZYPKsOTGwD6imKYtOFHMDewrMJMfoenWUAzNVHM0i4VU1vhRENRmVuS65hagKFpKUzQ09a5COO667XGsLovf874N1OHNmh1nTaljX/XCJgXazqACkdYRshqYPEgfG/rA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1608077172409692.498286501706; Tue, 15 Dec 2020 16:06:12 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726765AbgLPABP (ORCPT ); Tue, 15 Dec 2020 19:01:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbgLOX5l (ORCPT ); Tue, 15 Dec 2020 18:57:41 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C18F1C061793; Tue, 15 Dec 2020 15:57:00 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id w5so17756414wrm.11; Tue, 15 Dec 2020 15:57:00 -0800 (PST) Received: from adgra-XPS-15-9570.home (lfbn-idf1-1-1007-144.w86-238.abo.wanadoo.fr. [86.238.83.144]) by smtp.gmail.com with ESMTPSA id c10sm204160wrb.92.2020.12.15.15.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 15:56:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FuWKBbuI2QrcYow2jw9wMk/c4blHSJRjjF++nhJIH+0=; b=jVWCsPWQf7rWLMvDh8kIUGDNt8L32T1n9qGA+WLNP3W4n8CfNJt9aasD2fcI42DFA3 xE89PgsvQqXa0U6g9ohboEPzW0aU44+bqSZpwrYfaBXjKsMhIEvUK2AUKuuDmkr61i8Q JAXNfzjigowdOWuSTzbp6SK0H3dBfTaB/9I8S5Hsu6ZYUUaDV6AEh29w9wYC0J1U/j9c LsHU4v8NhfRwQSy5HB/rj0dfing/NNyjSkEFs7uC7y+WikHt1PavBtg+N8Dqk2Jb1XK7 zOYMLLZjuY+5OKi5HcTXeR2Nwj7aBGu0+Iw6CU+txeyq6IwxUFmKeAeOw/ZqwcX1mRxB OSZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FuWKBbuI2QrcYow2jw9wMk/c4blHSJRjjF++nhJIH+0=; b=swxKRYi9SL7tr6H14ilLzYasE4aBMWlZkJBVLbhzKI/gNVuOrUkcoJxBaDsniZ4+cd mJRWrEg0hOvnIyLvSUdI4XJcE15HLTrxLT4ZwTpHyoaWwiWe8kwCjsrRTEovyckiPpnd 6s1bpC4x74lHRHyDFwYflMIIbiqhjH8bKBJlKiPRPYeHihtK7tCj746UZuqT2DvlHUhE TTk7GBbpml2zD93pANAxZYop47LxQO0T7NYep14nw5rD3M+5zZMH5XfP8aDTmC7bIa1n k8mD5/y2RpT+/gFXqriI5uLqgUE1ufL0L9kvwaK0lDfIHF2xOvlIdn7FDlqJ3TodXev9 NILA== X-Gm-Message-State: AOAM532KYbb6n6R4EtNDE6E9oopzYTvQtjlhIoDurI0bL1tx6+E57n2s DQZh+JSOzS8rdEnOMBJ1lic= X-Google-Smtp-Source: ABdhPJwnQzvZbMTp7pMulecS34pOFMNYtngKhS0U0zjzspIo5p/ft0OZrl/87B/1VDeH34E+7Xgkpw== X-Received: by 2002:a5d:4a06:: with SMTP id m6mr37105151wrq.189.1608076619501; Tue, 15 Dec 2020 15:56:59 -0800 (PST) From: Adrien Grassein Cc: broonie@kernel.org, jagan@amarulasolutions.com, lgirdwood@gmail.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, troy.kisky@boundarydevices.com, Adrien Grassein Subject: [PATCH v2 1/7] regulator: dt-bindings: remove useless properties Date: Wed, 16 Dec 2020 00:56:33 +0100 Message-Id: <20201215235639.31516-2-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215235639.31516-1-adrien.grassein@gmail.com> References: <20201215235639.31516-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" regulator-name is a generic property of the regulator. Don't repeat it here. Signed-off-by: Adrien Grassein --- .../regulator/nxp,pf8x00-regulator.yaml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulat= or.yaml b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.= yaml index a6c259ce9785..913532d0532e 100644 --- a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml @@ -36,12 +36,6 @@ properties: description: Properties for single LDO regulator. =20 - properties: - regulator-name: - pattern: "^ldo[1-4]$" - description: - should be "ldo1", ..., "ldo4" - unevaluatedProperties: false =20 "^buck[1-7]$": @@ -51,11 +45,6 @@ properties: Properties for single BUCK regulator. =20 properties: - regulator-name: - pattern: "^buck[1-7]$" - description: - should be "buck1", ..., "buck7" - nxp,ilim-ma: $ref: "/schemas/types.yaml#/definitions/uint32" minimum: 2100 @@ -94,12 +83,6 @@ properties: description: Properties for single VSNVS regulator. =20 - properties: - regulator-name: - pattern: "^vsnvs$" - description: - should be "vsnvs" - unevaluatedProperties: false =20 additionalProperties: false --=20 2.20.1 From nobody Sat May 10 05:40:19 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1608077172; cv=none; d=zohomail.com; s=zohoarc; b=kqtR0BniCD2OCWgOpRszyq/BLt7i4iskl+/w55y41KSxQnmenMiU20dQ+ODuwxWxhutxeRpxdkgUta8NrxT+Sktigswhe+W4d1Nk79Sy5qNuwCBX1W3r6AifOp+w7oo15OHkQb6h7lkRMiFKfNd/gGOobe4Mnq00Xn4tp2nmSi4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608077172; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=+PwNZTg9LKWSdxdKsvEzj/MNEwX1EMlLrbEaIJnpo7o=; b=HTLmWGO+K325PArjy7qETsAgl6/zKEbTcOBwckcYGhnOPwb/G6V+karX6qMGaZdUd5/7/KL0IX9ejfrAtT5EUueBeR5cjcbvozD+xKxKHNSwjOf3Z2A4vaF2b1KfuXytpK698m6BDnGO0JIKSfgtiNPTwVbP1Xzxq1GmVFuaFK4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1608077172126359.5115312694594; Tue, 15 Dec 2020 16:06:12 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727778AbgLPABQ (ORCPT ); Tue, 15 Dec 2020 19:01:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbgLOX5u (ORCPT ); Tue, 15 Dec 2020 18:57:50 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7BF5C0613D3; Tue, 15 Dec 2020 15:57:09 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id y17so21469094wrr.10; Tue, 15 Dec 2020 15:57:09 -0800 (PST) Received: from adgra-XPS-15-9570.home (lfbn-idf1-1-1007-144.w86-238.abo.wanadoo.fr. [86.238.83.144]) by smtp.gmail.com with ESMTPSA id c10sm204160wrb.92.2020.12.15.15.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 15:57:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+PwNZTg9LKWSdxdKsvEzj/MNEwX1EMlLrbEaIJnpo7o=; b=P8yULOSUCS1hNrt1IF0H0hEmCw9Y3Fq1SOD3wDbGd+G7J20rundflaBIJOShHB7M9Z 4qru4LCz/69pBMpf+uOXyE16s/KEcr6ZWhQS02oeTXya1LjNeXMk330NY3lC08GzsW1A HwgNw98Fp3VR1UfWP6ysX7qv6lu2XOvqcm+/wt1cH1qTm+6JVPjxqFitfu3RhFsXAQn8 gaOOgo7GeRQ1KH5Wu7F/SDNjwbv/Web5dLJDPb8HCRSyRsxRSzonMka2VexKVZT3VqDr qWpH/S7WZLMVVaJ97zaqY78o1UVvy1aOo6jxVBOBUACTqex/Cb5XA1d5YPnMofvgvaex EDNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+PwNZTg9LKWSdxdKsvEzj/MNEwX1EMlLrbEaIJnpo7o=; b=Y8LtRgJMObfnxNZNUlIa5KAI3It7xRAdQ3fU8G7MoArJe5Na8rC6k/f1HY2caoosiT amF3Z17frptRN62b98svJ49raDeqas+SoG4oMsXdH9YaJabPZ9vEfDXh8pGAeWT2C0XM hjy2BOgJYWcGrlRP8mVg42buIURa23387A7pxM0WC2dLlbqbTdUwPuWS9I1SNIRQe8Er ms5vKiguqE6xBiMnhUJjPXppLb6kHDGrdlJ+unzY7jftoWOPlhjK/GLTozC4sR4Fl99i 15v0mfvstvSWuCm+ExljkvW3Ycgt1PvoKvSdJH5ENl4J3C+7i5Zdkje9b9xVkL2HxrfN 4hug== X-Gm-Message-State: AOAM533KpE/4Btfs+RMBMyFdqPHwNVaMAylP9auJpqXcR77//En+dpJs LVP6qgo7cm1TwUmN7oXrjn8= X-Google-Smtp-Source: ABdhPJyuC7lr1pGWXcEnDUcwWt5qbLChqyxbux0HocSSi1K14HODn7vYa5f3Qp4RS1RzxjqDpctSrg== X-Received: by 2002:adf:916e:: with SMTP id j101mr36041850wrj.55.1608076628675; Tue, 15 Dec 2020 15:57:08 -0800 (PST) From: Adrien Grassein Cc: broonie@kernel.org, jagan@amarulasolutions.com, lgirdwood@gmail.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, troy.kisky@boundarydevices.com, Adrien Grassein Subject: [PATCH v2 2/7] regulator: pf8x00: add a doc for the module Date: Wed, 16 Dec 2020 00:56:34 +0100 Message-Id: <20201215235639.31516-3-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215235639.31516-1-adrien.grassein@gmail.com> References: <20201215235639.31516-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" pf8x00 module build was not documented. Signed-off-by: Adrien Grassein --- drivers/regulator/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 53fa84f4d1e1..9c6508e99fdd 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -828,6 +828,10 @@ config REGULATOR_PF8X00 Say y here to support the regulators found on the NXP PF8100/PF8121A/PF8200 PMIC. =20 + Say M here if you want to support for the regulators found + on the NXP PF8100/PF8121A/PF8200 PMIC. The module will be named + "pf8x00-regulator". + config REGULATOR_PFUZE100 tristate "Freescale PFUZE100/200/3000/3001 regulator driver" depends on I2C && OF --=20 2.20.1 From nobody Sat May 10 05:40:19 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1608077171; cv=none; d=zohomail.com; s=zohoarc; b=k1wlOHamD7S6vFn5crlbLLpJBriHSCqDHIfSumrvuPgb0TnvEJpqYsWzrg7TJ4jZgpFNIO3eHtc2oJZzBx4bbOutTNKOo1BlCPwcGJ5U3zx/xrVPKVCZFNZ0eofFssOjDly3tIRdCkGQVCf6GCh2cc5dt5g2eQW/MnrF9eGQzQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608077171; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=9VTRHWDF/2KFgz+UyGUwNoRUZJFyka0YQ/YywpJD5p8=; b=WA2Cd3xeNrBOtlEe4i1I7iLBwz9ySVFSoBRvvAjCXpnuefYrpf/ifGgNoHaRqtC7lsMm+9L5bU8L41/XIWxTdDVmUK9v9XkGmxD5Rgy/TEGqGJ7eyXsre6VJdFPR/F1f8ifb2Bla9uRn/TQA6rZoTyQsi+2+ruLihSwQNLTPi/E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1608077171500590.069491251981; Tue, 15 Dec 2020 16:06:11 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727812AbgLPABU (ORCPT ); Tue, 15 Dec 2020 19:01:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbgLOX57 (ORCPT ); Tue, 15 Dec 2020 18:57:59 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 432CAC061794; Tue, 15 Dec 2020 15:57:19 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id g25so867152wmh.1; Tue, 15 Dec 2020 15:57:19 -0800 (PST) Received: from adgra-XPS-15-9570.home (lfbn-idf1-1-1007-144.w86-238.abo.wanadoo.fr. [86.238.83.144]) by smtp.gmail.com with ESMTPSA id c10sm204160wrb.92.2020.12.15.15.57.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 15:57:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9VTRHWDF/2KFgz+UyGUwNoRUZJFyka0YQ/YywpJD5p8=; b=dBA6fWPWMNAwgaevOTUZw8nmjr+yECDlOnqFLRrntM4nXNkH2WJggWqWxwJDVyIzoE BiIj3bvHoAoycxej5Kw3m9Zp4AJ5J0JYgkTWhdm9pJDLpYMaHWd4nOeqKmeY6Lat2EDU 8p42PoMbqxc5AmTVCIIOr6s6kCmrpWxGVCRb5kZVi4oSlLyPSaDQwL/oG2m22xScpMHR m4FJJ+PPoPVPIC20NxP8VQgWIjcQXnATiezxPm4zM0/gdfdRHbPkonwQK/BgiX+zrja9 dmW1QEV+dThWsisF4/9DR170hr4mRNRur+3O4DgunEJc+LHBXNDRWLC2Lv+nkJHxkBkM kv0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9VTRHWDF/2KFgz+UyGUwNoRUZJFyka0YQ/YywpJD5p8=; b=kdyyoa509Iywl0Pvy2NVbBgmg8Qd65Zdh2FoZzp1vLfl3kU11K1ARBCLZs5CxcvrfX JtDGqXrge7LIRoOqbuktsE+sLwSHiIAeqby4PQEoT2TOK7PVvS26W1yd2OaSSovgeElw xQIrMH8KbuZggmnC1TjgWDyzkVii4MB9nbuzjgXh3a+32tpOtqm/tdftA84RgdEFKa1s D3fFSDoYb3beEi9ZDyDZPQ66mLajZUTE26159+eXLvL9i1V2Eht+B0Y4KUYskrpw6rt3 glRR/ygrmb423hfxVwC3N9r8RXdupkjpSQsM8+VOUR36iQLPSTR7eusE2Z20JLWtERm2 cXTQ== X-Gm-Message-State: AOAM531WIo2I4iPCliL/mf8l0s6ef3Mi9XwE4Hhkf9pC0IpJvubY06nY gqTjVEJGT8K9qcqJWuLTf3Y= X-Google-Smtp-Source: ABdhPJyo9tc2O4SNvpKV6vYv7g3YRUn1zOLcY9RcMdiwSbpEsHkhWaEvLjOsJ2ocBu8oU08INFQ8iQ== X-Received: by 2002:a7b:c45a:: with SMTP id l26mr818996wmi.91.1608076638066; Tue, 15 Dec 2020 15:57:18 -0800 (PST) From: Adrien Grassein Cc: broonie@kernel.org, jagan@amarulasolutions.com, lgirdwood@gmail.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, troy.kisky@boundarydevices.com, Adrien Grassein Subject: [PATCH v2 3/7] regulator: dt-bindings: pf8x00: fix nxp,phase-shift doc Date: Wed, 16 Dec 2020 00:56:35 +0100 Message-Id: <20201215235639.31516-4-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215235639.31516-1-adrien.grassein@gmail.com> References: <20201215235639.31516-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" nxp,phase-shift is an enum so use enum format to describe it. Minimum and maximum values are also wrong. Signed-off-by: Adrien Grassein --- .../bindings/regulator/nxp,pf8x00-regulator.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulat= or.yaml b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.= yaml index 913532d0532e..1da724c6e2ba 100644 --- a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml @@ -60,21 +60,13 @@ properties: =20 nxp,phase-shift: $ref: "/schemas/types.yaml#/definitions/uint32" - minimum: 45 - maximum: 0 + minimum: 0 + maximum: 315 + default: 0 + enum: [ 0, 45, 90, 135, 180, 225, 270, 315 ] description: BUCK regulators phase shift control in degrees. =20 - Listed phase shift control values in degrees are, - 45 - 90 - 135 - 180 - 225 - 270 - 315 - 0 (default) - unevaluatedProperties: false =20 "^vsnvs$": --=20 2.20.1 From nobody Sat May 10 05:40:19 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1608077171; cv=none; d=zohomail.com; s=zohoarc; b=oIv1ULcOZltN22foSkcEKveA0TuZUy1d3Y/DULJpXONo9LbUMxK3iKm1b9Wj426xGoNxqCqd0yW+Wk2giXZc2BAa1SK4vqAfMxR+RjpQG3C2wM+pAoYSZm7/gtBwbcZFbGpPcloUGJsyMhFZVLKmup+YvkpcBaPBfUzVDLmiRkQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608077171; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=TciKQua1Ll9RQvAhc3Pu3lYA4PKfRl1aCeFwNLnQOrU=; b=FQ4S00I96HZNq9Qg35RqAZpzlAg3R4NkTHWj2k9Fldg1NH7BUGgTW0sGjM5qkWA8a2yJ3WCI83kGj2hBftPSelbmGY0ckeBSPNuTuEVOwkNgtcXA+dIV8nv3M1vRyurrO8Y5RelzPFZBWE4/kK/8hLcApwvndjhj1xFtfT2mpic= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1608077171775963.5551612119369; Tue, 15 Dec 2020 16:06:11 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726448AbgLPABX (ORCPT ); Tue, 15 Dec 2020 19:01:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgLOX6J (ORCPT ); Tue, 15 Dec 2020 18:58:09 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5390EC06179C; Tue, 15 Dec 2020 15:57:29 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id t30so3459540wrb.0; Tue, 15 Dec 2020 15:57:29 -0800 (PST) Received: from adgra-XPS-15-9570.home (lfbn-idf1-1-1007-144.w86-238.abo.wanadoo.fr. [86.238.83.144]) by smtp.gmail.com with ESMTPSA id c10sm204160wrb.92.2020.12.15.15.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 15:57:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TciKQua1Ll9RQvAhc3Pu3lYA4PKfRl1aCeFwNLnQOrU=; b=CQpphjHVGsUumCwFF8HB7mDqCrmu+QPfKA9AfwTy1xfXl/iwcO1c9oAchGL4VIz537 Wgw7ypZgH2k5ansowzl23Rx4whso2pfHEyVI51vVme6NqbDYpBN4v9cx/E4mjcJtqsdI jxfuEHD38Ic1K1wOsuqUhy9Dnbn8WIZdz/uk65+g0UtXZqBweETtbTfnke6v437aFXyb uZXtUh4ibF0kRcH9k5oKW+eEGg3wIAWI5pl6iQwAidvpiWtRiwjjt3HLb1ssFDDo2WMi vTRD9nU474w/SPcUXYGd2F3TIilhxQngrRAlEsRPBCrmyNyi0pGYDnIZouF7nTFqODhl t4BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TciKQua1Ll9RQvAhc3Pu3lYA4PKfRl1aCeFwNLnQOrU=; b=GOGfLWvMS1BFghTIz3g/G84SnUJTwZE3b0Hv6/85h7fAmORvwkhyqQh8gGLDm1cOXG OTY55vY9fpsw3aAB5IHSVShFHBasyP1IbR919E8LUfN0juSz4FAEl3anBkvqGntm3yP5 IP5zN4yw4qipZGvaZB9rL8POYxERKrxq9rYnRpVnzlJZZg7b8UWNc/msBnNPP2ySp1pg QD3Sb2A9DawspL+k4h3n/JOH3n2yFQcj8fFNUgtR5mSysTw2jdIO25LtRK0Lw8pnYHkY Aj8oo0dE9/ErIansCnEgB/9HCa/5KLMVEJcNKlzaYYIeoQUovah40gfzUf+YmxM2eJCE dTHQ== X-Gm-Message-State: AOAM5312JAuKHRZDAjuJGaWH4BvMdcrC8Bw0DcNQxkb5pTveDL/CIyYH e/BWASTGSOWvCxstRbu5loU= X-Google-Smtp-Source: ABdhPJxMdpWzM6SRfps3iMZSitaSDdNZDp8FYn/PxkHZ5S2BgDjZ3kIfiQbQcqZPHUpQCscJy29E0g== X-Received: by 2002:a5d:6106:: with SMTP id v6mr34967373wrt.173.1608076648116; Tue, 15 Dec 2020 15:57:28 -0800 (PST) From: Adrien Grassein Cc: broonie@kernel.org, jagan@amarulasolutions.com, lgirdwood@gmail.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, troy.kisky@boundarydevices.com, Adrien Grassein Subject: [PATCH v2 4/7] regulator: dt-bindings: pf8x00: remove nxp,ilim-ma property Date: Wed, 16 Dec 2020 00:56:36 +0100 Message-Id: <20201215235639.31516-5-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215235639.31516-1-adrien.grassein@gmail.com> References: <20201215235639.31516-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This property seems useless because we can use the regulator-max-microamp generic property to do the same and using generic code. The only things it changes is the default value. The original code was using "2100" (mA) as default one, but I think we should keep the value in the OTP memory as the default one. This value is automatically loaded in the register by the chip. Signed-off-by: Adrien Grassein --- .../bindings/regulator/nxp,pf8x00-regulator.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulat= or.yaml b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.= yaml index 1da724c6e2ba..b6ea3b8eb811 100644 --- a/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/nxp,pf8x00-regulator.yaml @@ -45,19 +45,6 @@ properties: Properties for single BUCK regulator. =20 properties: - nxp,ilim-ma: - $ref: "/schemas/types.yaml#/definitions/uint32" - minimum: 2100 - maximum: 4500 - description: - BUCK regulators current limit in mA. - - Listed current limits in mA are, - 2100 (default) - 2600 - 3000 - 4500 - nxp,phase-shift: $ref: "/schemas/types.yaml#/definitions/uint32" minimum: 0 --=20 2.20.1 From nobody Sat May 10 05:40:19 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1608077111; cv=none; d=zohomail.com; s=zohoarc; b=khdrzFVtkfqa4dGo/bcwFfKABnW3sCI3BFK4/p+rzFMOzTU1OMovnXewnC7iO+FUQzLoxNk0+hlo/MJn5v7GBIZrACb+IB8O+ikQVSHBnypDl8KJY2cVtaMuysO3Axvgqpg9RYQKXk1u61akfSuv2NATIrjlRpN3TR6MqJlwriY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608077111; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=lUHfgR7voTj/dWme2Hr2kocup9jTK1s5eob8kvVduFM=; b=AcP5UXAV/PEWzdWY3nf/8dTh3c+uOfMokSdjKuHvSP7b28iiCnpXe5ZzrsK3CDCr94lUp99zeuqgp6WiFGGxQ7lc5Z6Y7pqfWSvh6lxfrv09YKU3LxipIW7R3UtCwP5ag1IScZ/icX/i9wHrRuNX1m37EpAdaCJPZSptuoZtQoQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1608077111103603.2534782453262; Tue, 15 Dec 2020 16:05:11 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727908AbgLPAB1 (ORCPT ); Tue, 15 Dec 2020 19:01:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbgLOX6T (ORCPT ); Tue, 15 Dec 2020 18:58:19 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12786C0613D6; Tue, 15 Dec 2020 15:57:39 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id x22so762541wmc.5; Tue, 15 Dec 2020 15:57:39 -0800 (PST) Received: from adgra-XPS-15-9570.home (lfbn-idf1-1-1007-144.w86-238.abo.wanadoo.fr. [86.238.83.144]) by smtp.gmail.com with ESMTPSA id c10sm204160wrb.92.2020.12.15.15.57.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 15:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lUHfgR7voTj/dWme2Hr2kocup9jTK1s5eob8kvVduFM=; b=EbA3Cni/0LWI/iOO7rkoIy0R56+pzrbFeAbExCZv0MVhVjX/rqReGF0HCkkLrZfB00 rRgMz4aT3lTKhXcEJNk3lKdB4DNxMkRtISGq9Ha/SdBUIuEqrZVrd5d8ddsWMVTaVeVK 0GZZyUCV/SnvuQfjIMuos3mSe4rlB0D5LiOeAExjzpmnHRZiqcsuXbRU52zzd2vJMuB/ ah/DbcKM/5eKVdScl2Q18LQRPnLFAoBJLRc0yfqXo1oYnsPUvUCLoKQaHiWF5CQyVoG5 gGaxhDhjmEm0rQzDlpmCmpc5cLbC3it7jV3xR/03PqGW9CVgGBf5yKMr+jTiu4OAINoS 9gRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lUHfgR7voTj/dWme2Hr2kocup9jTK1s5eob8kvVduFM=; b=XMcY6vNlAL2Fnnaa7J0s6BT09SsMdZtDz5scqgEgRLwspNGqdhBsCDMNvNORosO58B Vxe0TmoeLXl8yVsdShQR6yNXv/UI0TVX0d0SIMybPnhDVIg5y0I0Lr+9Fe2A3Xcy1Jzo asmaJ/wAKcJkJxnqZX1xsIK9eR4kYP5+4HvJZPDCj4EUdiNCgBh8xJoOvIKfby/qAR5+ HlLn6DjWVJYuwq9YXPGbSlTUF2iM0/+TEUssJOdEQ9Z6mGXSkjuYDwlpn6YFOgPyZnPC nAfMUsrrJlNAylK+15vwhpQg8xhrSrSiGa0+0aYOM+4KxQRVKFIIDsuKzCXYXW7KMzAP bzEA== X-Gm-Message-State: AOAM5312MDMHzUrAp20N5BHKPrVW9WNsQAL++8EIuwAGuHu4BDn5cbqO bADNr8AHq9ilppWwHHoGcvs= X-Google-Smtp-Source: ABdhPJzHxbxs02Tkw8pcWFHP4iu4UsC8TM8EXrife0CTrKKm16IT/kfXIX2GoSCqUqXtoNZP7pAg0Q== X-Received: by 2002:a1c:4d12:: with SMTP id o18mr826335wmh.114.1608076657796; Tue, 15 Dec 2020 15:57:37 -0800 (PST) From: Adrien Grassein Cc: broonie@kernel.org, jagan@amarulasolutions.com, lgirdwood@gmail.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, troy.kisky@boundarydevices.com, Adrien Grassein Subject: [PATCH v2 5/7] regulator: pf8x00: remove nxp,ilim-ma property Date: Wed, 16 Dec 2020 00:56:37 +0100 Message-Id: <20201215235639.31516-6-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215235639.31516-1-adrien.grassein@gmail.com> References: <20201215235639.31516-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This property seems useless because we can use the regulator-max-microamp generic property to do the same and using generic code. The only things it changes is the default value. The original code was using "2100" (mA) as default one, but I think we should keep the value in the OTP memory as the default one. This value is automatically loaded in the register by the chip. Signed-off-by: Adrien Grassein --- drivers/regulator/pf8x00-regulator.c | 95 ++++++++++++++-------------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/drivers/regulator/pf8x00-regulator.c b/drivers/regulator/pf8x0= 0-regulator.c index 308c27fa6ea8..ebb0ef0745f1 100644 --- a/drivers/regulator/pf8x00-regulator.c +++ b/drivers/regulator/pf8x00-regulator.c @@ -105,13 +105,6 @@ enum pf8x00_ldo_states { }; #define PF8X00_LDO_BASE(i) (6 * (i - PF8X00_LDO1) + PF8X00_LDO1_CONFIG1) =20 -enum swxilim_bits { - SWXILIM_2100_MA, - SWXILIM_2600_MA, - SWXILIM_3000_MA, - SWXILIM_4500_MA, -}; -#define PF8X00_SWXILIM_SHIFT 3 #define PF8X00_SWXILIM_MASK GENMASK(4, 3) #define PF8X00_SWXPHASE_MASK GENMASK(2, 0) #define PF8X00_SWXPHASE_DEFAULT 0 @@ -128,7 +121,6 @@ enum pf8x00_devid { =20 struct pf8x00_regulator { struct regulator_desc desc; - u8 ilim; u8 phase_shift; }; =20 @@ -150,6 +142,11 @@ static const int pf8x00_ldo_voltages[] =3D { 3100000, 3150000, 3200000, 3300000, 3350000, 1650000, 1700000, 5000000, }; =20 +/* Output: 2.1A to 4.5A */ +static const unsigned int pf8x00_sw_current_table[] =3D { + 2100000, 2600000, 3000000, 4500000, +}; + #define SWV(i) (6250 * i + 400000) #define SWV_LINE(i) SWV(i*8+0), SWV(i*8+1), SWV(i*8+2), SWV(i*8+3), \ SWV(i*8+4), SWV(i*8+5), SWV(i*8+6), SWV(i*8+7) @@ -199,32 +196,6 @@ static struct pf8x00_regulator *desc_to_regulator(cons= t struct regulator_desc *d return container_of(desc, struct pf8x00_regulator, desc); } =20 -static void swxilim_select(const struct regulator_desc *desc, int ilim) -{ - struct pf8x00_regulator *data =3D desc_to_regulator(desc); - u8 ilim_sel; - - switch (ilim) { - case 2100: - ilim_sel =3D SWXILIM_2100_MA; - break; - case 2600: - ilim_sel =3D SWXILIM_2600_MA; - break; - case 3000: - ilim_sel =3D SWXILIM_3000_MA; - break; - case 4500: - ilim_sel =3D SWXILIM_4500_MA; - break; - default: - ilim_sel =3D SWXILIM_2100_MA; - break; - } - - data->ilim =3D ilim_sel; -} - static int pf8x00_of_parse_cb(struct device_node *np, const struct regulator_desc *desc, struct regulator_config *config) @@ -235,13 +206,6 @@ static int pf8x00_of_parse_cb(struct device_node *np, int val; int ret; =20 - ret =3D of_property_read_u32(np, "nxp,ilim-ma", &val); - if (ret) - dev_dbg(chip->dev, "unspecified ilim for BUCK%d, use 2100 mA\n", - desc->id - PF8X00_LDO4); - - swxilim_select(desc, val); - ret =3D of_property_read_u32(np, "nxp,phase-shift", &val); if (ret) { dev_dbg(chip->dev, @@ -272,7 +236,18 @@ static const struct regulator_ops pf8x00_ldo_ops =3D { .get_voltage_sel =3D regulator_get_voltage_sel_regmap, }; =20 -static const struct regulator_ops pf8x00_buck_ops =3D { +static const struct regulator_ops pf8x00_buck1_6_ops =3D { + .enable =3D regulator_enable_regmap, + .disable =3D regulator_disable_regmap, + .is_enabled =3D regulator_is_enabled_regmap, + .list_voltage =3D regulator_list_voltage_table, + .set_voltage_sel =3D regulator_set_voltage_sel_regmap, + .get_voltage_sel =3D regulator_get_voltage_sel_regmap, + .get_current_limit =3D regulator_get_current_limit_regmap, + .set_current_limit =3D regulator_set_current_limit_regmap, +}; + +static const struct regulator_ops pf8x00_buck7_ops =3D { .enable =3D regulator_enable_regmap, .disable =3D regulator_disable_regmap, .is_enabled =3D regulator_is_enabled_regmap, @@ -320,13 +295,41 @@ static const struct regulator_ops pf8x00_vsnvs_ops = =3D { .regulators_node =3D "regulators", \ .of_parse_cb =3D pf8x00_of_parse_cb, \ .n_voltages =3D ARRAY_SIZE(voltages), \ - .ops =3D &pf8x00_buck_ops, \ + .ops =3D &pf8x00_buck1_6_ops, \ .type =3D REGULATOR_VOLTAGE, \ .id =3D PF8X00_BUCK ## _id, \ .owner =3D THIS_MODULE, \ .volt_table =3D voltages, \ .vsel_reg =3D (base) + SW_RUN_VOLT, \ .vsel_mask =3D 0xff, \ + .curr_table =3D pf8x00_sw_current_table, \ + .n_current_limits =3D \ + ARRAY_SIZE(pf8x00_sw_current_table), \ + .csel_reg =3D (base) + SW_CONFIG2, \ + .csel_mask =3D PF8X00_SWXILIM_MASK, \ + .enable_reg =3D (base) + SW_MODE1, \ + .enable_val =3D 0x3, \ + .disable_val =3D 0x0, \ + .enable_mask =3D 0x3, \ + .enable_time =3D 500, \ + }, \ + } + +#define PF8X00BUCK7(_name, base, voltages) \ + [PF8X00_BUCK7] =3D { \ + .desc =3D { \ + .name =3D _name, \ + .of_match =3D _name, \ + .regulators_node =3D "regulators", \ + .of_parse_cb =3D pf8x00_of_parse_cb, \ + .n_voltages =3D ARRAY_SIZE(voltages), \ + .ops =3D &pf8x00_buck7_ops, \ + .type =3D REGULATOR_VOLTAGE, \ + .id =3D PF8X00_BUCK7, \ + .owner =3D THIS_MODULE, \ + .volt_table =3D voltages, \ + .vsel_reg =3D (base) + SW_RUN_VOLT, \ + .vsel_mask =3D 0xff, \ .enable_reg =3D (base) + SW_MODE1, \ .enable_val =3D 0x3, \ .disable_val =3D 0x0, \ @@ -363,7 +366,7 @@ static struct pf8x00_regulator pf8x00_regulators_data[P= F8X00_MAX_REGULATORS] =3D { PF8X00BUCK(4, "buck4", PF8X00_SW_BASE(PF8X00_BUCK4), pf8x00_sw1_to_6_volt= ages), PF8X00BUCK(5, "buck5", PF8X00_SW_BASE(PF8X00_BUCK5), pf8x00_sw1_to_6_volt= ages), PF8X00BUCK(6, "buck6", PF8X00_SW_BASE(PF8X00_BUCK6), pf8x00_sw1_to_6_volt= ages), - PF8X00BUCK(7, "buck7", PF8X00_SW_BASE(PF8X00_BUCK7), pf8x00_sw7_voltages), + PF8X00BUCK7("buck7", PF8X00_SW_BASE(PF8X00_BUCK7), pf8x00_sw7_voltages), PF8X00VSNVS("vsnvs", PF8X00_VSNVS_CONFIG1, pf8x00_vsnvs_voltages), }; =20 @@ -458,10 +461,6 @@ static int pf8x00_i2c_probe(struct i2c_client *client) regmap_update_bits(chip->regmap, reg, PF8X00_SWXPHASE_MASK, data->phase_shift); - - regmap_update_bits(chip->regmap, reg, - PF8X00_SWXILIM_MASK, - data->ilim << PF8X00_SWXILIM_SHIFT); } } =20 --=20 2.20.1 From nobody Sat May 10 05:40:19 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1608077110; cv=none; d=zohomail.com; s=zohoarc; b=Y0Uyciw9PaWj7W3OnPkCpmknVIAEs5EoR1TzNvcb4uggHiKD0xdP6gpeXVJHFOBEUTe8ZNpQQEsuJPP3Rvy0Fdh9uqudqYXPD/+nFHkVXEcwuotXiUMpRC6Q9M2LPm+fV6wnqiJgBPEjW9MxuPdpVDFD6xlIkgVYA1KcqX9I/Xs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608077110; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=WKxyKv5Vyo6rLK3P0ayFnk4+OFVhwfk8r0VDndedKFQ=; b=OolgrSd87109zz0/1t1C0bBAlJfGOC0uUvXoYy/YPKgQrwACGVtq/JqMOg9+R1SsV1imk9ykO2f2+n+0dlYqE5DWCHBDT3LRs7hVv+5BzcHwIT0gg1hb2FBq2x3n5siBSciH1YE1wO0RAGtwO6SW4jtga2mBNJQiuOwYGKi0Odc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1608077110031670.9603521623777; Tue, 15 Dec 2020 16:05:10 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727953AbgLPAB2 (ORCPT ); Tue, 15 Dec 2020 19:01:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbgLOX6a (ORCPT ); Tue, 15 Dec 2020 18:58:30 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C228AC061793; Tue, 15 Dec 2020 15:57:49 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id e25so804126wme.0; Tue, 15 Dec 2020 15:57:49 -0800 (PST) Received: from adgra-XPS-15-9570.home (lfbn-idf1-1-1007-144.w86-238.abo.wanadoo.fr. [86.238.83.144]) by smtp.gmail.com with ESMTPSA id c10sm204160wrb.92.2020.12.15.15.57.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 15:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WKxyKv5Vyo6rLK3P0ayFnk4+OFVhwfk8r0VDndedKFQ=; b=UxJdc8UCiFt5HUoCcnfbmksH4dcJvng0S8iIRtgAwq/TC4IynPpqlQw+gKxeRpoLwa QfSzbnIChReD09o16wxIOkLYlQQCVWqslLrb84tew3X4jBdPTBjcL7pwvmwkEoERuSOj Q8i758LK0CfsjhFBJQAkj7ceQZt5JeMlSMClp08BoV7j3NKEyCgS742WHhVkorn/3/DS O2HTP0AjixO/sSannH0ZicVZwJWKtpHKEziuJcF32pMzXLCGDgP28LC8YmL322R1XbVW vaLFWyCW04QGy3/BvyfY+8LUP8h3inxz00syaV9ShQPKyLBgy92jCuAaVljTTX7bg56+ QDyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WKxyKv5Vyo6rLK3P0ayFnk4+OFVhwfk8r0VDndedKFQ=; b=ggzyIr2q92UGv3oPuje0RoKwB53YrlIM7BhKBtsAvRVyR2CnLRm0tTFlV8ONnONsVy p7swYbDCfzmrdji32fa2P5L/iglI2OgVGR4rEr4hte0xTqGN4mANxRiNYc4vUtPjYl5i 4O2gr6RynoALKijdJVjU1DhvQb+c+vMLXCRQUoVN9i1U+8rA1SkQ3HbcWdFakYOQ+uA4 4tycUjsqWiGuCADmtAc9Gh7pEKsXONtehtIyeEoSgSEpWwQ4cQkPs+BO4fbFHJV12WoZ F5qobskMCekyNzSPX8bLkNDoiTGInWmbfDnihFeiTSJsflTpjiAbW9tmkRJj11O9NvvV J+/w== X-Gm-Message-State: AOAM5326hwrS5yY+a1PoxLS+/71J7C1AltDDpRQI4Ehw70Bol97VLQWw NIrIu/BhOKTnptE6FfKrs/U= X-Google-Smtp-Source: ABdhPJza0WyIqn8XhPVkMC6KtdkoN2+oLJrdjVKe0VNrN/LMXplDSZg1X55OpF9zJX1RceT35MOj1Q== X-Received: by 2002:a1c:49c2:: with SMTP id w185mr815763wma.184.1608076668573; Tue, 15 Dec 2020 15:57:48 -0800 (PST) From: Adrien Grassein Cc: broonie@kernel.org, jagan@amarulasolutions.com, lgirdwood@gmail.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, troy.kisky@boundarydevices.com, Adrien Grassein Subject: [PATCH v2 6/7] regulator: pf8x00: use linear range for buck 1-6 Date: Wed, 16 Dec 2020 00:56:38 +0100 Message-Id: <20201215235639.31516-7-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215235639.31516-1-adrien.grassein@gmail.com> References: <20201215235639.31516-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Use a linear range to describe the voltages of the bucks 1-6 instead of listing it one by one (via a macro) Signed-off-by: Adrien Grassein --- drivers/regulator/pf8x00-regulator.c | 40 +++++++--------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/drivers/regulator/pf8x00-regulator.c b/drivers/regulator/pf8x0= 0-regulator.c index ebb0ef0745f1..5ad940b3db0a 100644 --- a/drivers/regulator/pf8x00-regulator.c +++ b/drivers/regulator/pf8x00-regulator.c @@ -147,35 +147,11 @@ static const unsigned int pf8x00_sw_current_table[] = =3D { 2100000, 2600000, 3000000, 4500000, }; =20 -#define SWV(i) (6250 * i + 400000) -#define SWV_LINE(i) SWV(i*8+0), SWV(i*8+1), SWV(i*8+2), SWV(i*8+3), \ - SWV(i*8+4), SWV(i*8+5), SWV(i*8+6), SWV(i*8+7) - /* Output: 0.4V to 1.8V */ -static const int pf8x00_sw1_to_6_voltages[] =3D { - SWV_LINE(0), - SWV_LINE(1), - SWV_LINE(2), - SWV_LINE(3), - SWV_LINE(4), - SWV_LINE(5), - SWV_LINE(6), - SWV_LINE(7), - SWV_LINE(8), - SWV_LINE(9), - SWV_LINE(10), - SWV_LINE(11), - SWV_LINE(12), - SWV_LINE(13), - SWV_LINE(14), - SWV_LINE(15), - SWV_LINE(16), - SWV_LINE(17), - SWV_LINE(18), - SWV_LINE(19), - SWV_LINE(20), - SWV_LINE(21), - 1500000, 1800000, +#define PF8XOO_SW1_6_VOLTAGE_NUM 0xB2 +static const struct linear_range pf8x00_sw1_to_6_voltages[] =3D { + REGULATOR_LINEAR_RANGE(400000, 0x00, 0xB0, 6250), + REGULATOR_LINEAR_RANGE(1800000, 0xB1, 0xB1, 0), }; =20 /* Output: 1.0V to 4.1V */ @@ -240,7 +216,7 @@ static const struct regulator_ops pf8x00_buck1_6_ops = =3D { .enable =3D regulator_enable_regmap, .disable =3D regulator_disable_regmap, .is_enabled =3D regulator_is_enabled_regmap, - .list_voltage =3D regulator_list_voltage_table, + .list_voltage =3D regulator_list_voltage_linear_range, .set_voltage_sel =3D regulator_set_voltage_sel_regmap, .get_voltage_sel =3D regulator_get_voltage_sel_regmap, .get_current_limit =3D regulator_get_current_limit_regmap, @@ -294,12 +270,14 @@ static const struct regulator_ops pf8x00_vsnvs_ops = =3D { .of_match =3D _name, \ .regulators_node =3D "regulators", \ .of_parse_cb =3D pf8x00_of_parse_cb, \ - .n_voltages =3D ARRAY_SIZE(voltages), \ + .n_voltages =3D PF8XOO_SW1_6_VOLTAGE_NUM, \ .ops =3D &pf8x00_buck1_6_ops, \ .type =3D REGULATOR_VOLTAGE, \ .id =3D PF8X00_BUCK ## _id, \ .owner =3D THIS_MODULE, \ - .volt_table =3D voltages, \ + .linear_ranges =3D pf8x00_sw1_to_6_voltages, \ + .n_linear_ranges =3D \ + ARRAY_SIZE(pf8x00_sw1_to_6_voltages), \ .vsel_reg =3D (base) + SW_RUN_VOLT, \ .vsel_mask =3D 0xff, \ .curr_table =3D pf8x00_sw_current_table, \ --=20 2.20.1 From nobody Sat May 10 05:40:19 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1608077110; cv=none; d=zohomail.com; s=zohoarc; b=IR9gWJ+ly6Fe8F3DPGFID+o5o64OXuNjXUNxdm0NT0DlGuGb7D65h/H8Tj0a05dpWIGA5MNo4OyR28+be9vsh8C55ZvfBbf/nTRQC4yVijL+ykGPCo5cJbNB8RFzW9D4TxLZI/EJgT8H6lCxUugnlGXtZBged2Q9Wb+nYVVRoP8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608077110; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Subject:To; bh=1I/x1exlJLsm3WeNJRlwrbpzwfSR6O258jSLiqBkyC4=; b=lbTHOwJAzSvlzOyBPm12b5+EAO7Q1C0b7DZV61CB7Z+vUOZrdo05ug941hsFhkMZ5VHCnS78bzQUgT0O6DyQ201pNTYZesjitL+SATeevVsQotLJ/Q0jlEU24d3o0ctcq9nNRsr1CMifaYuibqziWAlZY8Chtpg0f0HL2HEC0eA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 160807711034965.40619663074528; Tue, 15 Dec 2020 16:05:10 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727987AbgLPAB3 (ORCPT ); Tue, 15 Dec 2020 19:01:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbgLOX6i (ORCPT ); Tue, 15 Dec 2020 18:58:38 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57867C0613D3; Tue, 15 Dec 2020 15:57:58 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id 91so21484204wrj.7; Tue, 15 Dec 2020 15:57:58 -0800 (PST) Received: from adgra-XPS-15-9570.home (lfbn-idf1-1-1007-144.w86-238.abo.wanadoo.fr. [86.238.83.144]) by smtp.gmail.com with ESMTPSA id c10sm204160wrb.92.2020.12.15.15.57.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 15:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1I/x1exlJLsm3WeNJRlwrbpzwfSR6O258jSLiqBkyC4=; b=kgAp2ZEQWXFQUErft2vomP9iqJ8qY1ouCvn68LzDjLKyQ0XbyrFtTOeC+xnsOX6zS+ ruuFijEoBpRX9z0EMFIFyTvQkAKETi5JG0tMkU/KvI5GO0CPoYS2Dqelf4D2dqQy1QAg qa+kZVX8rgN+eAaO/eqk6v2+Mro/+VWZjemdmGQfJGHhUUZGGt0V6a6gdikIm1iUNhs+ neoSty3zzPS29tecbBH0qM16SZBw+CfYT2vdh+5Y1UTlJbE9sWBOxNcPoK/ukWhTAwaZ +yIlWCCeHU7B1PNE3uZIKO973FK2NSEIIiDCzYocxpd+BlwczBb6wwEhLo8f5R/VQRI8 rWhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1I/x1exlJLsm3WeNJRlwrbpzwfSR6O258jSLiqBkyC4=; b=gchZESH35RcB7rH4je6HO7NUlIHDKMDk9BlfOuU+jIW9AVmybngyH7EUHJ2slLZxGS fnLkBe6i76sy06UPVhI0v3I2VZRenauT8ngQ3eb8osHrNLyy7M1HAopEPG4xkKXCzQYL pk+2waK7xW4Jl0TlC7DRfUjA9KTayPt0HdJ8QjHEb2r6cVME8XgovFne2ILWU+lJ/GvF 3KDY8+PNecMRkHuK7xHDQ88uunMT3WzFuSNiqojdonL9pFn11MfuOV3YPak0uy4DyEnm 4KQUT1SIOZWmRvgnovKpFngN7Am238+TS+WrQjVaZloQDJn3gLZ8D7WEdH9IRz5HRKP1 JqpA== X-Gm-Message-State: AOAM533ArtRGGb+oabkVEZzZ01TE7a6lVjA+jdhrnEyr6/yto+NgzgfV uGiL7zzCc3u2Pv82gqdGZFM= X-Google-Smtp-Source: ABdhPJwPypN9h32sGAN0lqpW3qvgk90sap/+pSguIjFq2jay9rl9yUFUeNPSgGrOodaz77Z3yr3J2w== X-Received: by 2002:adf:c14d:: with SMTP id w13mr24944905wre.383.1608076677046; Tue, 15 Dec 2020 15:57:57 -0800 (PST) From: Adrien Grassein Cc: broonie@kernel.org, jagan@amarulasolutions.com, lgirdwood@gmail.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, troy.kisky@boundarydevices.com, Adrien Grassein Subject: [PATCH v2 7/7] regulator: pf8x00: fix nxp,phase-shift Date: Wed, 16 Dec 2020 00:56:39 +0100 Message-Id: <20201215235639.31516-8-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215235639.31516-1-adrien.grassein@gmail.com> References: <20201215235639.31516-1-adrien.grassein@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Fix the ternary condition which is a bad coding style in the kernel I also remove the defering configuration of the nxp,phase-shift. The configuration is now done at parsing time. It save some memory and it's better for comprehension. I also use the OTP default configuration when the paramater is wrong or not specified. I think that it's better to use the default configuration from the chip than an arbitrary value. Signed-off-by: Adrien Grassein --- drivers/regulator/pf8x00-regulator.c | 45 +++++++++++++--------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/drivers/regulator/pf8x00-regulator.c b/drivers/regulator/pf8x0= 0-regulator.c index 5ad940b3db0a..b8b3ac393ee8 100644 --- a/drivers/regulator/pf8x00-regulator.c +++ b/drivers/regulator/pf8x00-regulator.c @@ -107,7 +107,6 @@ enum pf8x00_ldo_states { =20 #define PF8X00_SWXILIM_MASK GENMASK(4, 3) #define PF8X00_SWXPHASE_MASK GENMASK(2, 0) -#define PF8X00_SWXPHASE_DEFAULT 0 #define PF8X00_SWXPHASE_SHIFT 7 =20 enum pf8x00_devid { @@ -121,7 +120,6 @@ enum pf8x00_devid { =20 struct pf8x00_regulator { struct regulator_desc desc; - u8 phase_shift; }; =20 struct pf8x00_chip { @@ -167,17 +165,13 @@ static const int pf8x00_vsnvs_voltages[] =3D { 0, 1800000, 3000000, 3300000, }; =20 -static struct pf8x00_regulator *desc_to_regulator(const struct regulator_d= esc *desc) -{ - return container_of(desc, struct pf8x00_regulator, desc); -} - static int pf8x00_of_parse_cb(struct device_node *np, const struct regulator_desc *desc, struct regulator_config *config) { - struct pf8x00_regulator *data =3D desc_to_regulator(desc); struct pf8x00_chip *chip =3D config->driver_data; + unsigned char id =3D desc->id - PF8X00_LDO4; + unsigned char reg =3D PF8X00_SW_BASE(id) + SW_CONFIG2; int phase; int val; int ret; @@ -185,21 +179,30 @@ static int pf8x00_of_parse_cb(struct device_node *np, ret =3D of_property_read_u32(np, "nxp,phase-shift", &val); if (ret) { dev_dbg(chip->dev, - "unspecified phase-shift for BUCK%d, use 0 degrees\n", - desc->id - PF8X00_LDO4); - val =3D PF8X00_SWXPHASE_DEFAULT; + "unspecified phase-shift for BUCK%d, using OTP configuration\n", + id); + goto end; } =20 - phase =3D val / 45; - if ((phase * 45) !=3D val) { + if (val < 0 || val > 315 || val % 45 !=3D 0) { dev_warn(config->dev, - "invalid phase_shift %d for BUCK%d, use 0 degrees\n", - (phase * 45), desc->id - PF8X00_LDO4); - phase =3D PF8X00_SWXPHASE_SHIFT; + "invalid phase_shift %d for BUCK%d, using OTP configuration\n", + val, id); + goto end; } =20 - data->phase_shift =3D (phase >=3D 1) ? phase - 1 : PF8X00_SWXPHASE_SHIFT; + phase =3D val / 45; + + if (phase >=3D 1) + phase -=3D 1; + else + phase =3D PF8X00_SWXPHASE_SHIFT; + + regmap_update_bits(chip->regmap, reg, + PF8X00_SWXPHASE_MASK, + phase); =20 +end: return 0; } =20 @@ -432,14 +435,6 @@ static int pf8x00_i2c_probe(struct i2c_client *client) "failed to register %s regulator\n", data->desc.name); return PTR_ERR(rdev); } - - if ((id >=3D PF8X00_BUCK1) && (id <=3D PF8X00_BUCK7)) { - u8 reg =3D PF8X00_SW_BASE(id) + SW_CONFIG2; - - regmap_update_bits(chip->regmap, reg, - PF8X00_SWXPHASE_MASK, - data->phase_shift); - } } =20 return 0; --=20 2.20.1