Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754194Ab3EaT4Q (ORCPT ); Fri, 31 May 2013 15:56:16 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:58868 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753294Ab3EaT4C (ORCPT ); Fri, 31 May 2013 15:56:02 -0400 From: Kevin Hilman To: "Rafael J. Wysocki" Cc: Linux PM list , ACPI Devel Maling List , LKML , Greg Kroah-Hartman , Alan Stern , Bjorn Helgaas , Linux PCI , Mika Westerberg Subject: Re: [PATCH RFC] PM / Runtime: Rework the "runtime idle" helper routine References: <1463685.qFyr66vqF2@vostro.rjw.lan> Date: Fri, 31 May 2013 12:55:56 -0700 In-Reply-To: <1463685.qFyr66vqF2@vostro.rjw.lan> (Rafael J. Wysocki's message of "Wed, 29 May 2013 01:29:06 +0200") Message-ID: <87r4gmyldf.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1457 Lines: 32 "Rafael J. Wysocki" writes: > From: Rafael J. Wysocki > > The "runtime idle" helper routine, rpm_idle(), currently ignores > return values from .runtime_idle() callbacks executed by it. > > However, it turns out that many subsystems use the generic idle > callback routine pm_generic_runtime_idle() which checks the return > value of the driver's callback and executes pm_runtime_suspend() for > the device unless that value is different from 0. If that logic is > moved to rpm_idle() instead, pm_generic_runtime_idle() can be dropped > and its users will not need any .runtime_idle() callbacks any more. > > Moreover, the PCI subsystem's .runtime_idle() routine, > pci_pm_runtime_idle(), works in analogy with the generic one and if > rpm_idle() calls rpm_suspend() after 0 has been returned by the > .runtime_idle() callback executed by it, that routine will not be > necessary any more and may be dropped. > > To reduce overall code duplication make the changes described above. > > Signed-off-by: Rafael J. Wysocki Acked-by: Kevin Hilman Tested-by: Kevin Hilman # for OMAP PM domain change -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/