From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Thu, 2 Aug 2018 00:18:01 +0200 Subject: [U-Boot] [PATCH v3 09/13] regmap: Define regmap_{get,set} In-Reply-To: <20180731100110.4852-9-mario.six@gdsys.cc> References: <20180731100110.4852-1-mario.six@gdsys.cc> <20180731100110.4852-9-mario.six@gdsys.cc> Message-ID: <20180802001801.5977f5dc@crub> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 31 Jul 2018 12:01:06 +0200 Mario Six mario.six at gdsys.cc wrote: > It would be convenient if one could use the regmap API in conjunction > with register maps defined as structs (i.e. structs that directly mirror > the memory layout of the registers in question). A similar approach was > planned with the regmap_write32/regmap_read32 macros, but was never > used. > > Hence, implement regmap_set/regmap_range_set and > regmap_get/regmap_range_get macros, which, given a register map, a > struct describing the layout of the register map, and a member name > automatically produce regmap_read/regmap_write calls that access the > specified member in the register map. > > Signed-off-by: Mario Six > Reviewed-by: Simon Glass Reviewed-by: Anatolij Gustschin