mfd: ti_tscadc: deal with partial activation
Fix the mfd device in the case where a subdevice might not be activated. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
This commit is contained in:
parent
c80df483f6
commit
24d5c82f82
2 changed files with 28 additions and 18 deletions
|
|
@ -120,11 +120,6 @@
|
|||
|
||||
#define TSCADC_CELLS 2
|
||||
|
||||
enum tscadc_cells {
|
||||
TSC_CELL,
|
||||
ADC_CELL,
|
||||
};
|
||||
|
||||
struct mfd_tscadc_board {
|
||||
struct tsc_data *tsc_init;
|
||||
struct adc_data *adc_init;
|
||||
|
|
@ -135,6 +130,9 @@ struct ti_tscadc_dev {
|
|||
struct regmap *regmap_tscadc;
|
||||
void __iomem *tscadc_base;
|
||||
int irq;
|
||||
int used_cells; /* 1-2 */
|
||||
int tsc_cell; /* -1 if not used */
|
||||
int adc_cell; /* -1 if not used */
|
||||
struct mfd_cell cells[TSCADC_CELLS];
|
||||
u32 reg_se_cache;
|
||||
spinlock_t reg_lock;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue