[U-Boot] [PATCH v4 07/13] regmap: Add raw read/write functions

Anatolij Gustschin agust at denx.de
Mon Aug 6 13:11:08 UTC 2018


On Fri,  3 Aug 2018 10:01:12 +0200
Mario Six mario.six at gdsys.cc wrote:

> The regmap functions currently assume that all register map accesses
> have a data width of 32 bits, but there are maps that have different
> widths.
> 
> To rectify this, implement the regmap_raw_read and regmap_raw_write
> functions from the Linux kernel API that specify the width of a desired
> read or write operation on a regmap.
> 
> Implement the regmap_read and regmap_write functions using these raw
> functions in a backwards-compatible manner.
> 
> Reviewed-by: Anatolij Gustschin <agust at denx.de>
> Signed-off-by: Mario Six <mario.six at gdsys.cc>
> 
> ---
> 
> v3 -> v4:
> * Switched 'ranges[0] + offset' to 'ranges[0].start + offset'
> * Explained the difference between the raw and non-raw read/write
>   functions better in the docs
> 
> v2 -> v3:
> * Implement the "raw" functions from Linux instead of adding a size
>   parameter to the regmap_{read,write} functions
> * Fixed style violation
> * Improved error handling
> 
> v1 -> v2:
> New in v2
> 
> ---
>  drivers/core/regmap.c | 54 ++++++++++++++++++++++++++++++++++++++++++-------
>  include/regmap.h      | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 103 insertions(+), 7 deletions(-)

Applied to u-boot-staging/agust at denx.de, thanks!

--
Anatolij


More information about the U-Boot mailing list