summaryrefslogtreecommitdiffstats
path: root/include/regmap.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-04-16 18:40:49 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-16 18:40:49 +0200
commita1f5e9f895c704f068cf038bc05cbac6f7c9f310 (patch)
tree1d97a0993e8035d2137b1e5520b26a6c099b352d /include/regmap.h
parent32a48332753ac141998197f9f0e9c99d0d855102 (diff)
parent27d4a8f9a277ca362c7d6cecb53b65159c4bea10 (diff)
downloadbarebox-a1f5e9f895c704f068cf038bc05cbac6f7c9f310.tar.gz
barebox-a1f5e9f895c704f068cf038bc05cbac6f7c9f310.tar.xz
Merge branch 'for-next/spi'
Diffstat (limited to 'include/regmap.h')
-rw-r--r--include/regmap.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/include/regmap.h b/include/regmap.h
index 53f8d0d6e7..b43cd936fa 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -2,6 +2,14 @@
#ifndef __REGMAP_H
#define __REGMAP_H
+enum regmap_endian {
+ /* Unspecified -> 0 -> Backwards compatible default */
+ REGMAP_ENDIAN_DEFAULT = 0,
+ REGMAP_ENDIAN_BIG,
+ REGMAP_ENDIAN_LITTLE,
+ REGMAP_ENDIAN_NATIVE,
+};
+
/**
* Configuration for the register map of a device.
*
@@ -26,6 +34,9 @@ struct regmap_config {
int val_bits;
unsigned int max_register;
+
+ enum regmap_endian reg_format_endian;
+ enum regmap_endian val_format_endian;
};
typedef int (*regmap_hw_reg_read)(void *context, unsigned int reg,
@@ -36,6 +47,8 @@ typedef int (*regmap_hw_reg_write)(void *context, unsigned int reg,
struct regmap_bus {
regmap_hw_reg_write reg_write;
regmap_hw_reg_read reg_read;
+ enum regmap_endian reg_format_endian_default;
+ enum regmap_endian val_format_endian_default;
};
struct device_d;
@@ -49,21 +62,6 @@ struct regmap *regmap_init(struct device_d *dev,
struct clk;
/**
- * of_regmap_init_mmio_clk() - Initialise register map with register clock
- *
- * @np: Device node that will be interacted with
- * @clk_id: register clock consumer ID
- * @regs: Pointer to memory-mapped IO region
- * @config: Configuration for register map
- *
- * The return value will be an ERR_PTR() on error or a valid pointer to
- * a struct regmap.
- */
-struct regmap *of_regmap_init_mmio_clk(struct device_node *np, const char *clk_id,
- void __iomem *regs,
- const struct regmap_config *config);
-
-/**
* regmap_init_mmio_clk() - Initialise register map with register clock
*
* @dev: Device that will be interacted with