]> git.dujemihanovic.xyz Git - u-boot.git/commit
regmap: Allow specifying read/write width
authorPratyush Yadav <p.yadav@ti.com>
Thu, 24 Sep 2020 04:34:12 +0000 (10:04 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 15:55:22 +0000 (11:55 -0400)
commit78aaedba9f1b92335a4f0ce8344f6abf7a63dccb
tree256b4ef8de84fe33e82ba0e2aec9ab92c4910627
parent97d8a6970a3da5856633f2a705f0687fca4af9a5
regmap: Allow specifying read/write width

Right now, regmap_read() and regmap_write() read/write a 32-bit value
only. To write other lengths, regmap_raw_read() and regmap_raw_write()
need to be used.

This means that any driver ported from Linux that relies on
regmap_{read,write}() to know the size already has to be updated at each
callsite. This makes the port harder to maintain.

So, allow specifying the read/write width to make it easier to port the
drivers, since now the only change needed is when initializing the
regmap.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/regmap.c
include/regmap.h