regmap: Add support for register indirect addressing.
authorKrystian Garbaciak <krystian.garbaciak@diasemi.com>
Fri, 15 Jun 2012 10:23:56 +0000 (11:23 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 17 Jun 2012 20:34:18 +0000 (21:34 +0100)
commit6863ca6227598d15c372f1e03449bbb4cfbcca7f
treef665b666606afe35dcfe38899bd153412fed4771
parentfc3ebd788e894b4dd6c9524cb3874eeeb1e862d6
regmap: Add support for register indirect addressing.

Devices with register paging or indirectly accessed registers can configure
register mapping to map those on virtual address range. During access to
virtually mapped register range, indirect addressing is processed
automatically, in following steps:
  1. selector for page or indirect register is updated (when needed);
  2. register in data window is accessed.

Configuration should provide minimum and maximum register for virtual range,
details of selector field for page selection, minimum and maximum register of
data window for indirect access.

Virtual range registers are managed by cache as well as direct access
registers. In order to make indirect access more efficient, selector register
should be declared as non-volatile, if possible.

struct regmap_config is extended with the following:
struct regmap_range_cfg *ranges;
unsigned int n_ranges;

[Also reordered debugfs init to later on since the cleanup code was
conflicting with the new cleanup code for ranges anyway -- broonie]

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/internal.h
drivers/base/regmap/regmap.c
include/linux/regmap.h
This page took 0.025515 seconds and 5 git commands to generate.