Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2659927pxj; Mon, 14 Jun 2021 04:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwInWCLt37cGbzn71+ZBLHhx6iqovTwwkf/IgH7Co4OQEzVKD3bYBb/ENPuQjNGDK7TjUGS X-Received: by 2002:a05:6402:311c:: with SMTP id dc28mr16479962edb.291.1623669379432; Mon, 14 Jun 2021 04:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623669379; cv=none; d=google.com; s=arc-20160816; b=DvCcOGqKFqqwpjNuuNCY4zY4BI+l+Ze9Jy8+jiU03uZHb+y5um0dcW1KyxyQMbvRNQ D/su94XewmzrVjmlbfcuDs4/iLBxbkMMJME2uor82CfAAXcDyMZvN8RmwmSRcNYWmQtG zkKdjhaPTsZkIRKxM4+Re1u0Glq3PokawP4xi4zelwyn9SMSynwZpGOTY1AUya4Pdlo6 BWX+di0RxYnRgQtQLfpDgrEpAl5V8hIjC7Rznkp8jhbgGcwzQcnd2mo8slMoz4dbGsof zSLr22yqhot6DyFf7r8MkrmpgPCTvuUXx4vrODf+SSz1Llo/9h+wnuPg+5pSq+qO5qd4 /3Aw== 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=3/pEmWz+wZurvacY6QW8H1RLU/Avkb9X8ZvtJBm34RU=; b=WWAQcuVaUQey1QnvnwPbzAFlBOvfNcR4/N4lk+fxPJyTMkPhFqAM4UGAvmYvw7IaWu WKWRbT4+lEzZXAwVeefVd05L5EEsEaoYxoOo7r2mbXsFrU5cPLm9+op1jmY9TOJFIYM2 iIIl2xCTLKzhTSZ8dGUy1fKUJuR+3x96idjOODg26UJ+mqkT6b/9aKkk1XtsmFp5I6KO C5kxv3fyWzU+NSUhRCX70Tb+91ssxfzKqgeOeaU9NEB3w9lPlqcZANlwxW0xK3nNZ2Gy riJcG9T1etZBfIOxd+0LhhPbD5kyQq8ltjtQjQADxyuW0mxQUDzNQypeyEI97I2j8lDL qwnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MJGQaIX2; 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 j12si4884981ejj.20.2021.06.14.04.15.55; Mon, 14 Jun 2021 04:16:19 -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=MJGQaIX2; 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 S233085AbhFNLQ5 (ORCPT + 99 others); Mon, 14 Jun 2021 07:16:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:39876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235118AbhFNLEu (ORCPT ); Mon, 14 Jun 2021 07:04:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C096261408; Mon, 14 Jun 2021 10:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623667494; bh=GVzGZgoNbDlNANypM7xWU77ZalK+MFILsGcxNreyzhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MJGQaIX2qUKUKgnO3fsiDFIZ/QsG0Z8amwv43mywbLJsnEd1ebaSI+sjYg7nKBz9t +UvyI6AnPODtP1fFcSoKl1ZP3W+LdLRz+zZGibGFenB3zVSQ0DxS7zOppbi/6r4Fo5 LgL+jiqYic/CUwfMz8bDiEqsaAxC3UfcaYeiAnwk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Axel Lin , Matti Vaittinen , Mark Brown Subject: [PATCH 5.10 094/131] regulator: bd71828: Fix .n_voltages settings Date: Mon, 14 Jun 2021 12:27:35 +0200 Message-Id: <20210614102656.191504304@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614102652.964395392@linuxfoundation.org> References: <20210614102652.964395392@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: Axel Lin commit 4c668630bf8ea90a041fc69c9984486e0f56682d upstream. Current .n_voltages settings do not cover the latest 2 valid selectors, so it fails to set voltage for the hightest voltage support. The latest linear range has step_uV = 0, so it does not matter if we count the .n_voltages to maximum selector + 1 or the first selector of latest linear range + 1. To simplify calculating the n_voltages, let's just set the .n_voltages to maximum selector + 1. Fixes: 522498f8cb8c ("regulator: bd71828: Basic support for ROHM bd71828 PMIC regulators") Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210523071045.2168904-2-axel.lin@ingics.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- include/linux/mfd/rohm-bd71828.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/include/linux/mfd/rohm-bd71828.h +++ b/include/linux/mfd/rohm-bd71828.h @@ -26,11 +26,11 @@ enum { BD71828_REGULATOR_AMOUNT, }; -#define BD71828_BUCK1267_VOLTS 0xEF -#define BD71828_BUCK3_VOLTS 0x10 -#define BD71828_BUCK4_VOLTS 0x20 -#define BD71828_BUCK5_VOLTS 0x10 -#define BD71828_LDO_VOLTS 0x32 +#define BD71828_BUCK1267_VOLTS 0x100 +#define BD71828_BUCK3_VOLTS 0x20 +#define BD71828_BUCK4_VOLTS 0x40 +#define BD71828_BUCK5_VOLTS 0x20 +#define BD71828_LDO_VOLTS 0x40 /* LDO6 is fixed 1.8V voltage */ #define BD71828_LDO_6_VOLTAGE 1800000