Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2053213pxb; Mon, 12 Apr 2021 13:05:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr9z6L/tW4DuHt8P4Sk9CNxwfNx29J6isVMpiNxNz3CQMFeEEBeSd3r+ms8/oEqyf7XL5o X-Received: by 2002:a17:902:e202:b029:e8:e924:b3f0 with SMTP id u2-20020a170902e202b02900e8e924b3f0mr28040503plb.50.1618257927664; Mon, 12 Apr 2021 13:05:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618257927; cv=none; d=google.com; s=arc-20160816; b=aqf5HuYugaAHMd0kUm6h3KSIUfKa6c/v0n4N+A3w5ccbYFduNizIez+3RDHzsk4D7U n3QD0Yo+MR4YpCMbOlLEPhgP5YtXwyni7uZ/+GmA/GsGp6xaqoxmEd4hcMZVdhiTwnQr dFlM/QD5MNo9z+eJFIWNoVOGkDf5Wko/H7JM9Vwquk5LjX9HY7cuaJRIZWdwkqLBsNJt eUmUfqI61uqjBOiESSL6Ahn/TwdawUAnGQ/PVj7r+fwzmQfVAxbVkh1u1Z6aBHPR5CbC 3Zldp/6zx1DtdS8kd0DmNioCtUtDNpioJ4As/roiajK6lGiCawT7yOIwRautHt9jBi5l GZAg== 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=fT8fVi5yBDjyaCnZJZs/E4AogmmVaz5IxZri0XSb7v0=; b=OotZ6TFHrs4P52ZOCWODjq2oOwp6QfAZTcVUiPSbCVdDLNgmzoHjR0Z99u2uIu63VA WA3ZOGg0KydISPfLQnbVEskQFuajw+U7A6Dla3aIG9gVtrIgPS+hKKITbTsg43QfvUHO iZfCI3tcxGBYCLE2VN5yZcteEmSNKo0CEX3F9ntppyQvhIdGVbYs9KN8RsqAPGl4KIzi AEUHeTIOyXJ/1N6r6vXIHW0NFDqEMCnZZvkL9FxH2d9c1MvM3lR/sA1mlmkrYOK5PCJ3 2mwov6Ymq6XiRMVCQBWZWW9yAvs4jv8HLJh8tzQDcjywz7U3lKjsYyDuzDgxWK1NQDie 3X1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="nO/XElE2"; 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 z190si13326136pgb.238.2021.04.12.13.05.15; Mon, 12 Apr 2021 13:05:27 -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="nO/XElE2"; 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 S237755AbhDLIq4 (ORCPT + 99 others); Mon, 12 Apr 2021 04:46:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:36784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237743AbhDLIpa (ORCPT ); Mon, 12 Apr 2021 04:45:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D5A4661241; Mon, 12 Apr 2021 08:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217112; bh=4VVm9y++9rer+i+n8D01n73eXQadiW3fQQ7xMwOaVXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nO/XElE2XEdzdTAuaZKGlihomdr693H4zr6zMybqQAQfsSu25eqg2LG+qKtF6Qua5 Fsi7+PqHATeiNevXwANQa0dwgO6OtnJQ8ENAgFXUZDu1jeM8FJb/ommGiAIKYNHwEu sKmWGr9vYqHPH/wkt8APqWvlMih6dc6FzAR6mlqM= 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 4.19 30/66] regulator: bd9571mwv: Fix AVS and DVFS voltage range Date: Mon, 12 Apr 2021 10:40:36 +0200 Message-Id: <20210412083959.103109476@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412083958.129944265@linuxfoundation.org> References: <20210412083958.129944265@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 274c5ed7cd73..713730757b14 100644 --- a/drivers/regulator/bd9571mwv-regulator.c +++ b/drivers/regulator/bd9571mwv-regulator.c @@ -132,7 +132,7 @@ static struct regulator_ops vid_ops = { static 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, @@ -141,7 +141,7 @@ static 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