Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3926852pxj; Mon, 21 Jun 2021 09:32:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHCjPxyRkYcyhO2DGdz36FvNb5Bw58RmYL0qFiuFCLIduqdXPJrCHdnlLbJ7B8ri7hJB52 X-Received: by 2002:a05:6e02:1ca8:: with SMTP id x8mr18854982ill.163.1624293128637; Mon, 21 Jun 2021 09:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293128; cv=none; d=google.com; s=arc-20160816; b=Vyh+Z6ygXXQjQwZimmowQh1xzARuZ+at87ctZX2SOsNBppN67kBnQRJ0jABUvGHvWM frX2pvlyqYNisrl+d6JBwuD8LDa4Fe7vJNmx9wVSXFiaVjr5LJB5kuRS/3VLy2pUO8zd 5fKn5jvk3/8+c4wobUYDtIXv4jE9xzs1gOi6Gqvl1DbzNCzN13ltzocl8m85/CvG2Xlf qj1f/r+V6gDpniumYPdX4adwQu9k1E06SHYPteysrwY/cdc25+8uxpCDh9tYf0wTm/Ni mS0D41oEJgHmzXyyRWQHlTuM4/LChGV0irK7Ly3ZDkZa42s/acQC6Xq2PeO4YahcXhGz Bpvg== 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=IH0XZ8CgB7518PreO9J1iZJ8WF0NtZNjN6f9YfJnoBEMJLlsdmXx8rYJtfFTe19qS2 SIZOnP5uJzqf13EZayRR1C0p7hZYBgFIEjbAS/Pf/5UiNYUa84RBf7pYAczMIHPy8bcT rMb8dBx5/29cWGB43UL0kJ5o1PXWRb9i2fJ1SKBt2I6EqzUu0u8DISqkGHhGC4bRJ0Gh aVOuaMBCLHZa/3CKy3EM7clBBMfr5RssChSO4DCy2xBGndT5o+iOmWNHqf74onbfCeLV UatB76lHkkeKYW8JzmCV9XdPp8mZPmmktuHAs94vxktT5ao10UdpfFNGWceQqwHaX62F VAHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yryAREZC; 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 o12si9696087jam.119.2021.06.21.09.31.56; Mon, 21 Jun 2021 09:32:08 -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=yryAREZC; 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 S230403AbhFUQdk (ORCPT + 99 others); Mon, 21 Jun 2021 12:33:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:48572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231636AbhFUQaK (ORCPT ); Mon, 21 Jun 2021 12:30:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F1DB1613F9; Mon, 21 Jun 2021 16:25:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292703; bh=DwaduLBUarpPFjUZGNZPYa6zqcD6k3NaZkMshJsPlpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yryAREZCJ7Zs7ZUPncKURZlXVeosRXft3+EtBztOQbk4I2FvPa0aajcmRkQwyjcNw r4kOcHH97/QefkbqQ1dLUw1wbCcJPJeNh9/5YtsOkJnx+9wUPLHVuLDjeEmRAy1/D2 s4uQkdX4WzFcOLYzCMyD24iNlYVnTVawSZ/XLRZc= 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.10 081/146] regulator: rtmv20: Fix to make regcache value first reading back from HW Date: Mon, 21 Jun 2021 18:15:11 +0200 Message-Id: <20210621154916.138915879@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: 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