summaryrefslogtreecommitdiff
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2021-10-15 10:14:46 +0200
committerLee Jones <lee.jones@linaro.org>2021-10-21 09:15:56 +0100
commite967b60eb51116d2347093655e555aa036dd40d8 (patch)
tree5acc23ce9caa94d4e6855f237708548ff7a86a7f /include/linux/mfd
parentb7cb7bf11817129c623fa921a1d6cd86b3cb727b (diff)
mfd: ti_am335x_tscadc: Clarify the maximum values for DT entries
Clearly define the maximum open delay and sample delay. Use these definitions in place of a mask (which works because this is the first field in the register) and an open-coded value. While at it reword a little bit the error messages to make them look clearer and similar. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20211015081506.933180-29-miquel.raynal@bootlin.com
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/ti_am335x_tscadc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index ae694fa2d711..31cffb6e8b17 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -84,7 +84,9 @@
#define STEPCONFIG_OPENDLY STEPDELAY_OPEN(0x098)
#define STEPDELAY_SAMPLE_MASK GENMASK(31, 24)
#define STEPDELAY_SAMPLE(val) FIELD_PREP(STEPDELAY_SAMPLE_MASK, (val))
+#define STEPCONFIG_MAX_OPENDLY GENMASK(17, 0)
#define STEPCONFIG_SAMPLEDLY STEPDELAY_SAMPLE(0)
+#define STEPCONFIG_MAX_SAMPLE GENMASK(7, 0)
/* Charge Config */
#define STEPCHARGE_RFP_MASK GENMASK(14, 12)