From nobody Tue Dec 16 06:23:21 2025 Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F80A2C326F for ; Mon, 15 Dec 2025 13:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765804758; cv=none; b=Fw/a61OO/rs6Uh/Zv9bd/ZXzB9UQukQAgujflpMbKa4yjAX6lFPSiY4nn2HmaY+LSvpr4HWaluIlIY4lbDiW4Iywx30HCG/xGeQlJab9Xe0zk+Relt/TRJsRDCRjrCwVc1R8++jRMJ/KUlnTgeYryjtfA0/s+7KJvc1JwFXGSVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765804758; c=relaxed/simple; bh=aX8TqCDIu1f7oCayRBR9cGtLxkKlWj288Ii5xBRaNDM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WA1dzWy8HZ/6/XF2lq0XBPtpaBPTUJ/9GFtuIR0G6PSRxTqRphSUoD9y9/3ENKnPoPFYEUQwWntCavKj1Hq3sOY3lh3rIejl4tpSVSk5MBrV685x6zqldYSderzh0CKKW3JjpYpTE4WEaXHKjt7Gv5YOTA4ZtQhMbVt+f3BeftE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=TrCqz26+; arc=none smtp.client-ip=95.215.58.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="TrCqz26+" Date: Mon, 15 Dec 2025 15:19:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1765804753; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=H8yxFxLMjPCOCLA1U0kiUpBUbotHIHucuwzwE047ujQ=; b=TrCqz26+QNzMOG+ttwNnCgnCrGiwBYX0eYse7HJvTgCljFnZNkKbUyl188lZnBbgRzIEYQ eEa9VGb0QWBJLgtyVNc6W7jGVEaOhH+sOS1AZkHUP50AGmagFsxVfuCp1f70FhGlG5bCf/ lNDa7YVtv1IcHd16xW86P6mU8cw/O8U= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Lee Jones , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Liam Girdwood , Mark Brown , Michael Turquette , Stephen Boyd , Matti Vaittinen , Linus Walleij , Bartosz Golaszewski , Alexandre Belloni , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org, Andreas Kemnade Subject: [PATCH RESEND v6 07/17] mfd: rohm-bd71828: Use regmap_reg_range() Message-ID: <49607e65ca117b096a50c5784b760bf62553e29a.1765804226.git.mazziesaccount@gmail.com> Reply-To: Matti Vaittinen References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/2CAUrW4R+Da10ti" Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT --/2CAUrW4R+Da10ti Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Matti Vaittinen The regmap range tables tend to be somewhat verbose. Using the regmap_reg_range() can make the definitions slightly mode compact. Tidy the regmap range tables by using the regmap_reg_range(). Signed-off-by: Matti Vaittinen --- Revision history: v2 =3D> : - no changes RFCv1 =3D> v2: - New patch --- drivers/mfd/rohm-bd71828.c | 64 +++++++++++--------------------------- 1 file changed, 18 insertions(+), 46 deletions(-) diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c index 84a64c3b9c9f..2a43005b67ee 100644 --- a/drivers/mfd/rohm-bd71828.c +++ b/drivers/mfd/rohm-bd71828.c @@ -157,55 +157,27 @@ static struct mfd_cell bd71828_mfd_cells[] =3D { }; =20 static const struct regmap_range bd71815_volatile_ranges[] =3D { - { - .range_min =3D BD71815_REG_SEC, - .range_max =3D BD71815_REG_YEAR, - }, { - .range_min =3D BD71815_REG_CONF, - .range_max =3D BD71815_REG_BAT_TEMP, - }, { - .range_min =3D BD71815_REG_VM_IBAT_U, - .range_max =3D BD71815_REG_CC_CTRL, - }, { - .range_min =3D BD71815_REG_CC_STAT, - .range_max =3D BD71815_REG_CC_CURCD_L, - }, { - .range_min =3D BD71815_REG_VM_BTMP_MON, - .range_max =3D BD71815_REG_VM_BTMP_MON, - }, { - .range_min =3D BD71815_REG_INT_STAT, - .range_max =3D BD71815_REG_INT_UPDATE, - }, { - .range_min =3D BD71815_REG_VM_VSYS_U, - .range_max =3D BD71815_REG_REX_CTRL_1, - }, { - .range_min =3D BD71815_REG_FULL_CCNTD_3, - .range_max =3D BD71815_REG_CCNTD_CHG_2, - }, + regmap_reg_range(BD71815_REG_SEC, BD71815_REG_YEAR), + regmap_reg_range(BD71815_REG_CONF, BD71815_REG_BAT_TEMP), + regmap_reg_range(BD71815_REG_VM_IBAT_U, BD71815_REG_CC_CTRL), + regmap_reg_range(BD71815_REG_CC_STAT, BD71815_REG_CC_CURCD_L), + regmap_reg_range(BD71815_REG_VM_BTMP_MON, BD71815_REG_VM_BTMP_MON), + regmap_reg_range(BD71815_REG_INT_STAT, BD71815_REG_INT_UPDATE), + regmap_reg_range(BD71815_REG_VM_VSYS_U, BD71815_REG_REX_CTRL_1), + regmap_reg_range(BD71815_REG_FULL_CCNTD_3, BD71815_REG_CCNTD_CHG_2), }; =20 static const struct regmap_range bd71828_volatile_ranges[] =3D { - { - .range_min =3D BD71828_REG_PS_CTRL_1, - .range_max =3D BD71828_REG_PS_CTRL_1, - }, { - .range_min =3D BD71828_REG_PS_CTRL_3, - .range_max =3D BD71828_REG_PS_CTRL_3, - }, { - .range_min =3D BD71828_REG_RTC_SEC, - .range_max =3D BD71828_REG_RTC_YEAR, - }, { - /* - * For now make all charger registers volatile because many - * needs to be and because the charger block is not that - * performance critical. - */ - .range_min =3D BD71828_REG_CHG_STATE, - .range_max =3D BD71828_REG_CHG_FULL, - }, { - .range_min =3D BD71828_REG_INT_MAIN, - .range_max =3D BD71828_REG_IO_STAT, - }, + regmap_reg_range(BD71828_REG_PS_CTRL_1, BD71828_REG_PS_CTRL_1), + regmap_reg_range(BD71828_REG_PS_CTRL_3, BD71828_REG_PS_CTRL_3), + regmap_reg_range(BD71828_REG_RTC_SEC, BD71828_REG_RTC_YEAR), + /* + * For now make all charger registers volatile because many + * needs to be and because the charger block is not that + * performance critical. + */ + regmap_reg_range(BD71828_REG_CHG_STATE, BD71828_REG_CHG_FULL), + regmap_reg_range(BD71828_REG_INT_MAIN, BD71828_REG_IO_STAT), }; =20 static const struct regmap_access_table bd71815_volatile_regs =3D { --=20 2.52.0 --/2CAUrW4R+Da10ti Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmlACsQACgkQeFA3/03a ocW5xwgAssbHIXXoJXh07naGKKtYIuIV6O5VbT/cqIyOLlEr0yAVzwKbdyiyUup2 Xl8s2RAU0f86/uZK2WUy8IXSnnjsHrFhdoJlohHXQViAL0QicyCb0M9+DhzfMBPt Paj4TesMfSDtuG3b0vl1vZJVsv5HIW0WcUieacFjd7i4TVuGaJnJLvOgrOsZTNUh uFk30MLSWuZWNOT2PkCQNNP/MyktQqL3VVO4b5hCe1t9FGZ1enaaZNxHk78GclwH psbhPvWacUbTlvulqXok1mi/9Dl5IpV+FDxM8MtUtB7EIM+m3OirK3M80WfRAJ4x PGTpO1wSkE3duAkZKlkUXmjdpRGd2Q== =cgOw -----END PGP SIGNATURE----- --/2CAUrW4R+Da10ti--