Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3940118pxj; Mon, 21 Jun 2021 09:49:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtE8bbtJj0jw+SkhvKi5OX0mJoSF7d5ZemG1gN4ODq3kenyCbDDSHo4+LjB+mMAe8i/Fc+ X-Received: by 2002:a5d:8747:: with SMTP id k7mr19511122iol.83.1624294150373; Mon, 21 Jun 2021 09:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294150; cv=none; d=google.com; s=arc-20160816; b=Eg9x0rQsusUptHeLVlNf0PDIl4iSEeH6R46vS6lYdNo6R+ajh8SqgqPt+dTNobZ97t dK4D+COQy2XLL+UAJ4MjAvt1KHDfOVNvoCgmrBR5qTn0iEA/YCCsX72Nw1oX5jvIeCfE uX7S9w/wO8ZUrSrgjZ3Bbv9XFk+v0JenK2WdS3y1wrzo0RCo+ONGbdrNoY/wkSgdBms5 Kkc7K4iJ/KsG3omynNL00XR3lZ9PANjPCZjXBhkI6n4tlNzxUJQE+H26iw3ES8lwCpHs w+LDPBoUkepV67wdtAq2JIDwNm1z5SLo4W7mREG6V/U4B1+ajig0cOGVwJOLO+KGyqIm E9Pg== 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=4XtRslGGpztX9nWzLaRJdlGZImWBnDEtP8LUmfkIY30=; b=ibfWbNhkD2K2nyqC3+1ATxUn8pdBqosvBEbVcSmnvtnbMUub7eu0ES3xszI/vaMWvA vUyYD4XnBCwxkMAkUxuX1PzJdulFHDYTwyw6Daw+Gk4iA0iXwD99/7Un5HoJRP76nrGd DEAZKtM6p8+oCthZKOOh3pwNufDU4wO3sGLvUeoykAwtxt0M3hkOX6YD/WHuzCVV0f8k n/nm8MY/Od1bx7+d5VxkxLIrdoYoNA3gYHiE/wfamabh6i9+T88vHXyMR0bX2gL/SjYN cPR3uOqq3vsV19iykqtSYop1q9+48ZD6DuuE/PhifQvsmTwLH6Ui5xVxB/el1QWQgkmE 2/qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z7qaSJgD; 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 w21si19283918jal.38.2021.06.21.09.48.58; Mon, 21 Jun 2021 09:49:10 -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=z7qaSJgD; 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 S231753AbhFUQuT (ORCPT + 99 others); Mon, 21 Jun 2021 12:50:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:37574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234019AbhFUQp7 (ORCPT ); Mon, 21 Jun 2021 12:45:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D624461410; Mon, 21 Jun 2021 16:33:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293184; bh=DwaduLBUarpPFjUZGNZPYa6zqcD6k3NaZkMshJsPlpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z7qaSJgD1nip61lIiNmBREGd+lFEzrYM0tT3h00y75eHRpw6aIdN69Pzkgejm8mY8 d1wbe1sSKPKu1ZFmtaySaCxmFvsDhRk2MPfiEX5SCDdIGg8Mqh2oVbkljBJtL6py2g IXXnXOCiYdyWEeVBswy4GjOgQkUNVdM5S0LcK11E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, ChiYuan Huang , Mark Brown , Sasha Levin Subject: [PATCH 5.12 096/178] regulator: rtmv20: Fix to make regcache value first reading back from HW Date: Mon, 21 Jun 2021 18:15:10 +0200 Message-Id: <20210621154926.019075024@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: ChiYuan Huang [ Upstream commit 46639a5e684edd0b80ae9dff220f193feb356277 ] - Fix to make regcache value first reading back from HW. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1622542155-6373-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/rtmv20-regulator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/rtmv20-regulator.c b/drivers/regulator/rtmv20-regulator.c index 5adc552dffd5..4bca64de0f67 100644 --- a/drivers/regulator/rtmv20-regulator.c +++ b/drivers/regulator/rtmv20-regulator.c @@ -27,6 +27,7 @@ #define RTMV20_REG_LDIRQ 0x30 #define RTMV20_REG_LDSTAT 0x40 #define RTMV20_REG_LDMASK 0x50 +#define RTMV20_MAX_REGS (RTMV20_REG_LDMASK + 1) #define RTMV20_VID_MASK GENMASK(7, 4) #define RICHTEK_VID 0x80 @@ -313,6 +314,7 @@ static const struct regmap_config rtmv20_regmap_config = { .val_bits = 8, .cache_type = REGCACHE_RBTREE, .max_register = RTMV20_REG_LDMASK, + .num_reg_defaults_raw = RTMV20_MAX_REGS, .writeable_reg = rtmv20_is_accessible_reg, .readable_reg = rtmv20_is_accessible_reg, -- 2.30.2