// FIXME remove "irq_disabled"
unsigned irq_disabled:1; /* P: lock */
unsigned disabled:1;
+ unsigned is_suspended:1;
int (*filter)(void *data, int data_idx, int *val);
void *filter_data;
static int device_suspended(struct device *dev)
{
struct ads7846 *ts = dev_get_drvdata(dev);
- return dev->power.power_state.event != PM_EVENT_ON || ts->disabled;
+ return ts->is_suspended || ts->disabled;
}
static int ads7846_read12_ser(struct device *dev, unsigned command)
spin_lock_irq(&ts->lock);
- spi->dev.power.power_state = message;
+ ts->is_suspended = 1;
ads7846_disable(ts);
spin_unlock_irq(&ts->lock);
spin_lock_irq(&ts->lock);
- spi->dev.power.power_state = PMSG_ON;
+ ts->is_suspended = 0;
ads7846_enable(ts);
spin_unlock_irq(&ts->lock);
}
dev_set_drvdata(&spi->dev, ts);
- spi->dev.power.power_state = PMSG_ON;
ts->spi = spi;
ts->input = input_dev;