diff options
author | Baolin Wang <baolin.wang@linaro.org> | 2017-11-01 10:11:55 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-11-01 10:06:29 +0000 |
commit | 8698b9364710e7bac84b3af07dd410e39c8c2e08 (patch) | |
tree | 78f4e1c6341aa609c76583fd9030241c72b2e3cd /include/linux/regmap.h | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) |
regmap: Add hardware spinlock support
On some platforms, when reading or writing some special registers through
regmap, we should acquire one hardware spinlock to synchronize between
the multiple subsystems. Thus this patch adds the hardware spinlock
support for regmap.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r-- | include/linux/regmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 978abfbac617..edc32aac84d7 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -273,6 +273,9 @@ typedef void (*regmap_unlock)(void *); * * @ranges: Array of configuration entries for virtual address ranges. * @num_ranges: Number of range configuration entries. + * @hwlock_id: Specify the hardware spinlock id. + * @hwlock_mode: The hardware spinlock mode, should be HWLOCK_IRQSTATE, + * HWLOCK_IRQ or 0. */ struct regmap_config { const char *name; @@ -317,6 +320,9 @@ struct regmap_config { const struct regmap_range_cfg *ranges; unsigned int num_ranges; + + unsigned int hwlock_id; + unsigned int hwlock_mode; }; /** |