Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3920505pxj; Mon, 21 Jun 2021 09:23:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKg6wcQWvFpERnEiU8BOr+5c+CpUXoHrFQ9t4cbXQEvJTiZ6hrZiiLi8J+xKDM70YZcAYM X-Received: by 2002:a17:906:4e44:: with SMTP id g4mr8739177ejw.216.1624292623582; Mon, 21 Jun 2021 09:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292623; cv=none; d=google.com; s=arc-20160816; b=oGTZq2ZUUDwmlSgPGs5jdl9cKrGrw9Jyp57gZnAZCyRg6nVoDaUNebL2swlT7Kw+wv W18mQ0iPkscoMUerqVi5bKWF1HueIuNrr/DaUKlb25POS4/BU7n+/y5pFHvREX1Tl4LO SueSmLkxIVUg7MDi2lvKxSwLALMsY1p2goIMLV1CIbHWilz8Unoo+aBj2oNrU3X/R7c9 CvhKPojXL7X2fhzRcVJC7sAN1l8nqxb+cAEOisIPkyb+AdyIl57A1Olu4sBWN/wXiKp2 q1hIikvSKkPEGDIvKiEQHLnv/LgQT0PLzNyqdmvqcCSAEfObsUNzKl8XadqbbiD/saK7 +QhQ== 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=/5tkDGI2NjpVH0sHFMqAY/OIpy/miyj2+I3fCM4g5Fo=; b=UEqnfC7pcF8epDoozyB7SaA4DOBlmdecK1j7kmCFXAi+Sg4pDTOoDGKssRmOtnJiRs IQvU5+y6qMicT1UoLtmmWECD/ZPySChcwfMUqzTpPpUEY8GcAc0wUQDazBHVJOD3wIic jxHYtWHUo1Qz1aRr+rmSnkCdOPMqosx9hDP32excPbt/TyJ+zR5OW/lxNHT8Wyovn/JX g3YSqvM0oSwE3lNH536wT1dB8BC6T5bNQTGMfA5HqjW8qe/1aSrcJPNCiLKiOG/K/jGU 3u5dQiK5Ql2c1vjSceH9ZWXV0oCOmIDbxr8onPjQBPuwuERiWKx9d+XXGZmWo5MHEypt xkJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DAYSDlul; 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 t12si19805760edc.179.2021.06.21.09.23.21; Mon, 21 Jun 2021 09:23:43 -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=DAYSDlul; 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 S230523AbhFUQYD (ORCPT + 99 others); Mon, 21 Jun 2021 12:24:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:41362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231735AbhFUQWf (ORCPT ); Mon, 21 Jun 2021 12:22:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 190D861206; Mon, 21 Jun 2021 16:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292401; bh=wS3VcZXp4P18gbG9RtHlDEtp4jeWD3RNiZ7RWKuP4M0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DAYSDlulUofHXiZi4OSWi7f9NonLvOYdDXODurnMZinl3jMxBrPOAEiRGkHCX1KaB V3sftf0oMc2bOA4sbSvBifn0Owuaoamxdu8LFMbe2vctejkgLZV8qfv4212Rr6TTYw 1arQEeYZjvGFogAnBQRvf8PnRe1UTRNvdL6/KAPA= 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.4 43/90] regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting Date: Mon, 21 Jun 2021 18:15:18 +0200 Message-Id: <20210621154905.578340654@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@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 b0109ee6dae2..1c3014d2f28b 100644 --- a/include/linux/mfd/rohm-bd70528.h +++ b/include/linux/mfd/rohm-bd70528.h @@ -25,9 +25,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