Re: Unbalanced IRQ wake disable during resume from static suspend

Kevin Hilman
2010-12-07T21:32:07Z

Paul Walmsley <paul@pwsan.com> writes:

> Hi Kevin
>
> On Thu, 2 Dec 2010, Kevin Hilman wrote:
>
>> I guess this hasn't been seen before since we haven't tested the sysfs
>> wakeup interface for the omap-serial driver. For on-chip OMAP UARTs,
>> using the sysfs interface isn't needed as the serial core is already
>> doing device_init_wakeup(dev, true);
>
> Is this the code you're referring to, in serial_core.c?
>
> tty_dev = tty_register_device(drv->tty_driver, uport->line, uport->dev);
> if (likely(!IS_ERR(tty_dev))) {
> device_init_wakeup(tty_dev, 1);
> device_set_wakeup_enable(tty_dev, 0);
> } else
>
> I may be misreading it, but it appears that the code leaves wakeups
> disabled for the serial port, by default.

No, I was referring to the code in mach-omap2/serial.c, in omap_serial_init_port():

if ((cpu_is_omap34xx() && uart->padconf) ||
(uart->wk_en && uart->wk_mask)) {
device_init_wakeup(&od->pdev.dev, true);
DEV_CREATE_FILE(&od->pdev.dev, &dev_attr_sleep_timeout);
}

Kevin

> As an aside, this code is somewhat perplexing: it doesn't seem accurate to
> assume that every serial device really is capable of waking up the system.