From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964871AbbI2McA (ORCPT ); Tue, 29 Sep 2015 08:32:00 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:38252 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934727AbbI2Mbr (ORCPT ); Tue, 29 Sep 2015 08:31:47 -0400 From: Tomeu Vizoso To: linux-pm@vger.kernel.org, Alan Stern , "Rafael J. Wysocki" , martyn.welch@collabora.co.uk Cc: Tomeu Vizoso , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Len Brown , Kevin Hilman , Greg Kroah-Hartman , Pavel Machek , Ulf Hansson Subject: [PATCH v5 0/2] Date: Tue, 29 Sep 2015 14:29:18 +0200 Message-Id: <1443529760-17612-1-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.4.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, this is v5 of an attempt to make it easier for devices to remain in runtime PM when the system goes to sleep, mainly to reduce the time spent resuming devices. For this, we interpret the absence of all PM callback implementations as it being safe to do direct_complete, so their ancestors aren't prevented from remaining runtime-suspended. Additionally, the prepare() callback of USB devices will return 1 if runtime PM is enabled and the current wakeup settings are correct. With these changes, a uvcvideo device (for example) stays in runtime suspend when the system goes to sleep and is left in that state when the system resumes, not delaying it unnecessarily. Thanks, Tomeu Changes in v5: - Check for all dev_pm_ops instances associated to a device, updating a no_pm_callbacks flag at the times when that could change. Tomeu Vizoso (2): PM / sleep: Go direct_complete if driver has no callbacks USB / PM: Allow USB devices to remain runtime-suspended when sleeping drivers/base/dd.c | 3 ++ drivers/base/power/domain.c | 5 ++++ drivers/base/power/main.c | 69 ++++++++++++++++++++++++++++++++------------- drivers/base/power/power.h | 2 ++ drivers/usb/core/port.c | 6 ++++ drivers/usb/core/usb.c | 11 +++++++- include/linux/pm.h | 1 + 7 files changed, 77 insertions(+), 20 deletions(-) -- 2.4.3