summaryrefslogtreecommitdiffstats
path: root/include/regulator.h
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2019-11-06 08:11:48 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-11-06 11:22:36 +0100
commit764cc5cb7659c06f5818d95d2e20257006aefb0a (patch)
tree7461b797e999518bc333d5f08eb88e82640ad075 /include/regulator.h
parentd510bd6e5746dcba23c11fd03494c2f9114e0ac7 (diff)
downloadbarebox-764cc5cb7659c06f5818d95d2e20257006aefb0a.tar.gz
barebox-764cc5cb7659c06f5818d95d2e20257006aefb0a.tar.xz
regulator: copy upstream struct regulator_desc documentation
This imports the regulator_desc documentation for the fields barebox uses out of Linux v5.4-rc1. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/regulator.h')
-rw-r--r--include/regulator.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/regulator.h b/include/regulator.h
index cd1d3ccf55..28ae25652a 100644
--- a/include/regulator.h
+++ b/include/regulator.h
@@ -4,6 +4,34 @@
/* struct regulator is an opaque object for consumers */
struct regulator;
+/**
+ * struct regulator_desc - Static regulator descriptor
+ *
+ * Each regulator registered with the core is described with a
+ * structure of this type and a struct regulator_config. This
+ * structure contains the non-varying parts of the regulator
+ * description.
+ *
+ * @n_voltages: Number of selectors available for ops.list_voltage().
+ * @ops: Regulator operations table.
+ *
+ * @min_uV: Voltage given by the lowest selector (if linear mapping)
+ * @uV_step: Voltage increase with each selector (if linear mapping)
+ * @linear_min_sel: Minimal selector for starting linear mapping
+ *
+ * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_
+ * @vsel_mask: Mask for register bitfield used for selector
+ * @apply_reg: Register for initiate voltage change on the output when
+ * using regulator_set_voltage_sel_regmap
+ * @apply_bit: Register bitfield used for initiate voltage change on the
+ * output when using regulator_set_voltage_sel_regmap
+ * @enable_reg: Register for control when using regmap enable/disable ops
+ * @enable_mask: Mask for control when using regmap enable/disable ops
+ * @enable_val: Enabling value for control when using regmap enable/disable ops
+ * @disable_val: Disabling value for control when using regmap enable/disable ops
+ * @enable_is_inverted: A flag to indicate set enable_mask bits to disable
+ * when using regulator_enable_regmap and friends APIs.
+ */
struct regulator_desc {
unsigned n_voltages;
const struct regulator_ops *ops;