Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2660158pxj; Mon, 14 Jun 2021 04:16:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/nNjFnHz/gOSF3X47r/+X9Vq1ss9PTsgUjivMebnDhtcKDzThTpKuAClT3eNVSq28R+NF X-Received: by 2002:a05:6402:11d3:: with SMTP id j19mr16500345edw.247.1623669400534; Mon, 14 Jun 2021 04:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623669400; cv=none; d=google.com; s=arc-20160816; b=MSj05EkvHkfjZNOcZ76rtdM5+6qRch8AXNSlv5aC2GGmw+4Q3k/8eCNT/zdJpyLDVO KfUw1TCJEf0+dUzB8moE7HF0JQ775ssaDo/BTGPEU8TEdiPHNq/51iMyhDsRdLE4cBjg qvzP1wZoF08DflvC2Fn3NE6wFs52xnYeEm/8OnfryX4w8TZiB4is/+VZhSVhaWVkS9Gv B9A0rSDXGdwnPbtJ9P2LcOEoFQxEYXEWBchKPagLjgqH4NKinpR0e+aGhXakwQJKtXMG Gf1fdZYCDYqEPQ96Y1VpaW/DlwtpcYjYDQGbk3Oo38E3+9E4ybMt1hX3i3pOjUqGJXv+ 6kLw== 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=4Kk7hPX0LIyJqhHvV7MwtwX65dEaWVQ7rJ5liFUd9FY=; b=oZZL2kJgpNKt6aXtdh5jgGFhKNE2sHH3KJdkzhk+OV95/qyJgoiMFUTBgm86WxEZFY bXAhCEOj4ohiincq3OQwchiPDYBO7t8r1mydaMNvdFon3/hYqH0lc1TkQeT2htsbUCTJ b0eu2OZ07AWBEnpkNV2lOTEyzOo+OFpBB1FqOPukA6CW0HHIIMDlR2VWNoclnu1YlPaE nl2/RU0Iwk2ma8i3qfZxCMTMEDEPbJYgVP0qL/bUs7+Di5nTKSnFlj54g1CneX8Gr0rd gxiA3qNu+xMavl6NakL/3xiv3WCYPP+y70fn5093Gt75pgLZXLdqqFx/AeBUWlNttluy HWCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JVNenN8P; 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 13si10897403eje.700.2021.06.14.04.16.17; Mon, 14 Jun 2021 04:16:40 -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=JVNenN8P; 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 S235595AbhFNLR3 (ORCPT + 99 others); Mon, 14 Jun 2021 07:17:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:39158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235156AbhFNLEz (ORCPT ); Mon, 14 Jun 2021 07:04:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D9A4F6191F; Mon, 14 Jun 2021 10:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623667489; bh=Pfz7gHmAyftGm2ZvBohtaZWXRcMzA32LMywpLREbVHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JVNenN8Prvj7u0wfxVDy8iftEukrTUH3SDJ+2MmhFwjMClGSaWP/00M600IlEbRmc JKQYwTK2slLMR/NdJmNJJAXgHX3Ee46bXoYB+o+rEra86tAvS+RYKIU6uQUj1qU+7p 3drrGja351wWSfhbtfG9WoataV+aIG61a34Mw+1M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matti Vaittinen , Mark Brown Subject: [PATCH 5.10 092/131] regulator: bd718x7: Fix the BUCK7 voltage setting on BD71837 Date: Mon, 14 Jun 2021 12:27:33 +0200 Message-Id: <20210614102656.118013821@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: Matti Vaittinen commit bc537e65b09a05923f98a31920d1ab170e648dba upstream. Changing the BD71837 voltages for other regulators except the first 4 BUCKs should be forbidden when the regulator is enabled. There may be out-of-spec voltage spikes if the voltage of these "non DVS" bucks is changed when enabled. This restriction was accidentally removed when the LDO voltage change was allowed for BD71847. (It was not noticed that the BD71837 BUCK7 used same voltage setting function as LDOs). Additionally this bug causes incorrect voltage monitoring register access. The voltage change function accidentally used for bd71837 BUCK7 is intended to only handle LDO voltage changes. A BD71847 LDO specific voltage monitoring disabling code gets executed on BD71837 and register offsets are wrongly calculated as regulator is assumed to be an LDO. Prevent the BD71837 BUCK7 voltage change when BUCK7 is enabled by using the correct voltage setting operation. Fixes: 9bcbabafa19b ("regulator: bd718x7: remove voltage change restriction from BD71847 LDOs") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/bd8c00931421fafa57e3fdf46557a83075b7cc17.1622610103.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/regulator/bd718x7-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/regulator/bd718x7-regulator.c +++ b/drivers/regulator/bd718x7-regulator.c @@ -364,7 +364,7 @@ BD718XX_OPS(bd71837_buck_regulator_ops, NULL); BD718XX_OPS(bd71837_buck_regulator_nolinear_ops, regulator_list_voltage_table, - regulator_map_voltage_ascend, bd718xx_set_voltage_sel_restricted, + regulator_map_voltage_ascend, bd71837_set_voltage_sel_restricted, regulator_get_voltage_sel_regmap, regulator_set_voltage_time_sel, NULL); /*