Re: [PATCH V2 07/14] genirq: Add runtime power management support for IRQ chips

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jon Hunter <jonathanh@xxxxxxxxxx> writes:

> Some IRQ chips may be located in a power domain outside of the CPU
> subsystem and hence will require device specific runtime power
> management. In order to support such IRQ chips, add a pointer for a
> device structure to the irq_chip structure, and if this pointer is
> populated by the IRQ chip driver and CONFIG_PM is selected in the kernel
> configuration, then the pm_runtime_get/put APIs for this chip will be
> called when an IRQ is requested/freed, respectively.
>
> Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>

[...]

> @@ -1891,10 +1906,18 @@ int setup_percpu_irq(unsigned int irq, struct irqaction *act)
>  
>  	if (!desc || !irq_settings_is_per_cpu_devid(desc))
>  		return -EINVAL;
> +
> +	retval = irq_chip_pm_get(&desc->irq_data);
> +	if (retval < 0)
> +		return retval;
> +
>  	chip_bus_lock(desc);
>  	retval = __setup_irq(irq, desc, act);
>  	chip_bus_sync_unlock(desc);
>  
> +	if (retval)
> +		irq_chip_pm_get(&desc->irq_data);
> +

Shouldn't this one be a _put() ?

Otherwise, LGTM

Reviewed-by: Kevin Hilman <khilman@xxxxxxxxxxxx>

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux