From nobody Mon Dec 1 22:37:26 2025 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 38B3032D45B for ; Thu, 27 Nov 2025 11:18:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764242326; cv=none; b=eLFvFhllx/hrbpuFIVrTGGXQDOTMrhrUuk9zZMONn7Il55Lmu/8bdIxiDvh2DPje4zqCY4Cg1oFFC0vVzOmRBLtUZ2CTK+92upkCkhl+t951+9WBtWLCy5H6/nt7oci9GFWrtpXuzeYTlJzGGJkfVS8g8CDvG00GJ1S93aGBfUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764242326; c=relaxed/simple; bh=84/FiJ7Wz12hpihHK173qSyLT7SNK3LQvodxQCupaeA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aQ7XYcwOnD3nKuGEh8zQY64tCq5LNlmZ3ZdptsxF+ptZKYbv1KnPjdEK/SgPcDWDislpEC8uzvhCv5Ue+gunEDSCx0rzfjJoUzPEhA+Rl44gwqRc/0yi99hd8PkHoucQsAN/Dm7bZ1mwP4rFHwWc4Tn9YiUGzvW81fOFtR4tPy4= 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=dVgnyx1b; arc=none smtp.client-ip=91.218.175.183 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="dVgnyx1b" Date: Thu, 27 Nov 2025 13:18:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1764242322; 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=J4XJtN8r/GhA21vQyepW0SUPAkl49XRlmzDtT0JpHew=; b=dVgnyx1bzMBX6vfni7/xpSwLvCitlel89bqlN01GPfWBSxOMLRwhZjeGFLkPo1eR9UFDZA QVmI5iAZpsdgCn4CuPoSmxeozAqFsSVLz7nuMb/QC+IB3HxYc5MUhtcquzPS5a6rg4dNgU XoE6E/fNAPB0Y1N2SPQNBcaAV2AZDcg= 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 v6 07/17] mfd: rohm-bd71828: Use regmap_reg_range() Message-ID: <051154a1dc2706c87d1ec5369866a17297cf64b2.1764241265.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="jmj6tq80uQ3EwEbq" Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT --jmj6tq80uQ3EwEbq 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 --jmj6tq80uQ3EwEbq Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmkoM4oACgkQeFA3/03a ocWrOQf9HX3J8kxocBJTFX59Pt2B0200an3P3gpnnbchIVdHYVLtGjX7HmhqvRhg tfbZSZObEC0E8ZfMsx9f7rPW2bP9HutlNVvB1W+E72yoBP3Mnye59CDLIz+tuZdJ jduIDetqNJuCeWLyXTHHBgftDSEtTvU2r/LsSm32XRHdi0OBdxNEXiK2l3OHM7lM g/Chzav4OB5t2o3ea2pvJi27IbXiCZMDRvMebmYoZsHHO+npFFCYuoY94O6gH+vm 0S4kKRMsAAbwO92QtjEfEik9zD2/frVCBJhpzfNSjTuBf6OOlmfX/o0rboEdw5PH RwusMmzIdsgK77Qttpd3NfeUqklDXg== =Fjk3 -----END PGP SIGNATURE----- --jmj6tq80uQ3EwEbq--