Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: rohm-bd71828: Use regmap_reg_range()

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 <mazziesaccount@gmail.com>
Link: https://patch.msgid.link/49607e65ca117b096a50c5784b760bf62553e29a.1765804226.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Matti Vaittinen and committed by
Lee Jones
016e95b1 9144a761

+18 -46
+18 -46
drivers/mfd/rohm-bd71828.c
··· 157 157 }; 158 158 159 159 static const struct regmap_range bd71815_volatile_ranges[] = { 160 - { 161 - .range_min = BD71815_REG_SEC, 162 - .range_max = BD71815_REG_YEAR, 163 - }, { 164 - .range_min = BD71815_REG_CONF, 165 - .range_max = BD71815_REG_BAT_TEMP, 166 - }, { 167 - .range_min = BD71815_REG_VM_IBAT_U, 168 - .range_max = BD71815_REG_CC_CTRL, 169 - }, { 170 - .range_min = BD71815_REG_CC_STAT, 171 - .range_max = BD71815_REG_CC_CURCD_L, 172 - }, { 173 - .range_min = BD71815_REG_VM_BTMP_MON, 174 - .range_max = BD71815_REG_VM_BTMP_MON, 175 - }, { 176 - .range_min = BD71815_REG_INT_STAT, 177 - .range_max = BD71815_REG_INT_UPDATE, 178 - }, { 179 - .range_min = BD71815_REG_VM_VSYS_U, 180 - .range_max = BD71815_REG_REX_CTRL_1, 181 - }, { 182 - .range_min = BD71815_REG_FULL_CCNTD_3, 183 - .range_max = BD71815_REG_CCNTD_CHG_2, 184 - }, 160 + regmap_reg_range(BD71815_REG_SEC, BD71815_REG_YEAR), 161 + regmap_reg_range(BD71815_REG_CONF, BD71815_REG_BAT_TEMP), 162 + regmap_reg_range(BD71815_REG_VM_IBAT_U, BD71815_REG_CC_CTRL), 163 + regmap_reg_range(BD71815_REG_CC_STAT, BD71815_REG_CC_CURCD_L), 164 + regmap_reg_range(BD71815_REG_VM_BTMP_MON, BD71815_REG_VM_BTMP_MON), 165 + regmap_reg_range(BD71815_REG_INT_STAT, BD71815_REG_INT_UPDATE), 166 + regmap_reg_range(BD71815_REG_VM_VSYS_U, BD71815_REG_REX_CTRL_1), 167 + regmap_reg_range(BD71815_REG_FULL_CCNTD_3, BD71815_REG_CCNTD_CHG_2), 185 168 }; 186 169 187 170 static const struct regmap_range bd71828_volatile_ranges[] = { 188 - { 189 - .range_min = BD71828_REG_PS_CTRL_1, 190 - .range_max = BD71828_REG_PS_CTRL_1, 191 - }, { 192 - .range_min = BD71828_REG_PS_CTRL_3, 193 - .range_max = BD71828_REG_PS_CTRL_3, 194 - }, { 195 - .range_min = BD71828_REG_RTC_SEC, 196 - .range_max = BD71828_REG_RTC_YEAR, 197 - }, { 198 - /* 199 - * For now make all charger registers volatile because many 200 - * needs to be and because the charger block is not that 201 - * performance critical. 202 - */ 203 - .range_min = BD71828_REG_CHG_STATE, 204 - .range_max = BD71828_REG_CHG_FULL, 205 - }, { 206 - .range_min = BD71828_REG_INT_MAIN, 207 - .range_max = BD71828_REG_IO_STAT, 208 - }, 171 + regmap_reg_range(BD71828_REG_PS_CTRL_1, BD71828_REG_PS_CTRL_1), 172 + regmap_reg_range(BD71828_REG_PS_CTRL_3, BD71828_REG_PS_CTRL_3), 173 + regmap_reg_range(BD71828_REG_RTC_SEC, BD71828_REG_RTC_YEAR), 174 + /* 175 + * For now make all charger registers volatile because many 176 + * needs to be and because the charger block is not that 177 + * performance critical. 178 + */ 179 + regmap_reg_range(BD71828_REG_CHG_STATE, BD71828_REG_CHG_FULL), 180 + regmap_reg_range(BD71828_REG_INT_MAIN, BD71828_REG_IO_STAT), 209 181 }; 210 182 211 183 static const struct regmap_access_table bd71815_volatile_regs = {