[PATCH 48/74] GIC: Added dummy handlers for Power Management Suspend Resume

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Sep 20 11:07:49 EDT 2010


On Mon, Sep 20, 2010 at 09:56:10AM -0500, Rob Herring wrote:
> On 09/20/2010 08:48 AM, Russell King - ARM Linux wrote:
>> On Mon, Sep 20, 2010 at 07:14:33PM +0530, deepaksi wrote:
>>> I request you to provide some more inputs on this, so that we can close
>>> the issue.
>>
>> I don't know, especially so without seeing the drivers.
>
> Assuming there is no powergating of the GIC, then this patch should be  
> sufficient depending on one question.

The GIC provides no wakeup capabilities.  Providing a dummy 'set_wake'
function means that driver authors will expect a successful
enable_irq_wake() to work - when it results in precisely nothing
being done.

With the situation described, what I envisage is drivers doing something
like:

	err = enable_irq_wake(irq);
	if (err == 0) {
		/* everything is fine, don't need to do anything else */
	} else if (err == -ENXIO) {
		/* IRQ controller doesn't support wakeups, try something else */
	} else {
		/* an error occurred trying to enable wakeups */
	}

If we go around adding dummy set_irq_wake functions to IRQ controllers
which don't support wakeup, then there's no way for drivers to know
this, and there is no method (other than by #ifdeffery) for them to
sort out this mess.



More information about the linux-arm-kernel mailing list