summaryrefslogtreecommitdiff
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-08 15:40:22 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-08 15:47:05 +0900
commit18694886bddb2d4d905535a0149aeef3b5f9c936 (patch)
treeb18fb8477f049f1ad7b06022bf59a50f0201143d /include/linux/regmap.h
parent2e2ae66df37a14c9b33889b243b0ae1352ada1dd (diff)
regmap: Add precious registers to the driver interface
Some devices are sensitive to reads on their registers, especially for things like clear on read interrupt status registers. Avoid creating problems with these with things like debugfs by allowing drivers to tell the core about them. If a register is marked as precious then the core will not internally generate any reads of it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index aef2b36a8ccf..c878a4bf717e 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -33,6 +33,9 @@ struct spi_device;
* can be read from.
* @volatile_register: Optional callback returning true if the register
* value can't be cached.
+ * @precious_register: Optional callback returning true if the rgister
+ * should not be read outside of a call from the driver
+ * (eg, a clear on read interrupt status register).
*/
struct regmap_config {
int reg_bits;
@@ -42,6 +45,7 @@ struct regmap_config {
bool (*writeable_reg)(struct device *dev, unsigned int reg);
bool (*readable_reg)(struct device *dev, unsigned int reg);
bool (*volatile_reg)(struct device *dev, unsigned int reg);
+ bool (*precious_reg)(struct device *dev, unsigned int reg);
};
typedef int (*regmap_hw_write)(struct device *dev, const void *data,