Commit b1248da
rtc: s5m: replace open-coded read/modify/write registers with regmap helpers
Instead of the open-coded read/modify/write sequence, we can simply use
the regmap helpers regmap_set_bits() and regmap_update_bits()
respectively.
This makes the code easier to read, and avoids extra work in case the
underlying bus supports updating bits via
struct regmap_bus::reg_update_bits() directly (which is the case for
S2MPG10 on gs101 where this driver communicates via ACPM).
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-31-d66d5f39b6bf@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>1 parent f5adb1f commit b1248da
1 file changed
Lines changed: 7 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 282 | | |
292 | | - | |
| 283 | + | |
| 284 | + | |
293 | 285 | | |
294 | 286 | | |
295 | 287 | | |
| |||
303 | 295 | | |
304 | 296 | | |
305 | 297 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 298 | + | |
314 | 299 | | |
315 | | - | |
| 300 | + | |
316 | 301 | | |
317 | 302 | | |
318 | | - | |
| 303 | + | |
319 | 304 | | |
320 | 305 | | |
321 | 306 | | |
| |||
327 | 312 | | |
328 | 313 | | |
329 | 314 | | |
330 | | - | |
| 315 | + | |
| 316 | + | |
331 | 317 | | |
332 | 318 | | |
333 | 319 | | |
| |||
0 commit comments