aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-04 17:48:28 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-06 05:47:34 -0400
commitbacdbe077342ecc9e7b3e374cc5a41995116706a (patch)
treeb5cf9547a0ab4a7fba287a3d654d132869057afa /include/linux/regmap.h
parent0135bbcc7a0cc056f0203ff839466236b8e3dc19 (diff)
regmap: introduce fast_io busses, and use a spinlock for them
Some bus types have very fast IO. For these, acquiring a mutex for every IO operation is a significant overhead. Allow busses to indicate their IO is fast, and enhance regmap to use a spinlock for those busses. [Currently limited to native endian registers -- broonie] Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 8fd341e613d6..f14588a96eaf 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -110,6 +110,8 @@ typedef void (*regmap_hw_free_context)(void *context);
110/** 110/**
111 * Description of a hardware bus for the register map infrastructure. 111 * Description of a hardware bus for the register map infrastructure.
112 * 112 *
113 * @fast_io: Register IO is fast. Use a spinlock instead of a mutex
114 * to perform locking.
113 * @write: Write operation. 115 * @write: Write operation.
114 * @gather_write: Write operation with split register/value, return -ENOTSUPP 116 * @gather_write: Write operation with split register/value, return -ENOTSUPP
115 * if not implemented on a given device. 117 * if not implemented on a given device.
@@ -119,6 +121,7 @@ typedef void (*regmap_hw_free_context)(void *context);
119 * a read. 121 * a read.
120 */ 122 */
121struct regmap_bus { 123struct regmap_bus {
124 bool fast_io;
122 regmap_hw_write write; 125 regmap_hw_write write;
123 regmap_hw_gather_write gather_write; 126 regmap_hw_gather_write gather_write;
124 regmap_hw_read read; 127 regmap_hw_read read;