I don't quite follow the technical content of this "suspend_mode"
mask, but it sure looks as if it should use the driver model flags
in addition to whatever that mask is doing.
There are two aspects to this:
(a) Whether on a given system the touchscreen *can* issue wakeup
events ... call device_init_wakeup(dev, true) to say it can.
In this case, presumably suspend_mode == 0 means it can't.
Board setup, or at latest probe(), should device_init_wakeup().
(b) Whether it *should* do so ... e.g. the Nokia N810 has a mode
where it doesn't, and usually when you're carrying one around
in a pocket (or purse, or whatever) you would say "doesn't".
Userspace manages that answer via a sysfs file, and drivers
test the answer with device_may_wakeup(dev).
So: yes, this should initialize and use those driver model flags.
This should probably check device_may_wakeup(SOMEDEV), rather
than testing suspend_mode.
The wakeup mechanism here isn't clear to me. Does this assume
that the touchscreen IRQ is wakeup-capable? I don't see any
calls to enable_irq_wake() or disable_irq_wake() ... or for that
matter any other calls that might affect system behavior.
I'm more accustomed to thinking that the driver will
know "the" setup bit values to assign which will
ensure that the chip issues wakeup events ... that
stuff is usually not board-specific.
--