static int lpc32xx_ts_suspend(struct device *dev)
{
    struct lpc32xx_tsc *tsc = dev_get_drvdata(dev);
    struct input_dev *input = tsc->dev;

    mutex_lock(&input->mutex);

    if (input->users) {
        if (device_may_wakeup(dev))
            enable_irq_wake(tsc->irq);
        else
            lpc32xx_stop_tsc(tsc);
    }

    mutex_unlock(&input->mutex);

    return 0;
}
static int lpc32xx_ts_suspend(struct device *dev)
{
	struct lpc32xx_tsc *tsc = dev_get_drvdata(dev);
	struct input_dev *input = tsc->dev;

	/*
	 * Suspend and resume can be called when the device hasn't been
	 * enabled. If there are no users that have the device open, then
	 * avoid calling the TSC stop and start functions as the TSC
	 * isn't yet clocked.
	 */
	mutex_lock(&input->mutex);

	if (input->users) {
		if (device_may_wakeup(dev))
			enable_irq_wake(tsc->irq);
		else
			lpc32xx_stop_tsc(tsc);
	}

	mutex_unlock(&input->mutex);

	return 0;
}
static void lpc32xx_ts_close(struct input_dev *dev)
{
	struct lpc32xx_tsc *tsc = input_get_drvdata(dev);

	lpc32xx_stop_tsc(tsc);
}