From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753967AbcBAQRi (ORCPT ); Mon, 1 Feb 2016 11:17:38 -0500 Received: from mail1.bemta5.messagelabs.com ([195.245.231.137]:54771 "EHLO mail1.bemta5.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751860AbcBAQRY (ORCPT ); Mon, 1 Feb 2016 11:17:24 -0500 X-Greylist: delayed 391 seconds by postgrey-1.27 at vger.kernel.org; Mon, 01 Feb 2016 11:17:24 EST X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-8.tower-179.messagelabs.com!1454343049!17483859!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked From: Steve Twiss Date: Mon, 1 Feb 2016 16:09:38 +0000 Subject: [PATCH V1] mfd: da9062: fix missing volatile registers in the core regmap_range volatile lists To: LINUXKERNEL , Lee Jones CC: David Dajun Chen , Support Opensource Message-ID: <20160201161049.7F7953FB84@swsrvapps-01.diasemi.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steve Twiss Add an updated set of registers listed in the core regmap_range volatile ranges defined for the DA9062. These new registers contain bits that cannot be considered under the full control of software. Under various conditions the hardware will set and/or automatically clear bit(s) contained in these registers. When using a cached version of regmap, the volatility of these registers must be identified otherwise the regmap operations may not ensure the registers are explicitly altered. As well as updating the list of volatile registers, this change will fix a corner case discovered in the DA9063 ONKEY which is used by the DA9062 core. In the ONKEY case, the CONTROL_B register is now listed as volatile in the regmap_range because it contains the bit field NONKEY_LOCK. This bit can be altered by hardware, in which case regmap must be notified of its ability to be manpiulated outside of software control. Signed-off-by: Steve Twiss --- Checks performed with linux-next/v4.5-rc1/scripts/checkpatch.pl da9062-core.c total: 0 errors, 0 warnings, 554 lines checked This patch applies against linux-next and v4.5-rc1 Regards, Steve drivers/mfd/da9062-core.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c index a9ad024..8f873866 100644 --- a/drivers/mfd/da9062-core.c +++ b/drivers/mfd/da9062-core.c @@ -388,11 +388,32 @@ static const struct regmap_range da9062_aa_volatile_ranges[] = { .range_min = DA9062AA_STATUS_D, .range_max = DA9062AA_EVENT_C, }, { - .range_min = DA9062AA_CONTROL_F, + .range_min = DA9062AA_CONTROL_A, + .range_max = DA9062AA_CONTROL_B, + }, { + .range_min = DA9062AA_CONTROL_E, .range_max = DA9062AA_CONTROL_F, }, { + .range_min = DA9062AA_BUCK2_CONT, + .range_max = DA9062AA_BUCK4_CONT, + }, { + .range_min = DA9062AA_BUCK3_CONT, + .range_max = DA9062AA_BUCK3_CONT, + }, { + .range_min = DA9062AA_LDO1_CONT, + .range_max = DA9062AA_LDO4_CONT, + }, { + .range_min = DA9062AA_DVC_1, + .range_max = DA9062AA_DVC_1, + }, { .range_min = DA9062AA_COUNT_S, .range_max = DA9062AA_SECOND_D, + }, { + .range_min = DA9062AA_SEQ, + .range_max = DA9062AA_SEQ, + }, { + .range_min = DA9062AA_EN_32K, + .range_max = DA9062AA_EN_32K, }, }; -- end-of-patch for PATCH V1