Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3925267pxj; Mon, 21 Jun 2021 09:30:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrBTkKKHo0o3I/4qLB+gs2+e+i3s8KkGOoBvgpw+nIXS8B2PnNQsiZSIqdoqFC+fPO7YLp X-Received: by 2002:a17:906:2b18:: with SMTP id a24mr17747797ejg.239.1624293015106; Mon, 21 Jun 2021 09:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293015; cv=none; d=google.com; s=arc-20160816; b=NPUVrM5W9bZ604krD9qHK/sKZXqtGOR92A0hFK+kirqIXIjU+iqA7KMQg9jzUbJDdr Ttyf5VQLs9ZDzhAcHcuL0obiUFUek6zq+/ygqkf20ZJoWSA9kX3zVaV7Sp4D5yIgOafo pz3ZI2gBi5UsevWjsMCCuhrvwvJV4EhAcBmMt7ObOqNBUYAomhodl/zLp80V1HQacHhJ ovAACHApoyRQp2hMH8xeITkAjk6LwJosEBlILvH0gHnOFDkauC3b6AuFisPv2dtsdxiY W2oLyVIHKKCR9i1wec46k+FzNBfcbmHgUjiqz1O+69WoxNlPj7PwAOhHnHA/pu1EvtU1 FxoQ== 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=fbvvqZIzp3oF2tVWut64Mf9h4zGnm5arLKFHakjSybQE8oH4FOb5X4oksSZY3DjIhL EHyJDBiCjgl3XPRJn5wfo4jmmFoxBSDPFvzpxyER7kQzIeSHwOnyM+61zrUxywLMe9W6 pCcMArLQn0JbnaY8MzcwhF2aXsHk+xavDMfn/NN9qrewTZ8fdXiP5Xg0PEumELfFjtHt 6l6tR+1OcLIbD0qZP2l2tId5pvlr9Bb7OlXJyy5ubTJ4UHKmpDPYsz/0ds3NAd4MeTaV 9IUF/MtHsui5S68crpg+rHTsY74YiVzGzVgvtbuIeHrHxsYI2l1iX/h4aRlIaAMtsfUz wnNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IsYdW4rX; 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 og18si9009921ejc.277.2021.06.21.09.29.52; Mon, 21 Jun 2021 09:30:15 -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=IsYdW4rX; 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 S232349AbhFUQbN (ORCPT + 99 others); Mon, 21 Jun 2021 12:31:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:48560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232354AbhFUQ3Q (ORCPT ); Mon, 21 Jun 2021 12:29:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AEBE4613F7; Mon, 21 Jun 2021 16:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292645; bh=O2XPWVWlhWU/2tR7FC3Y/YzLoTfXutzXfOlO4TyzjLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IsYdW4rX/zieSwFXGh1NtzX6qwE0TeaB2gfeCgg50SKQ6cVl483NzQkrjyRxKCbc/ GFj7bmzFpOlYMAKZnV18dIXR3AP/1qNNdUfkx2uWSTF9XXmGLZoQ2WsgJlnJs0Jqxr D4uKmPDTbw8bEnmPXXx5Akb75amj6Sn6tR/cvdvw= 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.10 076/146] regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting Date: Mon, 21 Jun 2021 18:15:06 +0200 Message-Id: <20210621154915.758899763@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@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