diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-10-15 11:14:35 +0300 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-10-20 19:28:15 +0300 |
commit | f783484381ad088490a497abb4faab47511774c5 (patch) | |
tree | 9f6d4a3b223789c03b87edfdee8d1ede23f1e5b3 /include/linux/mfd/ti_am335x_tscadc.h | |
parent | 6147947922fc8e4d15296ed69bf886fbe139042a (diff) | |
download | linux-f783484381ad088490a497abb4faab47511774c5.tar.xz |
mfd: ti_am335x_tscadc: Use driver data
So far every sub-cell parameter in this driver was hardcoded: cell name,
cell compatible, specific clock name and desired clock frequency.
As we are about to introduce support for ADC1/magnetic reader, we need a
bit of flexibility. Let's add a driver data structure which will contain
these information.
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-18-miquel.raynal@bootlin.com
Diffstat (limited to 'include/linux/mfd/ti_am335x_tscadc.h')
-rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index ffc091b77633..bb3b56ade3fb 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h @@ -162,11 +162,20 @@ #define TSCADC_CELLS 2 +struct ti_tscadc_data { + char *adc_feature_name; + char *adc_feature_compatible; + char *secondary_feature_name; + char *secondary_feature_compatible; + unsigned int target_clk_rate; +}; + struct ti_tscadc_dev { struct device *dev; struct regmap *regmap; void __iomem *tscadc_base; phys_addr_t tscadc_phys_base; + const struct ti_tscadc_data *data; int irq; int used_cells; /* 1-2 */ int tsc_wires; |