Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3937876pxj; Mon, 21 Jun 2021 09:46:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGsWoo953kLaoDmcowIArvICWuhHBtgACxoxPa1ZzutV7QE03JELwM1NJ0Vf3xYhbD9tIg X-Received: by 2002:aa7:d8d4:: with SMTP id k20mr8880175eds.143.1624293973063; Mon, 21 Jun 2021 09:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293973; cv=none; d=google.com; s=arc-20160816; b=g4N9R+qFQNIFfrDN90d3nDIICG/QX0Omm2qy6gPwSEOEBCLDxm0yiK5vTpuTXQloQM A+EYW8jld76Orwmf+/hofsre4R09EtNtY8lg/8sg+dgZ9vzwmi7rLR6eVBHHoQ7gCebO kyv+dKUfSRjZZzX1Isth9oFrKRYSnfmjFoGPtczSWcz9/S1fCxiraQirQ4F6+n+jThua w5mqnE0IEwlk507ELOkzdp0nFD/4iaQhmmkRDw8CZp7aXa+x6xjHg5xOjJyQZ7q/8Pp4 GZjz9fPbdJNNmht5jQnC0kSPkhpl3qe7UmHi+JV3oPhzNhzBz4MCTdMXKgc4/pDCSm9w VlGQ== 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=BMPM8w9hvGes1qoTCrFRLg668mfPfZQEfioNMYARNvg=; b=G+B3YqRKQ0o3+96Ba8n8cDujyR1UyHMyhNmCWTrAnGYJFqV525KONFQoTQszEHX9NA 6rYQhTjEJh8dqk9q1/4x2aNx11x3lUehFdyOCZpj41AJGeU1CYQXAlxj+jzSR3bDF5lt 1uiyAfSSnqYNvcFXOu5XJ+uJTTLQypbBFZFuHH8sSeDdLML1x3AW6BqIE0YW44rT+7LG 4JU51r6mI0nhiroKbwbpR67NXu+tWPjpsE1OJK17P2s9gnYLD3bD1RS965VoR9CJenX2 NIJ9Y68Wxud08UizYmT/OJbwG8slYbihGeZNyqwk2zHOKfgufsH4jVqlktbLKbZX2fWs PWXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HNVSyMM3; 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 z1si8661270edd.156.2021.06.21.09.45.50; Mon, 21 Jun 2021 09:46:13 -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=HNVSyMM3; 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 S232401AbhFUQrP (ORCPT + 99 others); Mon, 21 Jun 2021 12:47:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:60472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233089AbhFUQmH (ORCPT ); Mon, 21 Jun 2021 12:42:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0DBB5613FB; Mon, 21 Jun 2021 16:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293081; bh=O2XPWVWlhWU/2tR7FC3Y/YzLoTfXutzXfOlO4TyzjLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HNVSyMM3Rzrw0k/j0Evqm7U3gkCbWbRjZBkvG4cyQU6myQRdiMLaiYBbASgKaf+oH A3ORW2r1Y/NV/gFEo9iO4vN6D3iPY7WMDxoVBnEVAJcSb/3S/mJD2Epe/btSTUDGO1 SzTYKhTBOF9JOkQWdjyw3D+ggJeqMftirFtg1QKc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Axel Lin , Matti Vaittinen , Mark Brown , Sasha Levin Subject: [PATCH 5.12 090/178] regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting Date: Mon, 21 Jun 2021 18:15:04 +0200 Message-Id: <20210621154925.760572607@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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 [ Upstream commit 0514582a1a5b4ac1a3fd64792826d392d7ae9ddc ] The valid selectors for bd70528 bucks are 0 ~ 0xf, so the .n_voltages should be 16 (0x10). Use 0x10 to make it consistent with BD70528_LDO_VOLTS. Also remove redundant defines for BD70528_BUCK_VOLTS. Signed-off-by: Axel Lin Acked-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210523071045.2168904-1-axel.lin@ingics.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- include/linux/mfd/rohm-bd70528.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/mfd/rohm-bd70528.h b/include/linux/mfd/rohm-bd70528.h index a57af878fd0c..4a5966475a35 100644 --- a/include/linux/mfd/rohm-bd70528.h +++ b/include/linux/mfd/rohm-bd70528.h @@ -26,9 +26,7 @@ struct bd70528_data { struct mutex rtc_timer_lock; }; -#define BD70528_BUCK_VOLTS 17 -#define BD70528_BUCK_VOLTS 17 -#define BD70528_BUCK_VOLTS 17 +#define BD70528_BUCK_VOLTS 0x10 #define BD70528_LDO_VOLTS 0x20 #define BD70528_REG_BUCK1_EN 0x0F -- 2.30.2