Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1221149pxf; Fri, 12 Mar 2021 05:04:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVwpf0EpDGCjSPytBEb6xqnKQQ/Awr9BUW5PHFKt3G9EzTxPwrZW464LFKMSbAg7qaM606 X-Received: by 2002:a17:906:77c5:: with SMTP id m5mr8009493ejn.201.1615554279431; Fri, 12 Mar 2021 05:04:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615554279; cv=none; d=google.com; s=arc-20160816; b=HgVUT4/hyH31I+9xv369AEl5MO/ZnA+nVmmXD8T7JNw12gQ6f05savx43gTIuZs39m hsLhNwmVo6ddkDkuSKH+i4YVHZ7M+xiPfB5edAtFaCrGoFaA3tRmi0b7Z36SealKUPHW xvecC1uQ4nyH9AsI6cTDEY+ZunHjKPPL6uSFE/QolLOqgk2nfxwS69NzDpqaZQGIeg1b 8bM1522F4ErFaUxu9gEM1ht1euZE2FkwZvJJ8pvka2qK/Dog12ZlpbdEK1IJydprQhE6 yqhm0oneaAnnN7n8dY5rnu6tWgs7/0lNybWILxicMoc4j1QvrAHa3yRwcCD/OQd5FvTr Hjzw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=phwNG5/fzZjkOwVZu/RgDAFon3sr5Sjytf3Z7VppRKo=; b=ew/DAPtfBJvWT85ZwFYauTMB68t1EjUqUnUUmBNQhoe0fUpUeLozQVPhWE3O8aMmHU 2Fuyj/J6QKMZTOXhiu069K82X8yLNwiGxDEGCXBexRLLM+Lln2tCTyGsZEQL5BToUD1U 4sxaUh2HDNo3sMAVgCA74o1PftvJSxJCmvHe3lsckvm/T3BKtro0+CZK7FaCw+Z+FYtV 8vsqQ8BXA+PlSn2wpP4BeQcYtBL+tYx0XR9rXBPZIIFVMB74h0sykJQmEIP7OUkuan9S 3gR9Sh6Mkmfpy0Qhc0AvT5evAXq3fva4ejjZnmuKGLWNLtq7Q1vZ+toSY8t9Wx4lPj1g gqCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si3516880eds.345.2021.03.12.05.04.06; Fri, 12 Mar 2021 05:04:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231651AbhCLNDI (ORCPT + 99 others); Fri, 12 Mar 2021 08:03:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230189AbhCLNCw (ORCPT ); Fri, 12 Mar 2021 08:02:52 -0500 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 111FBC061761 for ; Fri, 12 Mar 2021 05:02:51 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:f9e2:c536:b8cc:fbbc]) by andre.telenet-ops.be with bizsmtp id fR2o240061ACAb301R2oAV; Fri, 12 Mar 2021 14:02:48 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lKhRH-0077p5-JO; Fri, 12 Mar 2021 14:02:47 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lKhRH-00EDut-5z; Fri, 12 Mar 2021 14:02:47 +0100 From: Geert Uytterhoeven To: Marek Vasut , Liam Girdwood , Mark Brown Cc: Yoshihiro Shimoda , Matti Vaittinen , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/3] regulator: bd9571mwv: Fix AVS and DVFS voltage range Date: Fri, 12 Mar 2021 14:02:40 +0100 Message-Id: <20210312130242.3390038-2-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210312130242.3390038-1-geert+renesas@glider.be> References: <20210312130242.3390038-1-geert+renesas@glider.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to Table 30 ("DVFS_MoniVDAC [6:0] Setting Table") in the BD9571MWV-M Datasheet Rev. 002, the valid voltage range is 600..1100 mV (settings 0x3c..0x6e). While the lower limit is taken into account (by setting regulator_desc.linear_min_sel to 0x3c), the upper limit is not. Fix this by reducing regulator_desc.n_voltages from 0x80 to 0x6f. Fixes: e85c5a153fe237f2 ("regulator: Add ROHM BD9571MWV-M PMIC regulator driver") Signed-off-by: Geert Uytterhoeven --- drivers/regulator/bd9571mwv-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c index 7b0cd08db4462395..13393cdc6be1497e 100644 --- a/drivers/regulator/bd9571mwv-regulator.c +++ b/drivers/regulator/bd9571mwv-regulator.c @@ -125,7 +125,7 @@ static const struct regulator_ops vid_ops = { static const struct regulator_desc regulators[] = { BD9571MWV_REG("VD09", "vd09", VD09, avs_ops, 0, 0x7f, - 0x80, 600000, 10000, 0x3c), + 0x6f, 600000, 10000, 0x3c), BD9571MWV_REG("VD18", "vd18", VD18, vid_ops, BD9571MWV_VD18_VID, 0xf, 16, 1625000, 25000, 0), BD9571MWV_REG("VD25", "vd25", VD25, vid_ops, BD9571MWV_VD25_VID, 0xf, @@ -134,7 +134,7 @@ static const struct regulator_desc regulators[] = { 11, 2800000, 100000, 0), BD9571MWV_REG("DVFS", "dvfs", DVFS, reg_ops, BD9571MWV_DVFS_MONIVDAC, 0x7f, - 0x80, 600000, 10000, 0x3c), + 0x6f, 600000, 10000, 0x3c), }; #ifdef CONFIG_PM_SLEEP -- 2.25.1