Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2101087pxb; Mon, 12 Apr 2021 14:32:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/qEIQV+ANNcM8pI6qJcKXkBjYCY6betHGiPbqo9c78TlCo0rWT+B0k4PYyAIrKUo0i9W9 X-Received: by 2002:a17:906:2e8f:: with SMTP id o15mr28165595eji.171.1618263151497; Mon, 12 Apr 2021 14:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618263151; cv=none; d=google.com; s=arc-20160816; b=JHoj+XUdWjT8UvF6xjWt4DX30b+ejTu+VaaU9PQ6Z8As4dnWcTrqCoPdgXyyIzSD8/ l9GCxu343dvF2pzXc8qlEOTtB9cgrkj3pSqBhrk09Notm+DoK5dMONJxoC0tBWs/ZtEt RtuFvOPJGcJmzdGzxd9qbbG9Ol9AYovCmKOx2h21rZpJIkUqzsr+XiB06ivWq/nFOV0Y YF17yobfITvR2Dv0UJe/KLRoNR3ZZ2RVRogx7L7xjo9EsFoIR6t/6mGLrK3mf3/hu9Lf DBLo6ZzDtlzDOX5FRwyAAReyfPHBAYErwaeqDFntY450OLqMcEILVIR0hCEaAsEhnK41 YThQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qiAAMxOt6zxsGyOo8TKBxuX+ZtQs7GEsVGcBQ8cjTow=; b=bTEuwjjpmpAfqljxjWeZB3NmMkuhPY7HNv0K0pOonxdMzQJs9rFU+uSc7OORta2tz9 qLN81Rhi6kqNR2dhlGM7ngYZLOS4zL34Q3cmGtRxaPvOVmVZweh9JtcVSTHyzyWHkSDp bBTm3nhJt41EmqJCLz7Ne+Efp7BF3LV9YuLh53EH3oOr9x0HSvs7AlQU2X22xbNpvSYE 2y9H6RTRX3zhdXhi2y51Skld66xYymNBh4i5hKCs/8bQR9A+rU5trjeyBu52HuTzWrqw yUIjuOg6bi9ppHbmdOpTehzM2LNuZXwVFfsOsYhwE/u5BPM+lfVjYD6x/dNUplvUTkTw jn/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="lZ/4DejP"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id wn20si6384355ejb.475.2021.04.12.14.32.07; Mon, 12 Apr 2021 14:32:31 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="lZ/4DejP"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237809AbhDLJME (ORCPT + 99 others); Mon, 12 Apr 2021 05:12:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:50216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238655AbhDLI4i (ORCPT ); Mon, 12 Apr 2021 04:56:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CB7F261350; Mon, 12 Apr 2021 08:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217780; bh=kyNMQWNUVWzlRPfJeM+O0r4v4xNKRyFd/vCsPJf4Lz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lZ/4DejPjy7kmytp3Xz7UcbIwF4cnpizeytOulIW6dIUAJa5HM0wL8xKOtI1b8EcE lwQTC8OB7G0WsKFfA13bGjeTTSw/vIIKxDh9CxFNibaixDMcwFNd8qxakJICVHilIv F2wyRMT00K/SB5JcdkLDs2uqXBUmWhNT/l3Q6R8k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Mark Brown , Sasha Levin Subject: [PATCH 5.10 097/188] regulator: bd9571mwv: Fix AVS and DVFS voltage range Date: Mon, 12 Apr 2021 10:40:11 +0200 Message-Id: <20210412084016.870760186@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084013.643370347@linuxfoundation.org> References: <20210412084013.643370347@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit 3b6e7088afc919f5b52e4d2de8501ad34d35b09b ] 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 Link: https://lore.kernel.org/r/20210312130242.3390038-2-geert+renesas@glider.be Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 e690c2ce5b3c..25e33028871c 100644 --- a/drivers/regulator/bd9571mwv-regulator.c +++ b/drivers/regulator/bd9571mwv-regulator.c @@ -124,7 +124,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, @@ -133,7 +133,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.30.2